Graphs. Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The.

Slides:



Advertisements
Similar presentations
Chapter 8 Topics in Graph Theory
Advertisements

Chapter 9 Graphs.
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
9.7 Planar Graphs. Intro problem- 3 houses and 3 utilities K 3,3 problem: Can 3 houses be connected to 3 utilities so that no 2 lines cross? Similarly,
CompSci 102 Discrete Math for Computer Science April 19, 2012 Prof. Rodger Lecture adapted from Bruce Maggs/Lecture developed at Carnegie Mellon, primarily.
Applied Combinatorics, 4th Ed. Alan Tucker
Section 2.1 Euler Cycles Vocabulary CYCLE – a sequence of consecutively linked edges (x 1,x2),(x2,x3),…,(x n-1,x n ) whose starting vertex is the ending.
Applied Combinatorics, 4th Ed. Alan Tucker
Tucker, Applied Combinatorics, Section 1.4, prepared by Patti Bodkin
Graph Colouring Lecture 20: Nov 25.
Complexity ©D.Moshkovitz 1 Paths On the Reasonability of Finding Paths in Graphs.
Curve Curve: The image of a continous map from [0,1] to R 2. Polygonal curve: A curve composed of finitely many line segments. Polygonal u,v-curve: A polygonal.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
1/22/03Tucker, Applied Combinatorics, Section EDGE COUNTING TUCKER, APPLIED COMBINATORICS, SECTION 1.3, GROUP B Michael Duquette & Amanda Dargie.
Graph Theory Chapter 6 Planar Graphs Ch. 6. Planar Graphs.
Turan’s theorem and extremal graphs Question: How many edges a simple graph must have to guarantee that the graph contains a triangle? Since K m,m and.
Graph Theoretic Concepts. What is a graph? A set of vertices (or nodes) linked by edges Mathematically, we often write G = (V,E)  V: set of vertices,
1 CS104 : Discrete Structures Chapter V Graph Theory.
Planar Graphs. A graph is called planar if it can be drawn in the plane in such a way that no two edges cross. Example of a planar graph: The clique on.
Planar Graphs Graph Coloring
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
Chapter 10 Graph Theory Eulerian Cycle and the property of graph theory 10.3 The important property of graph theory and its representation 10.4.
5.8 Graph Matching  Example: Set of worker assign to a set of task  Four tasks are to be assigned to four workers.  – Worker 1 is qualified to do tasks.
Graph Colouring Lecture 20: Nov 25. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including.
Graph Theory and Applications
Chap. 11 Graph Theory and Applications 1. Directed Graph 2.
 Quotient graph  Definition 13: Suppose G(V,E) is a graph and R is a equivalence relation on the set V. We construct the quotient graph G R in the follow.
Chapter 9.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 6th ed., by Kenneth H.
Great Theoretical Ideas in Computer Science for Some.
COMPSCI 102 Introduction to Discrete Mathematics.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Planarity Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering, IIT.
Chapter 7 Planar Graphs 大葉大學 資訊工程系 黃鈴玲  7.2 Planar Embeddings  7.3 Euler’s Formula and Consequences  7.4 Characterization of Planar Graphs.
1 Lecture 5 (part 2) Graphs II (a) Circuits; (b) Representation Reading: Epp Chp 11.2, 11.3
An Introduction to Graph Theory
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Planar Graphs Hubert Chan (Chapter 9.7) [O2 Proof Techniques]
Outline 1 Properties of Planar Graphs 5/4/2018.
Euler and Hamilton Cycles; Planar Graphs; Coloring.
Graphs Hubert Chan (Chapter 9) [O1 Abstract Concepts]
Great Theoretical Ideas In Computer Science
Graph Theory CSRU1400, Fall 2007 Ellen Zhang.
Euler Paths and Circuits
Applied Combinatorics, 4th Ed. Alan Tucker
Graph theory Definitions Trees, cycles, directed graphs.
Eulerian tours Miles Jones MTThF 8:30-9:50am CSE 4140 August 15, 2016.
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
CSE 421: Introduction to Algorithms
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Graph.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Discrete Math II Howon Kim
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Applied Combinatorics, 4th Ed. Alan Tucker
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Systems of distinct representations
Great Theoretical Ideas In Computer Science
Planarity.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 8th ed., by Kenneth H.
N(S) ={vV|uS,{u,v}E(G)}
Gaph Theory Planar Graphs
Discrete Mathematics for Computer Science
Applied Combinatorics, 4th Ed. Alan Tucker
GRAPH THEORY Properties of Planar Graphs Ch9-1.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Agenda Review Lecture Content: Shortest Path Algorithm
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
GRAPH THEORY Properties of Planar Graphs Ch9-1.
Presentation transcript:

