Introduction to Planarity Test W. L. Hsu. Plane Graph A plane graph is a graph drawn in the plane in such a way that no two edges intersect A plane graph.

Slides:



Advertisements
Similar presentations
Trees Chapter 11.
Advertisements

Testing planarity part 1 Thomas van Dijk. Preface Appendix of Planar Graph Drawing Quite hard to read So we’ll try to explain it, not just tell you about.
Divide and Conquer. Subject Series-Parallel Digraphs Planarity testing.
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,
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
CompSci 102 Discrete Math for Computer Science April 19, 2012 Prof. Rodger Lecture adapted from Bruce Maggs/Lecture developed at Carnegie Mellon, primarily.
Graph Theory Chapter 9 Planar Graphs 大葉大學 資訊工程系 黃鈴玲.
Graph Drawing Introduction 2005/2006. Graph Drawing: Introduction2 Contents Applications of graph drawing Planar graphs: some theory Different types of.
Applied Combinatorics, 4th Ed. Alan Tucker
Computational Geometry Seminar Lecture 1
Tucker, Applied Combinatorics, Section 1.4, prepared by Patti Bodkin
Straight line drawings of planar graphs – part I Roeland Luitwieler.
Drawing of G. Planar Embedding of G Proposition Proof. 1. Consider a drawing of K 5 or K 3,3 in the plane. Let C be a spanning cycle. 2. If the.
1 PQ Trees, PC Trees, and Planar Graphs Hsu & McConnell Presented by Roi Barkan.
Graph Theory Chapter 6 Planar Graphs Ch. 6. Planar Graphs.
Subdivision of Edge In a graph G, subdivision of an edge uv is the operation of replacing uv with a path u,w,v through a new vertex w.
Flow and Upward Planarity
A Test for the Consecutive Ones Property 1/39. Outline Consecutive ones property PQ-trees Template operations Complexity Analysis –The most time consuming.
Finding maximal planar subgraphs Wen-Lian Hsu 1/33.
5.5.3 Rooted tree and binary tree  Definition 25: A directed graph is a directed tree if the graph is a tree in the underlying undirected graph.  Definition.
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.
15-853Page :Algorithms in the Real World Planar Separators I & II – Definitions – Separators of Trees – Planar Separator Theorem.
Planar Graphs Graph Coloring
Introduction to Planarity Test W. L. Hsu. 2/21 Plane Graph A plane graph is a graph drawn in the plane in such a way that no two edges intersect –Except.
VLSI Layout Algorithms CSE 6404 A 46 B 65 C 11 D 56 E 23 F 8 H 37 G 19 I 12J 14 K 27 X=(AB*CD)+ (A+D)+(A(B+C)) Y = (A(B+C)+AC+ D+A(BC+D)) Dr. Md. Saidur.
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
Stefan Felsner planar graph G planar embedding of G A graph G is planar if it can be drawn on the plane with no crossing edges.
An Introduction to Graph Theory
Chap. 11 Graph Theory and Applications 1. Directed Graph 2.
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
PC-Trees & PQ-Trees. 2 Table of contents Review of PQ-trees –Template operations Introducing PC-trees The PC-tree algorithm –Terminal nodes –Splitting.
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.
S&H Planarity Test Based on PC-Trees Wen-Lian Hsu.
PC-Trees vs. PQ-Trees. 2 Table of contents Review of PQ-trees –Template operations Introducing PC-trees The PC-tree algorithm –Terminal nodes –Splitting.
Interval Graph Test Wen-Lian Hsu.
COMPSCI 102 Introduction to Discrete Mathematics.
Chapter 7 Planar Graphs 大葉大學 資訊工程系 黃鈴玲  7.2 Planar Embeddings  7.3 Euler’s Formula and Consequences  7.4 Characterization of Planar Graphs.
1/44 A simple Test For the Consecutive Ones Property Without PC-trees!
PC-Trees Based on a paper by Hsu and McConnell. Talk Outline We Define the consecutive ones and circular ones problems We show PQ Trees – the traditional.
PC-Trees & PQ-Trees. 2 Table of contents Review of PQ-trees –Template operations Introducing PC-trees The PC-tree algorithm –Terminal nodes –Splitting.
Graphs. Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The.
Algorithms and Networks
Great Theoretical Ideas In Computer Science
Outline 1 Properties of Planar Graphs 5/4/2018.
Great Theoretical Ideas In Computer Science
Applied Combinatorics, 4th Ed. Alan Tucker
Introduction to Trees Section 11.1.
PC trees and Circular One Arrangements
Algorithms and Complexity
Planarity Testing.
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.
Planarity Cox, Sherman, Tong.
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.
Lectures on Graph Algorithms: searching, testing and sorting
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.
MAT 2720 Discrete Mathematics
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
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.
Planarity.
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:

