Straight line drawings of planar graphs – part II Roeland Luitwieler.

Slides:



Advertisements
Similar presentations
Rahnuma Islam Nishat Debajyoti Mondal Md. Saidur Rahman Graph Drawing and Information Visualization Laboratory Department of Computer Science and Engineering.
Advertisements

Octagonal Drawing Johan van Rooij. Overview What is an octagonal drawing Good slicing graphs Octagonal drawing algorithm for good slicing graphs Correctness.
Graphs - II Algorithms G. Miller V. Adamchik CS Spring 2014 Carnegie Mellon University.
Planar Graphs: Coloring and Drawing
Circuit and Communication Complexity. Karchmer – Wigderson Games Given The communication game G f : Alice getss.t. f(x)=1 Bob getss.t. f(y)=0 Goal: Find.
Map-making as Graph Drawing Alan Saalfeld Mathematical Cartographer.
UNC Chapel Hill Lin/Foskey/Manocha Steps in DP: Step 1 Think what decision is the “last piece in the puzzle” –Where to place the outermost parentheses.
Orthogonal Drawing Kees Visser. Overview  Introduction  Orthogonal representation  Flow network  Bend optimal drawing.
Divide and Conquer. Subject Series-Parallel Digraphs Planarity testing.
Planar Orientations Chapter 4 ( ) in the book Written By: Tomer Heber.
Map Overlay Algorithm. Birch forest Wolves Map 1: Vegetation Map 2: Animals.
Convex drawing chapter 5 Ingeborg Groeneweg. Summery What is convex drawing What is convex drawing Some definitions Some definitions Testing convexity.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
Applications of Euler’s Formula for Graphs Hannah Stevens.
Brute-Force Triangulation
Krakow, Summer 2011 Schnyder’s Theorem and Relatives William T. Trotter
Seminar Graph Drawing H : Introduction to Graph Drawing Jesper Nederlof Roeland Luitwieler.
Tirgul 8 Graph algorithms: Strongly connected components.
1 Constructing Convex 3-Polytopes From Two Triangulations of a Polygon Benjamin Marlin Dept. of Mathematics & Statistics McGill University Godfried Toussaint.
Steps in DP: Step 1 Think what decision is the “last piece in the puzzle” –Where to place the outermost parentheses in a matrix chain multiplication (A.
Great Theoretical Ideas in Computer Science.
Data Structures, Spring 2004 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
Rectangular Drawing (continue) Harald Scheper. Overview algorithm (directions) algorithm in linear time outline of algorithm (placement) Rect. Drawings.
Graph Drawing Introduction 2005/2006. Graph Drawing: Introduction2 Contents Applications of graph drawing Planar graphs: some theory Different types of.
Convex Grid Drawings of 3-Connected Plane Graphs Erik van de Pol.
What is the next line of the proof? a). Let G be a graph with k vertices. b). Assume the theorem holds for all graphs with k+1 vertices. c). Let G be a.
Computational Geometry Seminar Lecture 4 More on straight-line embeddings Gennadiy Korol.
Computational Geometry Seminar Lecture 1
Definition Hamiltonian graph: A graph with a spanning cycle (also called a Hamiltonian cycle). Hamiltonian graph Hamiltonian cycle.
Straight line drawings of planar graphs – part I Roeland Luitwieler.
Computing the Delaunay Triangulation By Nacha Chavez Math 870 Computational Geometry; Ch.9; de Berg, van Kreveld, Overmars, Schwarzkopf By Nacha Chavez.
Chapter 4: Straight Line Drawing Ronald Kieft. Contents Introduction Algorithm 1: Shift Method Algorithm 2: Realizer Method Other parts of chapter 4 Questions?
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
Data Structures, Spring 2006 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
Rectangular Drawing Imo Lieberwerth. Content Introduction Rectangular Drawing and Matching Thomassen’s Theorem Rectangular drawing algorithm Advanced.
What is the next line of the proof? a). Assume the theorem holds for all graphs with k edges. b). Let G be a graph with k edges. c). Assume the theorem.
Curve Curve: The image of a continous map from [0,1] to R 2. Polygonal curve: A curve composed of finitely many line segments. Polygonal u,v-curve: A polygonal.
Brute-Force Triangulation
Graph Theory Ch6 Planar Graphs. Basic Definitions  curve, polygon curve, drawing  crossing, planar, planar embedding, and plane graph  open set  region,
Graph Theory Chapter 6 Planar Graphs Ch. 6. Planar Graphs.
Planar Graphs Graph G is planar, if it can be “properly” drawn in the plane. In order to explain this informal notion we have to define embeddings of graphs.
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
Flow and Upward Planarity
Planar Graphs: Euler's Formula and Coloring Graphs & Algorithms Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
Planar Graphs and Partially Ordered Sets William T. Trotter Georgia Institute of Technology.
1 Orthogonal Drawing (continued)  Sections 8.3 – 8.5 from the book  Bert Spaan.
Canonical Decomposition, Realizer, Schnyder Labeling and Orderly Spanning Trees of Plane Graphs Kazuyuki Miura, Machiko Azuma and Takao Nishizeki title.
GD 2014 September 26, 2014 Department of Computer Science University of Manitoba Stephane Durocher Debajyoti Mondal.
V Spanning Trees Spanning Trees v Minimum Spanning Trees Minimum Spanning Trees v Kruskal’s Algorithm v Example Example v Planar Graphs Planar Graphs v.
Connectivity and Paths 報告人:林清池. Connectivity A separating set of a graph G is a set such that G-S has more than one component. The connectivity of G,
ساختمانهای گسسته دانشگاه صنعتی شاهرود – فروردین 1392.
Department of Computer Science and Engineering Bangladesh University of Engineering and Technology M. Sc. Engg. Thesis Md. Emran Chowdhury ( P)
Vertex orderings Vertex ordering.
Introduction to Graph Theory
Great Theoretical Ideas in Computer Science for Some.
1 Assignment #3 is posted: Due Thursday Nov. 15 at the beginning of class. Make sure you are also working on your projects. Come see me if you are unsure.
 2004 SDU 1 Lecture5-Strongly Connected Components.
