Graphs Definitions. Gunnar Gotshalks. GraphDefinitions 1

Similar documents
Graph Theory. ICT Theory Excerpt from various sources by Robert Pergl

Algorithms. Graphs. Algorithms

Algorithms: Graphs. Amotz Bar-Noy. Spring 2012 CUNY. Amotz Bar-Noy (CUNY) Graphs Spring / 95

CS 4407 Algorithms Lecture 5: Graphs an Introduction

Graph and Digraph Glossary

Maximum Flows of Minimum Cost

Lecture 5: Graphs & their Representation

Module 2: NETWORKS AND DECISION MATHEMATICS

Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks

Inf 496/596 Topics in Informatics: Analysis of Social Network Data

CHAPTER 14 GRAPH ALGORITHMS ORD SFO LAX DFW

Worksheet for the Final Exam - Part I. Graphs

Graph Theory CS/Math231 Discrete Mathematics Spring2015

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS

Graph Theory. Part of Texas Counties.

Lecture 10. Elementary Graph Algorithm Minimum Spanning Trees

Foundations of Discrete Mathematics

Chapter 9 Graph Algorithms

An Interactive Introduction to Graph Theory

Chapter 9 Graph Algorithms

Lecture 3: Recap. Administrivia. Graph theory: Historical Motivation. COMP9020 Lecture 4 Session 2, 2017 Graphs and Trees

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

Chapter 9 Graph Algorithms

An Introduction to Graph Theory

DEFINITION OF GRAPH GRAPH THEORY GRAPHS ACCORDING TO THEIR VERTICES AND EDGES EXAMPLE GRAPHS ACCORDING TO THEIR VERTICES AND EDGES

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV

IS 709/809: Computational Methods in IS Research. Graph Algorithms: Introduction

2 hours THE UNIVERSITY OF MANCHESTER. 22 May :00 16:00

Graph (1A) Young Won Lim 4/19/18

Introduction to Mathematical Programming IE406. Lecture 16. Dr. Ted Ralphs

Review: Graph Theory and Representation

4. (a) Draw the Petersen graph. (b) Use Kuratowski s teorem to prove that the Petersen graph is non-planar.

Lecture 1: Examples, connectedness, paths and cycles

Outline. Introduction. Representations of Graphs Graph Traversals. Applications. Definitions and Basic Terminologies

CMSC 380. Graph Terminology and Representation

Graph Overview (1A) Young Won Lim 5/9/18

Let G = (V, E) be a graph. If u, v V, then u is adjacent to v if {u, v} E. We also use the notation u v to denote that u is adjacent to v.

CSE 101, Winter Discussion Section Week 1. January 8 - January 15

Varying Applications (examples)

UNIT 3. Greedy Method. Design and Analysis of Algorithms GENERAL METHOD

Chapter 2 Graphs. 2.1 Definition of Graphs

Chapter 6. Planar Orientations. 6.1 Numberings of Digraphs

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ - artale/z

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise.

CSE 331: Introduction to Algorithm Analysis and Design Graphs

Graph theory: basic concepts

INTRODUCTION TO GRAPH THEORY. 1. Definitions

Graphs. Introduction To Graphs: Exercises. Definitions:

Simple graph Complete graph K 7. Non- connected graph

Graph Theory. Probabilistic Graphical Models. L. Enrique Sucar, INAOE. Definitions. Types of Graphs. Trajectories and Circuits.

Undirected Network Summary

Graphs and Trees. An example. Graphs. Example 2

0.0.1 Network Analysis

Introduction III. Graphs. Motivations I. Introduction IV

Graph definitions. There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs. An undirected graph

Graphs. Data Structures and Algorithms CSE 373 SU 18 BEN JONES 1

Definition 1.1. A matching M in a graph G is called maximal if there is no matching M in G so that M M.

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

Basics of Graph Theory

Network models and graph theory

MATH 350 GRAPH THEORY & COMBINATORICS. Contents

Elements of Graph Theory

Introduction to Graphs. common/notes/ppt/

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory

Graphs. Carlos Moreno uwaterloo.ca EIT

11.9 Connectivity Connected Components. mcs 2015/5/18 1:43 page 419 #427

CS 2336 Discrete Mathematics

Artificial Intelligence

Undirected Graphs. Hwansoo Han

1 Digraphs. Definition 1

EECS 1028 M: Discrete Mathematics for Engineers

