530 likes | 675 Views
Compact Visibility Drawing of Planar Graph. Hsueh-I Lu National Taiwan University Joint work with Ching-Chi Lin & I-Fan Sun. Outline. 開場白 The visibility drawing problem Previous work and our improved results A little bit of details: how our simple algorithm works in a lazy manner
E N D
Compact Visibility Drawing of Planar Graph Hsueh-I Lu National Taiwan University Joint work with Ching-Chi Lin & I-Fan Sun Compact Visibility Drawing of Planar Graph
Outline • 開場白 • The visibility drawing problem • Previous work and our improved results • A little bit of details: • how our simple algorithm works in a lazy manner • analyzing our results using Schnyder’s realizer • Conclusion and open questions Compact Visibility Drawing of Planar Graph
開場白 • Algorithmic research is (almost) always about attacking a combinatorial problem in a new (and better) way. • Whether or not you can come up with a neat solution usually depends on how you approach the problem. Compact Visibility Drawing of Planar Graph
A TV Game Show Compact Visibility Drawing of Planar Graph
Monty Hall Problem It makes a lot of difference Compact Visibility Drawing of Planar Graph
Another problem Coffee and Milk Compact Visibility Drawing of Planar Graph
The puzzle Compact Visibility Drawing of Planar Graph
What’s a visibility drawing? • Representation • node horizontal line segment • edge vertical line segment • Requirement • adjacency is appropriately displayed • no crossing among all line segments Compact Visibility Drawing of Planar Graph
An example Compact Visibility Drawing of Planar Graph
The problem • Compact visibility drawing • Input: a planar graph G • n nodes and 3n – 6or fewer edges • Output: a visibility drawing D of G • Objective: minimizing the area of D • A classic graph drawing problem, which finds applications in VLSI layout. Compact Visibility Drawing of Planar Graph
Convention for measuring the drawing’s area segment endpoints grid points Compact Visibility Drawing of Planar Graph
Height < #node = n • In the worst case, each row of grid points is occupied by only one horizontal line segment. Compact Visibility Drawing of Planar Graph
Width < #edge < 3n • In the worst case, each column of grid points is occupied only one vertical line segment. Compact Visibility Drawing of Planar Graph
All known results, including ours, focus on minimizing the width … Compact Visibility Drawing of Planar Graph
Problem formulation Otten & van Wijk [IEEE ISCS’78] No width bound (i.e., width < 3n ) Width < 2n, O(n) time Rosenstiehl & Tarjan [DCG’86] Tamassia & Tollis [DCG’86] Nummenmaa [TCS’92] Width < 1.5n, O(n) time Kant [WG’94, IJCGA’97] Open: is 1.5n worst-case optimal? If G is 4-connected Width < n, O(n) time Kant & He [TCS’97] Previous work Compact Visibility Drawing of Planar Graph
Our main result • Width < 22n/15, O(n) time • A negative answer to Kant’s open question. • Width improvement = 22n/15 – 3n/2 = n/30. • Our algorithm works in a easy-to-implement lazy manner, based on 3 canonical orderings for G provided by Schnyder’s realizer. Compact Visibility Drawing of Planar Graph
Our analysis also implies that … if G has no • degree-3 nodes or • degree-5 nodes, then the drawing produced by our lazy algorithm via realizer is no wider than 4n/3. Compact Visibility Drawing of Planar Graph
A by-product • A simple alternative proof to a corollary of Wagner’s Theorem on Schnyder’s realizer [Bonichon, Saëc & Mosbah, ICALP’02] Compact Visibility Drawing of Planar Graph
Where are we? • The visibility drawing problem • Previous work and our improved results • A little bit of details: • how our simple algorithm works in a lazy manner • analyzing our results using Schnyder’s realizer • Conclusion and open questions Compact Visibility Drawing of Planar Graph
Our algorithm • Additional input: • A canonical ordering of G. • Procedure: • For each y = 1 to n • Place node yfrom above and extend the drawing in a lazy manner, i.e., increasing the width of the drawing only when it is necessary. Compact Visibility Drawing of Planar Graph
Canonical ordering • For each node y, its neighbors in the subgraph Gy–1 induced by the smaller-indexed nodes are on the external boundary of the subgraph Gy–1. Compact Visibility Drawing of Planar Graph
Time complexity • It is not difficult to implement the lazy algorithm to run in O(n) time • e.g., by using data structure like doubly linked list so that each of those less than 3n edges can be drawn in O(1) time. Compact Visibility Drawing of Planar Graph
The challenge We use Schnyder’s Realizer. How do we choose a canonical ordering with which our lazy algorithm produces a compact visibility drawing? Compact Visibility Drawing of Planar Graph
A realizer, obtainable in linear time, partitions the internal edges of G into three edge-disjoint trees, each rooted an external node. The preordering traversal of each tree gives a canonical ordering. How to use realizer? Compact Visibility Drawing of Planar Graph
Schnyder’s Realizer [SODA’90] Compact Visibility Drawing of Planar Graph
A realizer, obtainable in linear time, partitions the internal edges of G into three edge-disjoint trees, each rooted an external node. The preordering traversal of each tree gives a canonical ordering. We can prove that our lazy algorithm yields a drawing with the improved width bound using one of those three canonical orderings. How to use realizer? Compact Visibility Drawing of Planar Graph
An upper bound on width • Width < 3n – Σymindeg(y), where • indeg(y) = the number of neighbors of node y with smaller indices, • outdeg(y) = the number of neighbors of node y with larger indices, and • mindeg(y) = min(indeg(y), outdeg(y)). Compact Visibility Drawing of Planar Graph
mindeg(8) = min(2, 4) = 2 mindeg(9) = min(4, 1) = 1 For example Compact Visibility Drawing of Planar Graph
Width < 3n – Σymindeg(y). Why? Compact Visibility Drawing of Planar Graph
At least mindeg(y) visible points indeg(y) Observation 1 • At the end of the iteration for drawing node y (i.e., all edges (x, y) with x < y are drawn), y has at least indeg(y) ≥mindeg(y) visible points. y Compact Visibility Drawing of Planar Graph
Observation 2 • Drawing an edge (y, z) with y < z either • increases the width by 1 (i.e., y is not visible) or • decreases the number of visible points of y by 1. Compact Visibility Drawing of Planar Graph
Combining Obs 1 & 2 • In the first mindeg(y) iterations for drawing edges (y, z) with y < z, the drawing is not extended. • Therefore, when drawing those 3n edges, • each edge extends the drawing by at most 1 unit. • At least Σymindeg(y) edges do not extend the drawing. Compact Visibility Drawing of Planar Graph
So, … Width ≤ 3n – Σymindeg(y). Compact Visibility Drawing of Planar Graph
Two examples of applying the upper bound on width: • Width ≤ 2n for any canonical ordering • Width ≤ 4n / 3 via realizer, if G has no degree-3 nodes. Compact Visibility Drawing of Planar Graph
Example 1: Width ≤ 2n • Since mindeg(y) ≥ 1, • we have Σymindeg(y) ≥ n, and thus • width is at most 3n – n = 2n. Compact Visibility Drawing of Planar Graph
Example 2: no deg-3 node • Each node has degree at least 4. • it must have • exactly 3 outgoing edges, and • at least 1 incoming edges y Compact Visibility Drawing of Planar Graph
Sum of mindeg(y) in three directions ≥ 2+2+1 = 5 ≥ 2 y ≥ 2 ≥ 1 Compact Visibility Drawing of Planar Graph
Width ≤ 4n/3 • On average, each node contributes 5/3 to mindeg(y) among three orderings. • Therefore, one of those three orderings gives a drawing whose width is at most (3– 5/3)n = 4n/3. Compact Visibility Drawing of Planar Graph
With a more careful analysis, • we can prove that one of those three canonical orderings defined by Schnyder’s realizer yields a visibility drawing no wider than 22n/15. Compact Visibility Drawing of Planar Graph
Our analysis is almost tight • The visibility drawing of the following graph produced by our algorithm has width 4n/3 – O(1). (22n/15 – 4n/3 = 2n/15) Compact Visibility Drawing of Planar Graph
Conclusion • Based upon Schnyder’s realizer, we give an O(n)-time algorithm for visibility drawing that is no wider than 22n/15. Compact Visibility Drawing of Planar Graph