Various Orders and Drawings of Plane Graphs Takao Nishizeki Tohoku University.
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
COMPSCI 102 Introduction to Discrete Mathematics.
N u 1 u 2 u Canonical Decomposition. V 8 V 7 V 6 V 5 V 4 V 3 V 2 V 1 n u 1 u 2 u.
5. Biconnected Components of A Graph If one city’s airport is closed by bad weather, can you still fly between any other pair of cities? If one computer.
CCCG 2014 August 11, 2014 Department of Computer Science University of Manitoba Stephane Durocher Debajyoti Mondal.
1 Schnyder’s Method. 2 Motivation Given a planar graph, we want to embed it in a grid We want the grid to be relatively small And we want an efficient.
Computational Geometry
Graph Drawing.
Drawing Plane Triangulations with Few Segments
Depth Estimation via Sampling
Victoria city and Sendai city
Vertex orderings.
Presentation transcript:

Straight line drawings of planar graphs – part II Roeland Luitwieler

Outline Reminder The realizer method –Barycentric representations –Schnyder labelings and realizers –The realizer algorithm

Reminder This presentation is about: –Straight line grid drawings of planar graphs –Minimized area De Fraysseix, Pach & Pollack, 1988: –The shift method: 2n–4 x n–2 grid Schnyder, 1990: –The realizer method: n–2 x n–2 grid Both are quite different, but can be implemented as linear time algorithms

Reminder Assumptions (can be taken care of in linear time) –n ≥ 3 (trivial otherwise) –Graph is maximal planar (=triangulated) –Graph has a topological embedding Previously: –We proved every triangulated plane graph has a canonical ordering, which can be obtained in linear time –We showed how the linear-time shift algorithm works Adds vertices in a canonical ordering Shifts parts of the drawing to enable straight lines Always uses a 2n–4 x n–2 grid

Barycentric representations A barycentric representation of a graph G is an injective function f : v ∈ V(G) → (v 1, v 2, v 3 ) ∈ ℝ 3 such that – v 1 + v 2 + v 3 = 1 for all v ∈ V(G) – For each edge (x, y) and vertex z ≠ x, y there exists an index k ∈ {1, 2, 3} such that x k < z k and y k < z k (v 1, v 2, v 3 ) are barycentric coordinates of v

Barycentric representations So, a barycentric representation of a graph is a planar straight line drawing in the plane spanned by the three points (1, 0, 0), (0, 1, 0) and (0, 0, 1) Only a planar graph can have a barycentric representation

Barycentric representations A weak barycentric representation of a graph G is an injective function f : v ∈ V(G) → (v 1, v 2, v 3 ) ∈ ℝ 3 such that – v 1 + v 2 + v 3 = 1 for all v ∈ V(G) – For each edge (x, y) and vertex z ≠ x, y there exists an index k ∈ {1, 2, 3} such that (x k, x k+1 ) < lex (z k, z k+1 ) and (y k, y k+1 ) < lex (z k, z k+1 ), where indices are computed modulo 3 Note: (a, b) < lex (c, d) ≡ a < c or (a == c and b < d)

Schnyder labelings and realizers A Schnyder labeling is a labeling of all angles of all inner facial triangles of a triangulated plane graph with labels 1, 2, 3 such that: –The angles of each inner facial triangle are labeled 1, 2 and 3 in counterclockwise order –The labels of the angles at each inner vertex form nonempty intervals of 1’s, 2’s and 3’s in counterclockwise order

Schnyder labelings and realizers Lemma: Every triangulated plane graph has a Schnyder labeling Proof: use canonical ordering –Contract inner edges (v n, v n-1 ), (v n, v n-2 ), … Edge contractible if graph remains triangulated (proof follows) –Label all angles at v n 1 –Now expand again in reverse order, like this (where a=v n ):