Introduction to Planarity Test W. L. Hsu

Plane Graph A plane graph is a graph drawn in the plane in such a way that no two edges intersect A plane graph is a graph drawn in the plane in such a way that no two edges intersect – Except at a vertex to which they are both incident A planar graph is one which is isomorphic to a plane graph A planar graph is one which is isomorphic to a plane graph – Namely, it has a plane embedding

Planar Graphs

Planar Graph Embedding Clockwise edge ordering

Issues in Planarity Test If you can find a planar embedding, then the graph is planar. If you can find a planar embedding, then the graph is planar. How do you determine if a graph is not planar? How do you determine if a graph is not planar? This is the more difficult part of many recognition algorithm, namely, deciding when a graph “does not” belong to a class This is the more difficult part of many recognition algorithm, namely, deciding when a graph “does not” belong to a class – Get a certificate for non-planar graphs – Or alternatively, you have tried all possible ways but still fail to embed the graph in the plane (proof by exhaustion) – Use counting argument

Basic Non-Planar Graphs K5K5 K 3,3

Euler’s Theorem (1752) Euler’s theorem Euler’s theorem Let G be a connected plane graph, and let f be the # of faces of G. Then n + f = m + 2 – Prove by induction on the # of edges. Corollary. m  3 n – 6 Corollary. m  3 n – 6 – First show that 3f  2m since every face is bounded by at lest 3 edges

K 5 and K 3,3 are non-planar If K 5 is planar, then by previous Corollary, we have 10  9.  If K 5 is planar, then by previous Corollary, we have 10  9.  K 3,3 is bipartite. Assume it is planar, then every face is even (has at least 4 edges). K 3,3 is bipartite. Assume it is planar, then every face is even (has at least 4 edges). – Hence 4 f  2 m. – Namely, 10 = 2 f  m = 9. 

Kuratowski’s Theorem Two graphs are homeomorphic if they can be obtained from the same graph by inserting new vertices of degree 2 into its edges Two graphs are homeomorphic if they can be obtained from the same graph by inserting new vertices of degree 2 into its edges A graph is planar if and only if it contains no subgraph homeomorphic to K 5 or K 3,3 A graph is planar if and only if it contains no subgraph homeomorphic to K 5 or K 3,3 The latter are referred to as Kuratowski subgraphs The latter are referred to as Kuratowski subgraphs

Planarity Test

How do you draw a planar graph without regret ? This means that, besides keeping the current embedding planar, your embedding can also keep future options open. This means that, besides keeping the current embedding planar, your embedding can also keep future options open. You will have to design an embedding “scheme” rather than obtain a “physical” ( 實體的 ) embedding You will have to design an embedding “scheme” rather than obtain a “physical” ( 實體的 ) embedding

Prior Results 1st approach 1st approach – Hopcroft and Tarjan [1974],first O(m) time. – PATH ADDITION 2nd approach 2nd approach – Lempel, Even and Cederbaum[1967], O(n 2 ) time – VERTEX ADDITION – st-numbering, consecutive ones testing – Booth and Lueker [1976] used PQ-trees to test the consecutive ones property in O(m+n) time consecutive ones property in O(m+n) time 3rd approach 3rd approach – Shih and Hsu [1999] used PC-trees for recognition and embedding. – EDGE ADDITION

A Brief Intro. to the Vertex Addition Approach of LEC

