1.6k likes | 3.53k Views
Planar Graphs. The clique on 4 nodes. 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:. 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:.
E N D
The clique on 4 nodes. 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:
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 4 nodes.
The problem of drawing a graph in the plane arises frequently in VLSI layout problems.
two faces one face Definition: When a graph is drawn in the plane with no crossed edges, this particular embedding of the graph in the plane, it is called a plane graph. A plane graph cuts the plane into regions that we call faces.
Question: Can you redraw this graph as a plane graph so as to alter the number of its faces?
This graph has 6 vertices 8 edges and 4 faces vertices – edges + faces = 2
This graph has 7 vertices 12 edges and 7 faces vertices – edges + faces = 2
Euler 1752 If G is a connected plane graph, then vertices – edges + faces = 2 Let v = # of vertices e = # of edges f = # of faces
Proof: By induction on the # of cycles of G. Base case: G has no cycles. G is connected so it must be a tree. Thus, e = v - 1 and f = 1.
Let v= # of vertices, e= # of edges, f = # of faces exterior e interior By induction hypothesis: Suppose G has at least one cycle C containing edge e. • G is connected since e was on a cycle. • f = f-1 and G has fewer cycles than G. • v= v e= e-1
Corollary: No matter how we redraw a plane graph it will have the same # of faces. Proof: f = 2 – v + e is determined by v and e, neither of which change when we redraw the graph.
A Platonic solid has congruent regular polygons as faces and has the same number of edges meeting at each corner. Platonic Solids Each one can be flattened into a planar graph: With constant degree: k and the same number of edges bounding each face: l
# of edges coming from x vertexx = Each edge belongs to 2 faces: By Euler’s formula: and k,l 3 for physical reasons
The only solutions: tetrahedron cube octahedron dodecahedron icosahedron
Theorem: Every (simple) n-node planar graph G has at most 3n-6 edges. Thus Thus Proof: n = 3: Clearly true. n 3:consider a graph G with a maximal number of edges. • G must be connected or else we could add an edge. Every face has at least 3 edges on its boundary. Every edge lies on the boundary of at most 2 faces.
Corollary: K5 is not planar. A planar graph on n = 5 nodes can have at most 3n-6 = 9 edges. Thus: K5 is not planar.
When we redraw K3,3 , the yellow cycle will be laid out: x a b z y c Fact: K3,3 is not planar either. a x y b z c
Fact: K3,3 is not planar either. For K3,3, each region has at least 4 edges, Hence 4f <= 2e. If K3,3 is planar, f = e - n + 2 = 9 – 6 + 2 = 5. So 20=4f <= 2e=18, a contradiction.
Insight 1. If we replace edges in a Kuratowski graph by paths of whatever length, they remain non-planar.
Insight 2 If a graph G contains a subgraph obtained by starting with K5 or K3,3 and replacing edges with paths, then G is non-planar.
Elementary subdivision (homeomorphic operation) u w u v w G1 and G2 are called homeomorphic if they are isomorphic or if they can both be obtained from the same loop-free undirected graph H by a sequence of elementary subdivisions. a b a b a b a b c c c c e d e d e d e d Two homeomorphic graphs are simultaneously planar or nonplanar.
Kuratowski’s Theorem [1930] A graph is planar if and only if it contains no subgraph obtainable from K5 or K3,3 by replacing edges with paths.
Appel-Haken Four-Color Theorem [1976] The vertices of any planar graph can be 4-colored in such a way that no two adjacent vertices receive the same color.
Five Color Theorem • Any planar graph can be colored with five colors.
Lemma: Every Planar Graph Contains a Node of Degree · 5 • If every node has degree at least 6, then the number of edges would be 3n, which would contradict our upper bound of 3n-6 edges in an n-node planar graph.
Proof of 5-color theorem • Let G be a node-minimal counter-example to the theorem, i.e., a planar graph that requires 6 colors. • By Lemma, G must have a node q with degree · 5. Let the nodes adjacent to q be named v1, v2, v3, v4, and v5.
V1, V2, V3, V4, V5 can’t form a K5 • Some two neighbors va, and vb of q must not have an edge between them. vb va
Edge Contraction • Contract the edges <q, va> and <q,vb> of G to obtain a planar graph G’. G’ is 5 colorable since it has fewer nodes than G. vb va va, vb, and q become a single node a in G’
Using G’ to 5-color G. • Color va and vb the same as a. Color each node besides q, as it is colored in G’. Color q whatever color is not used on its 5 neighbors. vb va va, vb, and q become a single node a in G’
11.5 Hamilton Paths and Cycles a path or cycle that contain every vertex Unlike Euler circuit, there is no known necessary and sufficient condition for a graph to be Hamiltonian. an NP-complete problem Ex. 11.24 c a b There is a Hamilton path, but no Hamilton cycle. e d f h g i
11.5 Hamilton Paths and Cycles Ex. 11.25 start labeling from here x 4x's and 6y's, since x and y must interleave in a Hamilton path (or cycle), the graph is not Hamiltonian y y y x y y x x y The method works only for bipartite graphs. The Hamilton path problem is still NP-complete when restricted to bipartite graphs.
11.5 Hamilton Paths and Cycles Ex. 11.26 17 students sit at a circular table, how many sittings are there such that one has two different neighbors each time? Consider K17, a Hamilton cycle in K17 corresponds to a seating arrangements. Each cycle has 17 edges, so we can have (1/17)17(17-1)/2=8 different sittings. 5 5 5 3 3 15 3 15 15 2 1 17 2 1 17 2 1 17 16 16 16 4 4 4 14 6 6 6 1,2,3,4,5,6,...,17,1 1,3,5,2,7,4,...,17,14,16,1 1,5,7,3,9,2,...,16,12,14,1
11.5 Hamilton Paths and Cycles case 1. vv1v2 ...vm case 2. v1v2 ...vkvvk+1 ...vm case 3. v1v2 ...vmv
11.5 Hamilton Paths and Cycles Ex. 11.27 In a round-robin tournament each player plays every other player exactly once. We want to somehow rank the players according to the result of the tournament. not always possible to have a ranking where a player in a certain position has beaten all of the opponents in later positions a b c but by Theorem 11.7, it is possible to list the players such that each has beaten the next player on the list
11.5 Hamilton Paths and Cycles Proof: First prove that G is connected. If not, x y n1 vertices n2 vertices a contradiction
11.5 Hamilton Paths and Cycles Assume a path pm with m vertices v1v2v3 ... vm case 1. either vv1 or vmv case 2. v1,v2,...,vm construct a cycle either v1v2v3 ... vm or v1v2v3 ...vt-1vt ... vm otherwise assume deg(v1)=k, then deg(vm)<m-k. deg(v1)+deg(vm)<m<n-1, a contradiction Therefore, v can be added to the cycle. v
11.5 Hamilton Paths and Cycles Proof: Assume G does not contain a Hamilton cycle. We add edges to G until we arrive a subgraph H of Kn where H has no Hamilton cycle, but for any edge e not in H, H+e has a Hamilton cycle. For vertices a,b wher (a,b) is not an edge of H. H+(a,b) has a Hamilton cycle and (a,b) is part of it.
11.5 Hamilton Paths and Cycles a(=v1) b(=v2) v3 ... vn If (b,vi) is in H, then (a,vi-1) cannot be in H. Otherwise, bvivnavi-1vi-2v3 is a Hamilton cycle in H.
11.5 Hamilton Paths and Cycles A related problem: the traveling salesman problem a 3 Find a Hamilton cycle of shortest total distance. e 1 b 3 2 For example, a-b-e-c-d-a with total cost= 1+3+4+2+2=12. 4 3 d 5 4 2 c graph problem vs. Euclidean plane problem (computational geometry) Certain geometry properties (for example, the triangle inequality) sometimes (but not always) make it simpler.
11.5 Hamilton Paths and Cycles Two famous computational geometry problems. 1. closest pair problem: which two points are nearest 2. convex hull problem the convex hull
11.6 Graph Coloring and Chromatic Polynomials Def. 11.22 If G=(V,E) is an undirected graph, a proper coloring of G occurs when we color the vertices of G so that if (a,b) is an edge in G, then a and b are colored with different colors. The minimum number of colors needed to properly color G is called the chromatic number of G and is written (G). a 3 colors are needed. a: Red b: Green c: Red d: Blue e: Red e (Kn)=n b (bipartite graph)=2 d c In general, it's a very difficult problem (NP-complete).
11.6 Graph Coloring and Chromatic Polynomials A related problem: color the map where two regions are colored with different colors if they have same boundaries. Four colors are enough for any map. Remain a mystery for a century. Proved with the aid of computer analysis in 1976. a b B G c R e Y f a d B R f b e c d
11.6 Graph Coloring and Chromatic Polynomials P(G,): the chromatic polynomial of G=the number of ways to color G with colors. Ex. 11.31 (a) G=n isolated points, P(G,)=n. (b) G=Kn, P(G,)=(-1)(-2)...(-n+1)=(n) (c) G=a path of n vertices, P(G,)=(-1)n-1. (d) If G is made up of components G1, G2, ..., Gk, then P(G,)=P(G1,)P(G2,)...P(Gk,). Ex. 11.32 e coalescing the vertices G G G' e e
11.6 Graph Coloring and Chromatic Polynomials Theorem 11.10 Decomposition Theorem for Chromatic Polynomials. If G=(V,E) is a connected graph and e is an edge, then P(Ge,)=P(G,)+P(G'e,). a e coalescing the vertices b G G G' e e In a proper coloring of Ge: case 1. a and b have the same color: a proper coloring of G'e case 2. a and b have different colors: a proper coloring of G. Hence, P(Ge,)=P(G,)+P(G'e,).
Chapter 11 An Introduction to Graph Theory 11.6 Graph Coloring and Chromatic Polynomials Ex. 11.33 e = - P(G'e,) P(G,) P(Ge,) P(G,)=(-1)3-(-1)(-2)=4-43+62-3 Since P(G,1)=0 while P(G,2)=2>0, we know that (G)=2. Ex. 11.34 e e = - = -2 P(G,)=(4)-2(4)= (-1)(-2)2(-3) (G)=4