Schnyder labelings and realizers –Subproof: edges (v n, v n-1 ), (v n, v n-2 ), … are contractible The vertices of a contractible edge have exactly two common neighbours This holds in a canonical ordering –v n remains the neighbour of all vertices on the outer cycle of the rest of the graph (G k ), including v k –So, v n and v k have the most left and the most right neighbour of v k on the outer cycle of G k-1 in common

Schnyder labelings and realizers A realizer is a partition of the inner edges into sets T 1, T 2 and T 3 such that for each inner vertex v: –v has outdegree one in each of the sets –The counterclockwise order of the incident edges is: Schnyder labelings and realizers are equivalent notions

Schnyder labelings and realizers Here’s a triangulated plane graph with a corresponding Schnyder labeling and realizer:

Schnyder labelings and realizers We define P i (v) the i-path of an inner vertex v to be the path in T i from v to the root of T i P 1 (v), P 2 (v) and P 3 (v) share only the vertex v They divide the graph into three regions R 1 (v), R 2 (v) and R 3 (v), each opposite to the resp. root

Schnyder labelings and realizers By P i (v) we also denote the set of vertices on that path By R i (v) we also denote the set of all vertices in that region –The vertices on P i+1 (v) and P i-1 (v) are included For all distinct inner vertices u and v of a triangulated plane graph, we have: –if u ∈ R i (v) then R i (u) ⊂ R i (v)

The realizer algorithm For an inner vertex v let n i (v) = |R i (v) – P i–1 (v)| For an outer vertex (root) r i let n i (r i ) = n – 2, n i+1 (r i ) = 1 and n i+2 (r i ) = 0 Note that for all vertices v: n 1 (v) + n 2 (v) + n 3 (v) = n – 1 Also note that: 0 ≤ n 1 (v), n 2 (v), n 3 (v) ≤ n – 2 Furthermore: if u ∈ (R i (v) – P i-1 (v)) then n i (u) < n i (v) – Case u is outer vertex r i+1 : n i (u) = 0 – Case u is an inner vertex: R i (u) ⊂ R i (v) if u ∈ R i (v) then n i (u) ≤ n i (v) – Cases above apply – Case u is outer vertex r i–1 : n i (u) = 1

The realizer algorithm Lemma: We now have that the function f : v ∈ V(G) → 1/(n – 1) · (n 1 (v), n 2 (v), n 3 (v)) ∈ ℝ 3 is a weak barycentric representation of the triangulated plane graph G Proof: – v 1 + v 2 + v 3 = 1 for all v ∈ V(G), since n 1 (v) + n 2 (v) + n 3 (v) = n – 1 –We now only have to show that for each edge (x, y) and vertex z ≠ x, y there exists an index k ∈ {1, 2, 3} such that (x k, x k+1 ) < lex (z k, z k+1 ) and (y k, y k+1 ) < lex (z k, z k+1 )

The realizer algorithm –Proof that for each edge (x, y) and vertex z ≠ x, y there exists an index k ∈ {1, 2, 3} such that (x k, x k+1 ) < lex (z k, z k+1 ) and (y k, y k+1 ) < lex (z k, z k+1 ): Case z is an outer vertex r i : k=i implies n k (x), n k (y) < n k (z) = n – 2 Case z is an inner vertex: some k exists such that x, y ∈ R k (z) Now for u ∈ {x, y} and v = z: – Case u ∈ (R k (v) – P k-1 (v)): we showed for that case n k (u) < n k (v) – Case u ∈ P k-1 (v): we showed maybe n k (u) = n k (v); but then u ∈ (R k+1 (v) – P k (v)), so n k+1 (u) < n k+1 (v)

The realizer algorithm The algorithm is as follows: –Construct Schnyder labeling and realizer –For all vertices v do Calculate n 1 (v) and n 2 (v) Draw v at coordinates (n 1 (v), n 2 (v)) Correctness: –The plane spanned by (n – 1, 0, 0), (0, n – 1, 0) and (0, 0, 0) is 2D Complexity: –Calculate in linear time: for all v the depth and the size of the subtree rooted at v –All |P i-1 (v))| and |R i (v)| can be calculated from this in constant time per vertex, so all n i (v) too

The realizer algorithm Here’s a drawing obtained by the algorithm:

Conclusions The realizer method uses –A Schnyder labeling and realizer –A n–2 x n–2 grid –Linear time Questions?

References H. de Fraysseix, J. Pach and R. Pollack, How to draw a planar graph on a grid, Combinatorica 10 (1), 1990, pp. 41–51. T. Nishizeki and Md. S. Rahman, Planar Graph Drawing, World Scientific, Singapore, 2004, pp. 45–88. W. Schnyder, Embedding planar graphs on the grid, in: Proceedings of the First ACM-SIAM Symposium on Discrete Algorithms, 1990, pp. 138–148.