Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Planar Graphs

2 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.

3 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.

4 Is K 5 planar ?

5 What about K 3,3 ?

6 The problem of drawing a graph in the plane arises frequently in VLSI layout problems.

7 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. one face two faces

8 Question: Can you redraw this graph as a plane graph so as to alter the number of its faces?

9 This graph has 6 vertices 8 edges and 4 faces vertices – edges + faces = 2

10 This graph has 7 vertices 12 edges and 7 faces vertices – edges + faces = 2

11 Euler 1752 If G is a connected plane graph, then vertices – edges + faces = 2 Let v = # of vertices e = # of edges f = # of faces

12 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.

13 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 By induction hypothesis: v= # of vertices, e = # of edges, f = # of faces exterior e interior Let

14 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.

15 Platonic Solids A Platonic solid has congruent regular polygons as faces and has the same number of edges meeting at each corner. Each one can be flattened into a planar graph: With constant degree: k and the same number of edges bounding each face: l

16 = # of edges coming from x vertex x Each edge belongs to 2 faces: By Euler’s formula: and k,l  3 for physical reasons

17 The only solutions: tetrahedron cube octahedron dodecahedron icosahedron

18 Theorem: Every (simple) n -node planar graph G has at most 3n-6 edges. Proof: n = 3 : Clearly true. n  3 : consider a graph G with a maximal number of edges. Thus 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. Thus

19 The Kuratowski Graphs

20 Corollary: K 5 is not planar. A planar graph on n = 5 nodes can have at most 3n-6 = 9 edges. Thus: K 5 is not planar.

21 Fact: K 3,3 is not planar either. a c b z y x When we redraw K 3,3, the yellow cycle will be laid out: a b c x y z

22 For K 3,3, each region has at least 4 edges, Hence 4f <= 2e. If K 3,3 is planar, f = e - n + 2 = 9 – 6 + 2 = 5. So 20=4f <= 2e=18, a contradiction. Fact: K 3,3 is not planar either.

23 Insight 1. If we replace edges in a Kuratowski graph by paths of whatever length, they remain non-planar.

24 Insight 2 If a graph G contains a subgraph obtained by starting with K 5 or K 3,3 and replacing edges with paths, then G is non-planar.

25 Elementary subdivision (homeomorphic operation) uwuvw G 1 and G 2 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. ab c de ab c de ab c de ab c de Two homeomorphic graphs are simultaneously planar or nonplanar.

26 Kuratowski’s Theorem [1930] A graph is planar if and only if it contains no subgraph obtainable from K 5 or K 3,3 by replacing edges with paths.

27 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.

28 Five Color Theorem Any planar graph can be colored with five colors.

29 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.

30 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 v 1, v 2, v 3, v 4, and v 5.

31 V 1, V 2, V 3, V 4, V 5 can’t form a K 5 Some two neighbors v a, and v b of q must not have an edge between them. va vava va vb vbvb vb

32 Edge Contraction Contract the edges and of G to obtain a planar graph G’. G’ is 5 colorable since it has fewer nodes than G. va vava va vb vbvb vb v a, v b, and q become a single node  in G’

33 Using G’ to 5-color G. Color v a and v b the same as . Color each node besides q, as it is colored in G’. Color q whatever color is not used on its 5 neighbors. va vava va vb vbvb vb v a, v b, and q become a single node  in G’

34 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. Ex. 11.24 ab c d e f g h i There is a Hamilton path, but no Hamilton cycle. an NP-complete problem

35 11.5 Hamilton Paths and Cycles Ex. 11.25 x yy y y xx x y y start labeling from here 4x's and 6y's, since x and y must interleave in a Hamilton path (or cycle), the graph is not Hamiltonian The method works only for bipartite graphs. The Hamilton path problem is still NP-complete when restricted to bipartite graphs.

36 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 K 17, a Hamilton cycle in K 17 corresponds to a seating arrangements. Each cycle has 17 edges, so we can have (1/17)17(17-1)/2=8 different sittings. 12 3 4 5 6 17 16 15 1,2,3,4,5,6,...,17,1 12 3 4 5 6 17 16 15 1,3,5,2,7,4,...,17,14,16,1 12 3 4 5 6 17 16 15 1,5,7,3,9,2,...,16,12,14,1 14

37 11.5 Hamilton Paths and Cycles case 1.v v 1 v 2...v m case 2. v 1 v 2...v k v v k+1...v m case 3. v 1 v 2...v m v

38 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

39 11.5 Hamilton Paths and Cycles Proof: First prove that G is connected. If not, xy n 1 vertices n 2 vertices a contradiction

40 11.5 Hamilton Paths and Cycles Assume a path p m with m verticesv 1 v 2 v 3... v m case 1. either v v 1 or v m v case 2. v 1,v 2,...,v m construct a cycle either v 1 v 2 v 3... v m or v 1 v 2 v 3...v t-1 v t... v m otherwise assume deg(v 1 )=k, then deg(v m )<m-k. deg(v 1 )+deg(v m )<m<n-1, a contradiction Therefore, v can be added to the cycle. v

41 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 K n 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.

42 11.5 Hamilton Paths and Cycles a(=v 1 ) b(=v 2 ) v 3... v n If (b,v i ) is in H, then (a,v i-1 ) cannot be in H. Otherwise, b v i v n a v i-1 v i-2 v 3 is a Hamilton cycle in H.

43 11.5 Hamilton Paths and Cycles

44 A related problem: the traveling salesman problem a b c d e 3 4 1 3 54 3 2 Find a Hamilton cycle of shortest total distance. 2 graph problem vs. Euclidean plane problem (computational geometry) Certain geometry properties (for example, the triangle inequality) sometimes (but not always) make it simpler. For example, a-b-e-c-d-a with total cost= 1+3+4+2+2=12.

45 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

46 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). b c d e a 3 colors are needed. a: Red b: Green c: Red d: Blue e: Red In general, it's a very difficult problem (NP-complete).  (K n )=n  (bipartite graph)=2

47 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. G R e B B R Y Four colors are enough for any map. Remain a mystery for a century. Proved with the aid of computer analysis in 1976. a b c d f a b c d e f

48 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=K n, 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 G 1, G 2,..., G k, then P(G, )=P(G 1, )P(G 2, )...P(G k, ). Ex. 11.32 e G e G e G' coalescing the vertices

49 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(G e, )=P(G, )+P(G' e, ). e G e G e G' coalescing the vertices a b In a proper coloring of G e : 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(G e, )=P(G, )+P(G' e, ).

50 Chapter 11 An Introduction to Graph Theory 11.6 Graph Coloring and Chromatic Polynomials Ex. 11.33 e=- P(G e, )P(G, ) P(G' e, ) P(G, )= ( -1) 3 - ( -1)( -2)= 4 -4 3 +6 2 -3 Since P(G,1)=0 while P(G,2)=2>0, we know that  (G)=2. Ex. 11.34 =-=-2 ee P(G, )= (4) -2 (4) = ( -1)( -2) 2 ( -3)  (G)=4

51 User Interface How many objects appear in the pink window? (real-time response required) 4 2 3

52 Idea: View each rectangle as a mesh. interior faces (mesh is planar)

53 Objects are placed on an n  n grid. Data structure will contain: for each grid node # objects containing node for each grid edge # objects containing edge for each (interior) face #objects containing face window border touches no nodes

54 Partial Overlap of Window and Object ignore object’s nodes and edges outside window

55 edge counts in node counts in face counts in # of objects intersecting


Download ppt "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."

Similar presentations


Ads by Google