Graphs

Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The adjacency-matrix representation of G vertex edge / 1 324/ / 53/ 11/

Representations of graphs : directed graph An directed graph G have six vertices and eight edges An adjacency-list representation of G The adjacency-matrix representation of G / 5/ 365/ 42/ 54/ 66/

p4. A graph is simple when it has no loops and no two distinct edges have the same pair of ends. Problems about graphs: 1. Matching 2. Spelling Check 3. Network Reliability 4. Street Surveillance 5. Scheduling Meetings 6. ……..

p5. Two graphs are isomorphic if there is a 1-1 correspondence between the vertex sets such that if two vertices are joined by an edge in one graph, then the corresponding vertices are joined by an edge in the other graph

p6. A permutation σ of the vertex set of a graph G with the property that {a, b} is an edge iff {σ(a), σ(b)} is an edge, is called an automorphism of G A complete graph K n on n vertices is the simple graph that has all n(n-1)/2 edges. Γ(x) denotes the set of all vertices adjacent to a given vertex x. The number of edges incident with a vertex x is called the degree or the valency of x. A regular graph has all its vertices with the same degree.

p7. Thm 1.1. A finite graph G has an even number of vertices with odd degree. Proof:

p8. Mountain Climbers Puzzle Two people start at A and Z at The same elevation on opposite sides of a mountain range whose summit is at M. Puzzle: is it possible for the people to meet at M in a fashion so that they are always at the same altitude every moment? Assume that there is no point lower than A (or Z) and no point is higher than M. A Z M

p9. Mountain Climbers Puzzle Range Graph: Vertex: a pair of points (P L, P R ) at the same altitude with P L on the left of M and P R on the right, such that one of the 2 points is a local peak or valley. Edge: (P L, P R ) and (P’ L, P’ R ) forms an edge, if 2 people can move constantly in the same direction from P L to P’ L and from P R to P’ R, respectively. Range graphMountain Range

p10. Mountain Climbers Puzzle Observation: (A, Z) and (M,M) have degree 1. Every other vertex has degree 2 or 4. What would happen if there were no path from (A, Z) to (M, M)? Range graphMountain Range

p11. Planar graphs We say a graph is planar if it can be drawn on a plane without edges crossing. K5K5 K 3,3

p12. Kuratowski's Theorem A graph is non-planar if and only if it contains a subgraph homeomorphic to K 3,3 or K 5. Or equivalently, a graph is planar if and only if it does not contains subgraph that is K 3,3 or K 5.

p13. Euler's Formula (1752) If G=(V,E) is a connected planar simple graph with e=|E| and v=|V|, and let r be the number of regions that are created when drawing a planar representation of the graph, then r = e – v + 2.

p14. Proof of r = e – v + 2 Prove by induction on the number of edges Choose successive edges so that at every stage the subgraph is connected. For e=1, we can only have this graph, which has v=2 and r=1, so the theorem holds. Assume the conclusion it true for e-1 edges. Adding an edge to get our planar graph, there are only two possibilities to consider.

p15. Corollary

p16. K 5 is nonplanar Proof: The graph K 5 has v = 5, e = v – 6 = 5 < 10 = e. But for a planar graph e is at most 3v – 6. Thus K 5 is nonplanar.

p17. K 3,3 is nonplanar

