planarity embedding
play

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


  1. Planarity

  2. 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 2 1 3 0 3 0 2 4 4 0 3 5 3 4 5 1 4 2 / 18

  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

  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 = { e 1 , e 2 , . . . , e m } ( m = | E | ) ◮ E i = { e 1 , e 2 , . . . , e i } ◮ G i is the graph induced by E i . G i is connected. ◮ f i and v i are number of faces and vertices of G i . Note that | E i | = i . Induction over i ◮ Base Case. True for a graph with one vertex and for G 1 . 4 / 18

  5. Euler’s Formula ◮ Adding a new vertex. There is no new face. Thus, f i + 1 = f i = i + 1 − v i − 1 + 2 = i + 1 − v i + 1 + 2 . ◮ Connecting existing vertices u and v . Both vertices are in the same face and, because G i is connected, there is an existing path from u to v in G i . Thus, adding the edge e i + 1 = uv splits a face into two faces. Therefore, f i + 1 = f i + 1 = i + 1 − v i + 2 = i + 1 − v i + 1 + 2 . � 5 / 18

  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, 3 f = 3 m − 3 n + 6 ≤ 2 m and m ≤ 3 n − 6 . � Therefore, for planar graphs, | E | ∈ O ( | V | ) . Graphs with | E | ∈ O ( | V | ) are called sparse . 6 / 18

  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 K 5 or K 3 , 3 as a minor. K 3 , 3 K 5 7 / 18

  8. Doubly-Connected Edge List Idea ◮ Data Structure for planar graphs ◮ Table with one row for each edge. A row for an edge e i contains ◮ V 1 and V 2 , the vertices of e i . ◮ F 1 and F 2 , the faces on the left and right side of e i . ◮ P 1 , the next edge e j when proceeding counter-clockwise from e i around V 1 . ◮ P 2 , the next edge e k when proceeding counter-clockwise from e i around V 2 . 8 / 18

  9. Doubly-Connected Edge List – Example V 1 V 2 F 1 F 2 P 1 P 2 1 2 e 1 b a e 4 e 2 1 e 1 e 6 2 3 e 2 b a e 1 e 5 e 4 2 5 0 3 e 3 c b e 6 e 2 b d 0 0 1 e 4 b d e 3 e 6 e 7 e 2 e 3 e 6 e 5 3 4 c a e 3 e 7 c e 5 3 4 e 6 0 4 d c e 4 e 5 a e 7 4 5 d a e 6 e 6 e 8 1 5 a d e 1 e 7 9 / 18

  10. Recognising Planar Graphs

  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 σ = � v 1 , v 2 , . . . , v n � with V i = { v 1 , v 2 , . . . , v i } ◮ Requirement: G i = G [ V i ] and G [ V \ V i ] are connected. ◮ Usually more requirements for σ (depending on the algorithm). ◮ General algorithm: Check if G i is planar, add v i + 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

  12. The Lempel-Even-Cederbaum Algorithm Idea ◮ Find st -ordering � s = v 1 , v 2 , . . . , v n = t � of vertices. ◮ Step by step add vertices and check if G i 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

  13. The Lempel-Even-Cederbaum Algorithm Bush-Form ◮ For each edge uv with u ∈ G i and v / ∈ G i , add a virtual vertex x and edge ux . Note: a vertex v / ∈ G i might have multiple virtual vertices x . ◮ If x is virtual vertex for v , ψ ( x ) = ψ ( v ) . ◮ Resulting graph is denoted as B i Algorithm-Iteration ◮ Given: planar embedding for G i ◮ Create B i 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 v i + 1 and add it to G i . This gives G i + 1 . The algorithm can be implemented to output a planar embedding and run in linear time. 13 / 18

  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

  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

  16. Left-Right Partition Observation ◮ Fundamental cycles are either left or right oriented. 16 / 18

  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 e 1 and e 2 , ◮ all return edges of e 1 ending strictly higher than low ( e 2 ) belong to one class and ◮ all return edges of e 2 ending strictly higher than low ( e 1 ) belong to the other class. Here, a vertex u is higher than a vertex v if u is a descendant of v . 17 / 18

  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 of 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

Recommend


More recommend