Discrete mathematics II. - Graphs

Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) Web search views web pages as a graph

Graph Algorithms Using Depth First Search

Spanning and weighted spanning trees. A different kind of optimization. (graph theory is cool.)

Introduction to Graphs. Tecniche di Programmazione A.A. 2017/2018

Discrete Mathematics (2009 Spring) Graphs (Chapter 9, 5 hours)

Minimum Spanning Trees My T. UF

Undirected Graphs. DSA - lecture 6 - T.U.Cluj-Napoca - M. Joldos 1

Logic: The Big Picture. Axiomatizing Arithmetic. Tautologies and Valid Arguments. Graphs and Trees

Directed Graph and Binary Trees

CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS

Combinatorics Summary Sheet for Exam 1 Material 2019

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Graph Theory

GRAPH THEORY AND LOGISTICS

Instructor: Paul Zeitz, University of San Francisco

Lecture 4: Bipartite graphs and planarity

CS 561, Lecture 9. Jared Saia University of New Mexico

Section 10.1: Graphs and Graph Models. Introduction to Graphs Definition of a Graph Types of Graphs Examples of Graphs

Graphs ADTs and Implementations

CS 311 Discrete Math for Computer Science Dr. William C. Bulko. Graphs

Graphs. Tessema M. Mengistu Department of Computer Science Southern Illinois University Carbondale Room - Faner 3131

Algorithm Design (8) Graph Algorithms 1/2

Copyright 2000, Kevin Wayne 1

Introduction to Graph Theory

Crossing bridges. Crossing bridges Great Ideas in Theoretical Computer Science. Lecture 12: Graphs I: The Basics. Königsberg (Prussia)

Relations and Graphs

Chapter 11: Graphs and Trees. March 23, 2008

Graph Algorithms. Definition

Trees. CSC 1300 Discrete Structures Villanova University

Transcription:

Graphs Definitions GraphDefinitions 1

Examples of Graphs Street maps» Vertices are the intersections» Edges are the streets Power line network» Vertices are the houses & power stations» Edges are the power lines WWW pages for the CSE Department» Vertices are the pages» Edges are the links GraphDefinitions 2

Definition A graph G contains two components G = <V, E > V ( G ) E ( G ) the graph set of vertices (or nodes) in the graph bag of edges (or arcs) in the graph An edge is a pair of vertices with an associated direction vertices are at the ends of an edge e k = ( v p, v q ) v p, v q V v p is the tail of the edge v q is the head of the edge GraphDefinitions 3

Definition 2 Note we have» Set of vertices > Every vertex is distinct» Bag of edges > Can have more than one edge connecting the same pair of vertices Two or more highways connecting two cities Two or more telephone lines into a house An edge can have both head and tail be the same vertex a self-loop GraphDefinitions 4

Directed Graph Also called a digraph Edges have a direction, a directed edge ( v1, v2 ) are an ordered pair» Oil pipelines oil flows in one direction» River systems water flows downhill» One way roads Represent edges as arrows in the graph, where v1 is the tail, and v2 is the head GraphDefinitions 5

Undirected Graph Edges have no direction, an undirected edge ( v1, v2 ) are an unordered pair» Two way streets» Who danced with whom at a party The graph is considered to have both ( v1, v2 ) and ( v2, v1 ) in the graph but only one of the pair is specified as a member of E ( G ). Represent edges with lines no arrows GraphDefinitions 6

Multi-graph Multi-graph» Has more than one edge between one or more pairs of vertices, called parallel edges > Highway systems between cities > Multiple telephones into a house Edges can be directed or undirected GraphDefinitions 7

Simple Graph Simple Graph» No loops and no parallel edges» Edges form a set instead of a bag > Simplifies technical details for graph algorithms but does not fundamentally change them If a graph has e edges and v vertices then e v ( v 1 ) / 2 Why? GraphDefinitions 8

Planar & Non-planar Graphs Planar graph» Can be drawn on a plane (a sheet of paper) so no edges cross Non-planar graph» Cannot draw on a plane without edges crossing» All non-planar graphs contain one or both of these as sub-graphs Complete 5-graph Houses & Utilities GraphDefinitions 9

Adjacent Vertices & Incident Edges Two vertices are adjacent if the vertices are at the ends of the same edge» The vertices v p and v q are adjacent In directed and undirected graphs» The edge e k is incident on the vertices v p and v q In a directed graph Example edge e k = ( v p, v q )» e k is an outgoing edge from the vertex v p» e k is an incoming edge to the vertex v q GraphDefinitions 10

