introduction to planarity test w. l. hsu. 2/21 plane graph a plane graph is a graph drawn in the...

21
Introduction to Planarity Test W. L. Hsu

Upload: baldric-allen

Post on 14-Dec-2015

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 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

Introduction to Planarity Test

W. L. Hsu

Page 2: 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

2/21

Plane Graph

• 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– Namely, it has a plane embedding

Page 3: 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

3/21

Planar Graphs

Page 4: 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

4/21

Planar Graph EmbeddingClockwise edge ordering

Page 5: 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

5/21

Issues in Planarity Test

• If you can find a planar embedding, then the graph is 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– 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

Page 6: 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

6/21

Basic Non-Planar Graphs

K5K3,3

Page 7: 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

7/21

Euler’s Theorem (1752)

• Euler’s theoremLet 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 3n – 6– First show that 3f 2m since every face is

bounded by at least 3 edges(# of edges is at least 3f / 2)

Page 8: 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

8/21

K5 and K3,3 are non-planar

• If K5 is planar, then by previous Corollary, we have 10 9.

• K3,3 is bipartite. Assume it is planar, then every face is even (has at least 4 edges). – Hence 4f 2m or 2f m .

• Do not adopt the previous Corollary directly• By Euler’s theorem, f = m + 2 – n = 9 + 2 – 6 = 5

– Namely, 10 = 2f m = 9.

Page 9: 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

9/21

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

• A graph is planar if and only if it contains no subgraph homeomorphic to K5 or K3,3

• The latter are referred to as Kuratowski subgraphs

Page 10: 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

Planarity Test

Page 11: 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

11/21

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.

• You will have to design an embedding “scheme” rather than obtain a “physical” (實體的 ) embedding

Page 12: 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

12/21

Prior Results• 1st approach

– Hopcroft and Tarjan [1974],first O(m) time. – PATH ADDITION

• 2nd approach– Lempel, Even and Cederbaum[1967], O(n2) 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

• 3rd approach– Shih and Hsu [1999] used PC-trees for recognition and

embedding. – EDGE ADDITION

Page 13: 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

A Brief Intro. to the Vertex Addition Approach of LEC

Page 14: 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

14/21

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

Page 15: 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

15/21

st-numbering (I)

• 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

s

sv(i)

v(i)

v(i+1)

v(i+1),…, t must be imbedded in the same face

t

tv(i+1)

Page 16: 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

16/21

St-numbering(II)

s v(i) t

s v(i) tv(i+1)

v(i+1)

Depth-First-SearchDepth-First-Search

s v(i) tv(i+1)

Page 17: 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

17/21

1=s

6=t 2 3 5 6 2 3 5(a) B1 (a’)

(b) B2 (b’)

1

2

6 3 54 53 6 3 54 53

Bush Form (1)

Page 18: 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

18/21

(c) B2’

1

2

6 354 53

(c’)

6 54 533

(d) B3

1

2

6 54 5

(d’)

6 54 5644 6

3

Bush Form (2)

Page 19: 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

19/21

(e) B3’

2

6 5 4 54 6

3

(e’)

6 5 4 564

(f’)

6 5 4 564

(f) B4

2

6 5 56

3

1

1

65

4

Bush Form (3)

Page 20: 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

20/21

(g) B4’

2

6 5 56

3

1

6 5

4

(g’)

6 5 56 6 5

(h’)

6 6 66

(h) B5

2

6 6

3

1

6

54

6

Bush Form (4)

Page 21: 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

21/21

(i) G=G6=B6

2

6

3

1

54

(i’)

Bush Form (5)