Planarity Embedding Embedding For a given graph G = ( V , E ) , an - - PowerPoint PPT Presentation

planarity embedding
SMART_READER_LITE
LIVE PREVIEW

Planarity Embedding Embedding For a given graph G = ( V , E ) , an - - PowerPoint PPT Presentation

Planarity Embedding Embedding For a given graph G = ( V , E ) , an embedding (into R 2 ) assigns each vertex a coordinate and each edge a (not necessarily straight) line connecting the corresponding coordinates. 0 1 3 4 1 1 0 2 5 2 5


slide-1
SLIDE 1

Planarity

slide-2
SLIDE 2

Embedding

Embedding For a given graph G = (V, E), an embedding (into R2) assigns each vertex a coordinate and each edge a (not necessarily straight) line connecting the corresponding coordinates.

1 2 3 4 5 1 2 3 4 5 1 3 4 2 5 1 3 2 4 3 5 1 4

2 / 18

slide-3
SLIDE 3

Planar Graph

Planar Embedding An embedding is planar if lines representing edges only intersect in their endpoints, i. e., they only cross if they have a common vertex and only at this vertex. Planar Graph A graph G is planar if there is a planar embedding for G. A planar embedding partitions the space into areas. These areas are called faces.

3 / 18

slide-4
SLIDE 4

Euler’s Formula

Theorem For a connected planar graph G = (V, E), let F be the set of faces for some planar embedding. Then, |F| = |E| − |V| + 2. Proof.

◮ E = {e1, e2, . . . , em} (m = |E|) ◮ Ei = {e1, e2, . . . , ei} ◮ Gi is the graph induced by Ei. Gi is connected. ◮ fi and vi are number of faces and vertices of Gi. Note that |Ei| = i.

Induction over i

◮ Base Case. True for a graph with one vertex and for G1.

4 / 18

slide-5
SLIDE 5

Euler’s Formula

◮ Adding a new vertex. There is no new face. Thus,

fi+1 = fi = i + 1 − vi − 1 + 2 = i + 1 − vi+1 + 2.

◮ Connecting existing vertices u and v. Both vertices are in the same

face and, because Gi is connected, there is an existing path from u to v in Gi. Thus, adding the edge ei+1 = uv splits a face into two

  • faces. Therefore,

fi+1 = fi + 1 = i + 1 − vi + 2 = i + 1 − vi+1 + 2.

  • 5 / 18
slide-6
SLIDE 6

Euler’s Formula

Theorem For a connected planar graph G = (V, E) with at least three vertices, |E| ≤ 3|V| − 6.

  • Proof. Let f be the number of faces in a planar embedding of G, m = |E|,

and n = |V|. As shown before, f = m − n + 2. Each face has at least three edges and each edge belongs to at most two

  • faces. Thus,

3f = 3m − 3n + 6 ≤ 2m and m ≤ 3n − 6.

  • Therefore, for planar graphs, |E| ∈ O(|V|). Graphs with |E| ∈ O(|V|) are

called sparse.

6 / 18

slide-7
SLIDE 7

Minor

Minor A graph H is called a minor of a graph G if H can be formed from G by removing vertices, removing edges, and by contracting edges. Theorem A graph is planar if and only if it does not have K5 or K3,3 as a minor. K3,3 K5

7 / 18

slide-8
SLIDE 8

Doubly-Connected Edge List

Idea

◮ Data Structure for planar graphs ◮ Table with one row for each edge.

A row for an edge ei contains

◮ V1 and V2, the vertices of ei. ◮ F1 and F2, the faces on the left and right side of ei. ◮ P1, the next edge ej when proceeding counter-clockwise from ei

around V1.

◮ P2, the next edge ek when proceeding counter-clockwise from ei

around V2.

8 / 18

slide-9
SLIDE 9

Doubly-Connected Edge List – Example

e4 e3 e6 e1 e2 e5 e7 e6

1 2 3 4 5

a b c d V1 V2 F1 F2 P1 P2 e1 1 2 b a e4 e2 e2 2 3 b a e1 e5 e3 3 c b e6 e2 e4 1 b d e3 e6 e5 3 4 c a e3 e7 e6 4 d c e4 e5 e7 4 5 d a e6 e6 e8 1 5 a d e1 e7

9 / 18

slide-10
SLIDE 10

Recognising Planar Graphs

