View
44
Download
0
Category
Preview:
DESCRIPTION
Planarity Testing. Overview. Definitions Menger’s Theorem Ear Decomposition Lemma Pieces Planarity Testing Algorithm Complexity O(n ). 3. * We’ll only discuss connected undirected graphs. Definitions. Cut vertex Cut edge Block Two blocks share at most one vertex – cut-vertex. - PowerPoint PPT Presentation
Citation preview
PLANARITY TESTING
OVERVIEW
o Definitions
o Menger’s Theorem
o Ear Decomposition Lemma
o Pieces
o Planarity Testing Algorithm
o Complexity O(n )
* We’ll only discuss connected undirected graphs
3
DEFINITIONS
Cut vertex
Cut edge
Block
Two blocks share at most one vertex – cut-vertex
Connected Components:
Connected Components:
13
12
Depth First Search
Use the DFS tree to find Blocks
DFS
G
3 4
5
767
12
DFS tree
MENGER’S THEOREM (1927)
k-connected – deleting (k-1) vertices cannot disconnect it (|V(G)| >= k).
Corollary (Dirac 1960) –
G is 2-connected G consists of a single block
G is k-connected Any k vertices of G lie on a simple cycle
G is k-connected Any pair u, v V(G) can be connected by k vertex-disjoint paths.
ST-ORDERING
Numbering - v1, v2, ... , vn of V(G) so that (v1, vn) E(G) vi has a neighbor vj where j < i vi also has a neighbor vk where i < k
(for every i , 1 < i < n)
G admits an st-ordering G is 2-connected
We’ll prove it soon
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.
EAR DECOMPOSITION LEMMA
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
G ADMITS AN ST-ORDERING G IS 2-CONNECTED
u v
v2
v3
v4
(v5)(v1)
C ≠ G
CONTINUED
u v (v5)(v1)GG0 = C
C ≠ G Add a path to it as in the ear decomposition Number the path’s vertices so they form an
increasing chain connecting its endpoints
CONTINUED
u v (v5)(v1)
Shortest path
v3
v4
G0 = CG1
C ≠ G Add a path to it as in the ear decomposition Number the path’s vertices so they form an
increasing chain connecting its endpoints
CONTINUED
u v (v5)(v1)
v3
v4
v2
G1G2
G is 2-connected C is a cycle in G Pieces
C is Separating
PIECES
P1
P2
P3
Pieces can be drawn on either side of C
PIECES
P2
P1
P3
Pieces can be drawn on either side of C
PIECES
P2
P1
P3
Pieces can be drawn on either side of C
PIECES
P2
P1
P3
Pieces can be drawn on either side of C
PIECES
P2
P1
P3
Two pieces Interlace or Conflict if they cannot be drawn on the same side of C without crossing edges
When does this happen?
PIECES
P2
P1
P3
GG’a1
b1
a3
b3
Cyclic order: a1, b1, a3, b3
a2
b2
G’ might be a planar graph
PIECES
P2
P1
P3
G’
G’ might be a planar graph If one of the conflicting pieces can be drawn
on the other side of C
PIECES
P2
P1
P3
G’
Find 2 sets (S1, S2) of pieces so that: No two pieces in the same set conflict S1 S2 C = G
OUR GOAL
P2
P1
P3
G
∩ ∩
S1 = {P1, P2}S2 = {P3}
INTERLACEMENT GRAPH
Vertex set – the set of pieces (with respect to C)
Two vertices are connected the pieces interlace
P2
P1
P3
G
Interlacement(G, C):
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)
∩
WHY?
P2
P1
P3
G Interlacement(G, C):
If Interlacement(G, C) is bipartite, we can divide the pieces to 2 sets -
like we wanted
S1
S2
WHY?
Each piece combined with C is a planar graph And we can assemble all the pieces together
so that they don’t interlace So G is planar
(
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 C’s pieces (recursively)
PLANARITY TESTING RECURSIVE ALGORITHM
O(n)
O(n)
O(n )2
O(n )2
+
+ )*
Total Cost = O(n )3
Questions?
Recommended