Planarity Testing - PowerPoint PPT Presentation

About This Presentation
Title:

Planarity Testing

Description:

PLANARITY TESTING. OVERVIEW. Definitions. Menger's Theorem. Ear Decomposition Lemma. Pieces ... DFS tree. MENGER'S THEOREM (1927) ... – PowerPoint PPT presentation

Number of Views:165
Avg rating:3.0/5.0
Slides: 27
Provided by: ayeletd
Category:
Tags: dfs | planarity | testing

less

Transcript and Presenter's Notes

Title: Planarity Testing


1
Planarity Testing
2
Overview
  • Definitions
  • Mengers Theorem
  • Ear Decomposition Lemma
  • Pieces
  • Planarity Testing Algorithm
  • Complexity O(n )

3
Well only discuss connected undirected graphs
3
Definitions
  • Cut vertex
  • Cut edge
  • Block
  • Two blocks share at most one vertex cut-vertex

Connected Components
1
3
Connected Components
1
2
4
DFS
  • Depth First Search
  • Use the DFS tree to find Blocks

G
DFS tree
5
Mengers Theorem (1927)
  • k-connected deleting (k-1) vertices cannot
    disconnect it (V(G) gt k).
  • Corollary (Dirac 1960)
  • G is 2-connected ? G consists of a single block

6
ST-Ordering
  • Numbering - v1, v2, ... , vn of V(G) so that
  • (v1, vn) E(G)
  • vi has a neighbor vj where j lt i
  • vi also has a neighbor vk where i lt k
    (for every i , 1 lt i lt n)
  • G admits an st-ordering ? G is 2-connected

Well prove it soon
7
Ear Decomposition Lemma
  • Every 2-connected graph can be obtained from a
    cycle by adding paths
  • For each path
  • Both end points are on the current graph
  • But otherwise it is disjoint from it
  • Proof
  • Gi G, Gi ? G the current graph.
  • Pick u V(Gi) , v V(Gi) such that (u, v)
    E(G) and connect v to Gi by a shortest path.

8
G admits an st-ordering ? G is 2-connected
  • G is 2-connected
  • Use induction on E(G)
  • Show G admits st-ordering with
  • v1 u, v2, ... , vn v (u, v) E(G)
  • Pick a cycle C through (u, v)
  • Base
  • G C
  • trivial

u
v
(v5)
(v1)
v2
v4
v3
9
Continued
  • C ? G

u
v
(v5)
(v1)
G
G0 C
10
Continued
  • C ? G
  • Add a path to it as in the ear decomposition
  • Number the paths vertices so they form an
    increasing chain connecting its endpoints

u
v
(v5)
(v1)
G0 C
G1
v4
v3
Shortest path
11
Continued
  • C ? G
  • Add a path to it as in the ear decomposition
  • Number the paths vertices so they form an
    increasing chain connecting its endpoints

u
v
(v5)
(v1)
G1
G2
v2
v4
v3
12
Pieces
  • G is 2-connected
  • C is a cycle in G
  • Pieces
  • C is Separating

P2
P1
P3
13
Pieces
  • Pieces can be drawn on either side of C

P2
P1
P3
14
Pieces
  • Pieces can be drawn on either side of C

P2
P1
P3
15
Pieces
  • Pieces can be drawn on either side of C

P2
P1
P3
16
Pieces
  • Pieces can be drawn on either side of C

P2
P1
P3
17
Pieces
  • Two pieces Interlace or Conflict if they cannot
    be drawn on the same side of C without crossing
    edges
  • When does this happen?

P2
G
G
a1
Cyclic order a1, b1, a3, b3
P1
a2
b1
b3
P3
a3
b2
18
Pieces
  • G might be a planar graph

P2
G
P1
P3
19
Pieces
  • G might be a planar graph
  • If one of the conflicting pieces can be drawn on
    the other side of C

P2
G
P1
P3
20
Our Goal
  • Find 2 sets (S1, S2) of pieces so that
  • No two pieces in the same set conflict
  • S1 S2 C G

n
n
P2
G
S1 P1, P2 S2 P3
P1
P3
21
Interlacement Graph
  • Vertex set the set of pieces (with respect to
    C)
  • Two vertices are connected ? the pieces interlace

Interlacement(G, C)
P2
G
P1
P3
22
Is G planar?
  • G 2-connected graph with cycle C
  • G is planar ?
  • For each piece P (with respect to C)
  • P C is a planar graph
  • The Interlacement graph is bipartite
    (2-colorable)

n
23
Why?
P2
Interlacement(G, C)
G
S1
P1
S2
If Interlacement(G, C) is bipartite, we can
divide the pieces to 2 sets - like we wanted
P3
24
Why?
  • Each piece combined with C is a planar graph
  • And we can assemble all the pieces together so
    that they dont interlace
  • So G is planar

25
Planarity Testing Recursive Algorithm
  • G 2-connected graph with
  • n vertices
  • O(n) edges
  • C is a cycle in G
  • The Algorithm
  • Find pieces with respect to C
  • Build interlace graph
  • Check if it is bipartite
  • Check planarity for Cs pieces (recursively)

(
)
O(n)



O(n)
26
Questions?
Write a Comment
User Comments (0)
About PowerShow.com