slide-11
SLIDE 11

General Techniques

Common technique

◮ Split graph into blocks (2-connected components). ◮ A graph is planar if an only if each block is planar.

Vertex Addition

◮ Have vertex ordering σ = v1, v2, . . . , vn with Vi = {v1, v2, . . . , vi} ◮ Requirement: Gi = G[Vi] and G[V \ Vi] are connected. ◮ Usually more requirements for σ (depending on the algorithm). ◮ General algorithm: Check if Gi is planar, add vi+1, repeat.

Cycle-Based

◮ Each cycle divides area in two parts. ◮ Every other path is completely inside or outside. ◮ Idea: find cycle, decide which vertices are inside and outside,

recursively repeat.

11 / 18

slide-12
SLIDE 12

The Lempel-Even-Cederbaum Algorithm

Idea

◮ Find st-ordering s = v1, v2, . . . , vn = t of vertices. ◮ Step by step add vertices and check if Gi is planar.

st-ordering

◮ Bijective function ψ: V → {1, 2, . . . , n} ◮ s, t ∈ V and st ∈ E ◮ ψ(s) = 1, ψ(t) = n ◮ For each v /

∈ {s, t}, there exist u, w with uv, vw ∈ E and ψ(u) < ψ(v) < ψ(w).

◮ Can be found in linear time (Even, Tarjan 1972).

12 / 18

slide-13
SLIDE 13

The Lempel-Even-Cederbaum Algorithm

Bush-Form

◮ For each edge uv with u ∈ Gi and v /

∈ Gi, add a virtual vertex x and edge ux. Note: a vertex v / ∈ Gi might have multiple virtual vertices x.

◮ If x is virtual vertex for v, ψ(x) = ψ(v). ◮ Resulting graph is denoted as Bi

Algorithm-Iteration

◮ Given: planar embedding for Gi ◮ Create Bi such that all x vertices are on layer i + 1. ◮ Partition x vertices in three non-overlapping groups X, Y, and Z such

that no virtual edges cross and x ∈ X if and only if ψ(x) = i + 1.

◮ Merge X together to create vi+1 and add it to Gi. This gives Gi+1.

The algorithm can be implemented to output a planar embedding and run in linear time.

13 / 18

slide-14
SLIDE 14

Cycle/Path based algorithm

by de Fraysseix, Ossona de Mendez, Rosenstiehl 2006 Given a graph G = (V, T ⊎ B) where T are tree edges of a DFS-tree and B are back edges.

14 / 18

slide-15
SLIDE 15

Left-Right Partition

Definitions Given a graph G = (V, T ⊎ B).

◮ Each back edge implicitly defines a cycle, called fundamental cycle. ◮ A back edge uv is a return edge for each tree edge of its

fundamental cycle, with the exception of the first tree edge exiting v.

◮ For two vertices u and v, u ≤ v if and only if pre(u) ≤ pre(v). ◮ The lowpoint low(v) of a vertex v is defined as

low(v) := min{ w | uw ∈ B, u is descendant of v}.

◮ The lowpoint low(uv) of an edge uv is defined as

low(uv) := min(low(v), u).

15 / 18

slide-16
SLIDE 16

Left-Right Partition

Observation

◮ Fundamental cycles are either left or right oriented.

16 / 18

slide-17
SLIDE 17

Left-Right Partition

LR-Partition For a given graph G = (V, T ⊎ B), a partition B = L ⊎ R of its back edges into two classes, called left and right edges, is called left-right partition, if, for every vertex v with incoming tree edge e and outgoing edges e1 and e2,

◮ all return edges of e1 ending strictly higher than low(e2) belong to

  • ne class and

◮ all return edges of e2 ending strictly higher than low(e1) belong to

the other class.

Here, a vertex u is higher than a vertex v if u is a descendant of v.

17 / 18

slide-18
SLIDE 18

Left-Right Partition

Theorem A graph is planar if and only if it admits an LR-partition. Proof (Outline). → Straightforward for a given planar embedding. ← Construct an embedding from a given LR-partition. Step by step assign orientation to tree edges and determine orderings and nesting

  • f edges (complicated).

Leads to linear time algorithm. For more, see Handbook of Graph Drawing and Visualization, Chapter 1. (https://cs.brown.edu/∼rt/gdhandbook/chapters/planarity.pdf)

18 / 18