Degree of a Vertex In an undirected graph» Degree is the number of ends of edges incident upon the vertex (number of adjacent vertices) degree 3 degree 2 If a graph has e edges then # v "G deg(v) = 2e Why? GraphDefinitions 11

Degree of a Vertex 2 In a directed graph degree = in-degree + out-degree» In-degree the number of times the vertex is at the head of an edge» Out-degree the number of times the vertex is at the tail of an edge degree 3 In-degree 1 out-degree 2 degree 2 In-degree 1 out-degree 1 If a simple graph has e edges and v vertices then e v ( v 1 ) Why? # v "G If a graph has e edges then indeg(v) = # v "G Why? out deg(v) = e GraphDefinitions 12

Path Can be one of» Sequence of edges counting rails > Edges are head to tail in the sequence» Sequence of adjacent vertices counting fence posts > Edges between adjacent vertices are head to tail Path from vertex 1 to 11 vertices < 1, 2, 6, 9, 7, 11 > edges < (1, 2), ( 2, 6 ), ( 6, 9 ), ( 9, 7 ), ( 7, 11 ) > GraphDefinitions 13

Simple Path No vertex occurs more than once in a path Path from vertex 1 to 11 vertices < 1, 2, 6, 9, 7, 11 > edges < (1, 2), ( 2, 6 ), ( 6, 9 ), ( 9, 7 ), ( 7, 11 ) > GraphDefinitions 14

Non-simple Path At least one vertex occurs more than once in a path Path from vertex 1 to 11 vertices < 1, 2, 6, 4, 1, 3, 8, 7, 5, 7, 11 > GraphDefinitions 15

Directed Path In a directed graph a path follows the edge directions follow the arrows Path from vertex 1 to 11 vertices < 1, 2, 6, 4, 1, 3, 8, 7, 11 > GraphDefinitions 16

Hamiltonian Path A path that visits all the vertices exactly once» Can be directed or undirected vertices < 1, 3, 8, 2, 6, 4, 5, 7 > GraphDefinitions 17

Cycle A path that starts and ends with the vertex» Can be simple or non-simple, and directed or undirected vertices < 1, 3, 8, 2, 6, 4, 1 > GraphDefinitions 18

Hamiltonian Cycle A path that visits all the vertices exactly once, except for the first vertex, which is also the last vertex» Can be directed or undirected vertices < 1, 3, 8, 2, 6, 7, 5, 4, 1 > GraphDefinitions 19

Acyclic Graph A directed graph with no cycles or self-loops» A tree is an acyclic graph GraphDefinitions 20

Connected Graph For any two vertices there exists an undirected path that joins them» For a directed graph, consider all edges to be undirected Connected undirected graph Connected directed graph GraphDefinitions 21

Strongly Connected Graph For every pair of vertices in a directed graph there exists a directed path between them Not strongly connected no path from 8 to 6 Connected path from 6 to 8 GraphDefinitions 22

Connected Components A connected component of a graph is a the largest subgraph such that it is a connected graph» The graph has 3 connected components GraphDefinitions 23

Subgraph A subgraph S of a graph G has the following components V ( S ) V ( G ) E ( S ) E ( G ) e : E ( S ) head ( e ) V ( S ) tail ( e ) V ( S ) Subgraph Vertices { 2, 6, 8 } Edges [ ( 2, 6 ), ( 6, 8 ), ( 2, 8 ) ] GraphDefinitions 24

Spanning Subgraph Subgraph S of graph G contains all the vertices of G > Only has meaning if G is a connected component» Missing one or more edges V ( S ) = V ( G ) E ( S ) E ( G ) Spanning subgraph removed edges ( 5, 7 ), ( 6, 8 ) and ( 2, 6 ) GraphDefinitions 25

Spanning Tree Spanning subgraph such that the graph is a tree» In a graph it is called a free tree no vertex is distinguished as the root» The tree structure is called a rooted tree Spanning tree removed edges ( 5, 7 ), ( 6, 8 ) ( 1, 2 ) and ( 2, 8 ) Remove enough edges to break all cycles but leave the graph connected GraphDefinitions 26

Forest An undirected graph without cycles is called a forest» Any vertex could be considered to be the root of a tree Example the graph consisting only of the solid lines GraphDefinitions 27