Download presentation
Presentation is loading. Please wait.
1
P LANARITY T ESTING A ND E MBEDDING By: Seyed Akbar Mostafavi Fall 2010 1
2
O UTLINE Planar Graphs Planarity Testing Theorems Kuratowski’s Theorem Demoucron’s Planarity Algorithms Euler Polyhedron Formula Nonplanarity of Kuratowski Graphs Minimum Degree Bound Definitions of Planarity Testing st-numbering Algorithm Bush Form and PQ-Tree Booth-Lueker Algorithm Embedding Algorithms 2
3
P LANAR G RAPHS A graph G(V,E) is called planar graph if it can be drawn on embedded in the plane in such a way that the edges of the embedding intersect only at the vertices of G. Example: K(4) 3
4
P LANAR G RAPHS Nonplanar Graph example: K(3,3) 4
5
P LANARITY T ESTING Two classical approaches Theorem of Kuratowski Characterizes planar graphs in terms of subgraphs they are forbidden to have Based on the notion of homeomorphism Series insertion: replacement of an edge (u,v) of G by a pair of edges (u,z) and (z,v) Series deletion: replacement of a pair of edges (u,z) and (z,v) of G by a single edge (u,v) Hopcraft and Tarjan Algorithm determines planarity in linear time and shows how to draw the graph if it is planar 5
6
K URATOWSKI ’ S T HEOREM 6
7
C ONTRACTION F ORM OF K URATOWSKI ’ S T HEOREM 7
8
D EMOUCRON ’ S PLANARITY A LGORITHM Terminology face of a planar representation: a planar region bounded by edges and vertices of the representation and containing no graphical elements in its interior. R: a planar representation of a subgraph S of a graph G(V,E) We try to extend R to a planar representation of G Constraints Each component of G-R, being a connected piece of the graph, must, in any planar extension of R, be placed within a face of R. Further constraint is observed by considering those edges connecting a component c of G-R to set of vertices W in R. All the vertices W in R must lie on the boundary of a single face in R. Otherwise, c would have to straddle more than one face of R. 8
9
T ERMINOLOGY ( MORE ) 9
10
D EMOUCRON ’ S A LGORITHM Idea: we repeatedly extend a planar representation R of a subgraph of graph G until either R equals G or the procedure becomes blocked in which case G is nonplanar. 1) We start by taking R to be an arbitrary cycle from G 2) We then partition the remainder of G not yet included in R into parts of G relative to R and apply drawability condition. 3) We identify those faces of R in which p is potentially drawable, a path q through p, and add q to R by drawing it through f in a planar matter. 4) Process is blocked only if we find some part that doesn’t satisfy the drawability condition for any face in which case R is not planar extensible to G. 10
11
D ECOUCRON ’ S A LGORITHM P SEUDO - CODE Function Draw (G, R) (* Returns a planar representation of G in R) Var G: Graph R: Planar Representation p: Part P: set of Part f: Face F: Set of Face Draw: Boolean function Set Draw to True Set R to some cycle in G repeat Set P to the set of parts of R relative to G for each p in P do Set F(p) to the set of faces of R in which p is drawable if F(p) is empty for any p thenSet Draw to False 11
12
D ECOUCRON ’ S A LGORITHM P SEUDO - CODE 12
13
E XAMPLE OF CONSTRUCTION OF PATH 13
14
P LANAR G RAPH T HEORY 14
15
P LANAR G RAPH T HEORY ( CONT ’) 15
16
P LANAR G RAPH T HEORY ( CONT ’) 16
17
P LANAR G RAPH T HEORY ( CONT ’) 17
18
V ERTEX A DDITION A LGORITHM 18 From: Planar Graphs
19
D EFINITION OF S - T NUMBERING 19
20
D EPTH -F IRST S EARCH Start with arbitrary edge (t, s) Compute for each vertex its depth-first number DFN(v), its parent FATH(v) and its lowpoint LOW(v) Definition( Lowpoint) 20
21
DFS ALGORITHM Procedure DFS(G); procedure SEARCH(v) begin mark v “old”; DFN(v) := COUNT; COUNT := COUNT + 1; LOW(v) := DNF(v); for each vertex w on Adj(v) do if w is marked “new” then begin add (v,w) to T FATH(w):=v; SEARCH(w); LOW(v) := min{LOW(v), LOW(w)} end else if w is not FATH(v) then LOW(v) := min {LOW(v), DFN(w)} end; 21
22
P ARTITION EDGES TO PATHS 22
23
ST -N UMBERING Special nodes: source s (“1”) and sink t (“n”) “1” and “n” adjacent j V-{s,t}: i, k Adj(j) st(i)<st(j)<st(k) So 2 must be next to 1 and n-1 must be next to n 4 6 2 5 7 1 3 8 23
24
S OME ST - NUMBERING EXAMPLES 12 1 11 2 10 3 9 4 8 5 7 6 3 1 5 2 4 24
25
ST -N UMBERING Theorem: Every biconnected graph has an st-numbering Proof: We give an algorithm and show that it works if the graph is biconnected Our graph is biconnected, so an st-numbering exists. 25
26
F INDING AN ST - NUMBERING First step: standard DFS. Can visit children in any order Calculate and store per vertex: Parent “Depth first search number:” DFN Low-point: the lowest DFN among nodes that can be reached by a path using any amount of tree edges followed by 1 back edge 26
27
G 27
28
DFS G 28
29
1 2 3 4 5 6 DF N DFS G 29
30
1 2 3 4 5 6 DFN 1 1 1 1 3 3 LOW DFS G 30
31
F INDING AN ST - NUMBERING Push the vertices onto a stack and pop them off Four rules for what to push and pop Assign increasing numbers to the vertices when they are popped off for the last time Example follows 31
32
I NITIAL SETUP The node with DFN 2 is called the ‘source’ The node with DFN 1 is called the ‘sink’ Stack with source on top of sink Source and sink are “old” c f d b e a acac 32
33
R ULE “2” There is a “new” tree edge: follow it and take the path that leads to its low point Push the vertices on the path onto the stack Mark all as old. c f d b e a abcabc 33
34
N O MATCHES FOR VERTEX A There are now no rule matches for a. Pop it off the stack and give it the next available number This node is ready c f d b e 1 bcbc 34
35
R ULE “3” There is a “new” back edge into this node: from the other end, go back up tree edges to an “old” vertex Push the vertices on the path onto the stack Mark all as old c f d b e 1 bfedcbfedc 35
36
N O MATCHES FOR VERTEX B So the vertex is ready and gets its number c f d 2 e 1 fedcfedc 36
37
N O MATCHES FOR VERTEX F So the vertex is ready and gets its number c 3 d 2 e 1 edcedc 37
38
E T CETERA … 6 3 5 2 4 1 38
39
E XAMPLE OF S - T NUMBERING 39 1 2 3 4 5 6
40
B USH F ORM 40
41
E XAMPLE OF B USH FORM 41 st - numbering
42
PQ -T REE D ATA S TRUCTURE 42
43
E XAMPLE OF PQ - TREE 43 PQ -tree
44
V ERTEX A DDITION A LGORITHM 44 Lemma
45
T EMPLATE MATCHINGS 45
46
T EMPLATE MATCHINGS 46
47
T EMPLATE MATCHINGS 47
48
T EMPLATE MATCHINGS 48
49
PQ- TREE REDUCTION EXAMPLE 49
50
50
51
51
52
52
53
53
54
54
55
P LANARITY T ESTING A LGORITHM 55
56
E XAMPLE OF V ERTEX A DDITION A LGORITHM 56
57
E XAMPLE OF V ERTEX A DDITION A LGORITHM 57
58
E XAMPLE OF V ERTEX A DDITION A LGORITHM 58
59
E XAMPLE OF V ERTEX A DDITION A LGORITHM 59
60
E XAMPLE OF V ERTEX A DDITION A LGORITHM 60
61
E XAMPLE OF V ERTEX A DDITION A LGORITHM 61
62
E XAMPLE OF V ERTEX A DDITION A LGORITHM 62
63
E XAMPLE OF V ERTEX A DDITION A LGORITHM 63
64
E XAMPLE OF V ERTEX A DDITION A LGORITHM 64
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.