p18. Bipartite graph A bipartite graph is a graph where the vertices can be partitioned into two sets where there are no edges within a partition. Theorem: A graph G is bipartite if and only if every cycle in G has even length.

p19. A graph G is bipartite if and only if every cycle in G has even length. Proof: It is sufficient to prove the theorem for connected bipartitie graph. If G is bipartite, consider a cycle X 1 -X 2 -X X k -X 1, where X 1 is a left vertex. Then X k is a right vertex. Thus k is even and the cycle length is even. Suppose G has an odd cycle V 1 -V V n -V 1, where n is odd. Partition the vertices into A and B by putting V 1 in A, V 2 into B, and so on. Then V n is in A. There is an edge in A. Thus G is non-bipartite.

p21. A polygon is a finite connected graph that is regular of degree 2. A closed path through a graph using every edge once is called an Eulerian circuit. A graph with such a path is called an Eulerian graph. Theorem: (Euler 1736) A finite graph G with no isolated vertices (but possibly with multiple edges) is Eulerian if and only if it is connected and every vertex has even degree.

Proof : (1) If G is Eulerian, then G must be connected. Since the path enters a vertex through some edge and leaves by another edge, it is clear that all degrees must be even. (2) Start from a vertex x and begin making a path. Keep going and never use the same edge twice, until we cannot go further. Since every vertex has even degree, this can only happen when we return to x and all edges from x have been used. If there are unused edges, then consider the subgraph formed by these edges. Use the same procedure on the remaining subgraph and produce 2nd closed path. These two paths share at least one vertex, then they can be combined to a longer closed path from x to x.

Corollary: A graph has an Eulerian path but no Eulerian circuit if and only if it has exactly two vertices with odd degree. Pf: If we add an edge between the two odd-degree vertices, the graph will have an Eulerian circuit. If we remove the edge, then what remains is an Eulerian path. Suppose a graph with a different number of odd-degree vertices has an Eulerian path. Add an edge between the two ends of the path. This is a graph with an odd-degree vertex and a Euler circuit. As the above theorem shows, this is a contradiction. ∎

A Hamiltonian circuit in a graph G is a simple closed path that passes through each vertex exactly once. It is very difficult to determine if a graph G has a Hamiltonian circuit efficiently. Indeed it is proved to be NP-complete. What is NP-complete anyway?

p25. Theorem If a simple graph G on n vertices has all vertices of degree at least n/2, then it contains a Hamiltonian circuit. Pf: By contradiction, suppose it is not true. Let G be such a counterexample with the maximum number of edges. Let y and z be two non-adjacent vertices. Since adding {y, z} creates a Hamiltonian circuit, there exists a simple path from y to z with vertices y=x 1, x 2,...,x n =z, say. {i: y is adjacent to x i+1 } and {i: z is adjacent to x i } each have at least n/2 neighbors and are in {1,2,...,n-1}, so they must intersect at some element {i 0 }. Then y=x 1, x 2,...,x i 0, z=x n, x n-1,...,x i 0 +1, x 1 =y is Ham circuit. Contradiction! y=x 1 x2x2 xi0xi0 x i0+1 x n =z

p26. NP: the class of problems whose answer can be verified in “polynomial time”. P: the class of problems which can be solved in “polynomial time”.. NP-complete: A problem B is NP-complete if it satisfies: 1. B is in NP, and 2. Every A in NP is polynomial time reducible to B. It is worth 1 million US dollars to prove P = NP or not. Want to try?

p27. Instant Insanity puzzle Consider 4 cubes with faces colored red, blue, green and yellow. Suppose each cube uses all the 4 colors. The problem is to make a stack of these cubes so that all 4 colors appears on each of the 4 sides of the stack. RYB R B R B R B R B G Y G Y

Now arrange the blocks according to the subgraphs we constructed. The arrow points to the block face that faces right. G G B B Y Y R R

G B B G Y Y R R

p30. Instant Insanity puzzle R B R B R B R B G Y G Y R B G Y