Vertex Addition Approach of LEC 1. Keep the current partial planar graph connected 2. Keep those non-added vertices a connected subgraph (i.e. in the same face). 3. Apply a consecutive ones test every time a new vertex is added

st-numbering (I) Consider a 2-connected graph G. Pick any two adjacent vertices s and t. Consider a 2-connected graph G. Pick any two adjacent vertices s and t. Order the vertices of G into s, v(1),..., v(k), t such that Order the vertices of G into s, v(1),..., v(k), t such that s s v(i)v(i) v(i)v(i) v(i+1) v(i+1),…, t must be imbedded in the same face t t

St-numbering(II) s v(i)v(i) t s v(i)v(i) t v(i+1) Depth-First-Search s v(i)v(i) t

1=s 6=t (a) B 1 (a’) (b) B 2 (b’) Bush Form (1)

(c) B 2 ’ (c’) (d) B (d’) Bush Form (2)

(e) B 3 ’ (e’) (f’) (f) B Bush Form (3)

(g) B 4 ’ (g’) (h’) 6666 (h) B Bush Form (4)

(i) G=G 6 =B (i’) Bush Form (5)

Introducing PQ-Trees

23/30 PQ-trees and the consecutive ones property (COP) PQ-trees can record all feasible permutations of the column indices Q P Q COP : Can one permute the columns such that the ones in each row are consecutive ?

24/30 Linear time algorithm on PQ-trees [1974] Booth and Lueker presented a linear time algorithm for the COP test based on PQ-trees [1974] Booth and Lueker presented a linear time algorithm for the COP test based on PQ-trees – Process the matrix one row at a time PQ-tree can also be used to yield a linear time algorithm for interval graph recognition and planar graph recognition. PQ-tree can also be used to yield a linear time algorithm for interval graph recognition and planar graph recognition.

25/30 Operations on PQ-trees (I) Booth and Lueker’s algorithm is a bottom-up approach consisting of two stages: Booth and Lueker’s algorithm is a bottom-up approach consisting of two stages: – 1. Node labeling Node labelingNode labeling The leaves of the incoming row are labeled full, all the other leaves are empty. the remaining nodes are labeled The leaves of the incoming row are labeled full, all the other leaves are empty. the remaining nodes are labeled empty : all of its children are empty empty : all of its children are empty full : all of its children are full full : all of its children are full partial : neither full nor empty partial : neither full nor empty – 2. Tree modification Tree modificationTree modification

26/30 Operations on PQ-trees (II): 1. Node labeling The first time a node u becomes partial or full report to its parent. The first time a node u becomes partial or full report to its parent. The first time a node u gets a partial or full child label u partial. The first time a node u gets a partial or full child label u partial. The first time all children of a node u become full label u full. The first time all children of a node u become full label u full.

27/30 Operations on PQ-trees (III): 2. Tree modification Need to modify the current tree so that all the incoming columns can be arranged consecutively. Need to modify the current tree so that all the incoming columns can be arranged consecutively. Modify the subtree of every partial node Modify the subtree of every partial node – At each iteration, modify the subtree of a partial node starting from the lowest level of the tree The subtree modification is based on 9 templates of subtree structures. The subtree modification is based on 9 templates of subtree structures.

28/30... Template P2 for ROOT (T,S) when it is a P-node

29/30... Template P3 for a singly partial P- node which is not ROOT (T,S)

30/30... Template P4 for ROOT(T,S) when it is a P-node with one partial child...

31/30 Template P5 for a singly partial P-node, other than ROOT(T,S), with one partial child...

32/30 Template P6 for ROOT(T,S) when it is a doubly partial P-node...

33/30... Template Q2 for a singly partial Q- node

34/30 Template Q3 for a double partial Q- node...

35/30 Time complexity of the original PQ-tree operations Node labeling takes time proportional to the number of incoming columns. Node labeling takes time proportional to the number of incoming columns. Subtree modification needs to change many parent-children relationships Subtree modification needs to change many parent-children relationships – use amortized analysis to argue that it takes constant time at every iteration. – this analysis is quite involved. Does not render a direct algorithm for testing the circular ones property Does not render a direct algorithm for testing the circular ones property – Complement a row