Download presentation
Presentation is loading. Please wait.
Published byDayna Price Modified over 9 years ago
1
Advanced Seminar on Graph Drawing – Planar Orientations Olga Maksin Victor Makarenkov Department of Computer Science. Ben-Gurion University of the Negev.
2
Contents Dominance Drawings Undirected Planar Graphs Planar Orthogonal Drawings Planar Straight Line Drawings Real-World Example
3
Dominance Drawings - Motivation Draw a nice planar st-graphs with: ◦ Linear time complexity ◦ Small number of bends ◦ Small area ◦ Presentation of symmetries
4
Dominance drawing A dominance drawing of a digraph G is a drawing Γ of G such that: Dominance drawing is upward. u v iff X(u) <= X(v) Y(u) <= Y(v)
5
Lemma Any straight line dominance drawing Γ of a reduced planar st-graph G is planar. Proof (sketched) : ◦ Assume the negation -> K 3,3 -> contradiction.
6
Dominance straight line Input : Reduced planar st-graph G=(V,E) Output : Straight line dominance drawing Γ of G 3 Stages: ◦ Preprocessing – Data structures ◦ Preliminary Layout ◦ Compaction
7
Preprocessing s k w q a b t For each v list of outgoing edges (clockwise) Next (e), Pred (e) firstout(v) lastout(v) firstin(v) lastin(v) For each e = head(e) = v firstout(s) = Lastin(t) = Next( )=
8
Preliminary Layout s k w q a b t 0,0 4,16,6 2,3 3,5 1,4 5,2
9
0,0 1 2 3 4 5 6 123456 s k w q a b t X Y Preliminary Layout cont.
10
Compaction 0,0 1 2 3 4 5 6 123456 s k w q a b t X Y If Y(u) > Y(v) or (Firstout(u) = lastout(u) and firstin(v) = lastin(v)) Then x(v) = x(u) + 1 Else x(v) = x(u) Two ordered lists by X and Y coordinate
11
Compaction cont. 0,0 1 2 3 4 5 6 123456 s k w q a bt X Y If X(u) > X(v) or (Firstout(u) = lastout(u) and firstin(v) = lastin(v)) Then y(v) = y(u) + 1 Else y(v) = y(u)
12
Compaction conclusion. s k w q a b t s k q a bt w Compaction
13
Example
14
Algorithm Analysis Theorem 4.9. Let G be a reduced planar st-graph with n vertices. Algorithm Dominance-Straight-Line constructs in O(n) time a planar straight line dominance grid drawing Γ of G with O(n 2 ) area.
15
Display of symmetries Theorem 4.10. Let G be a reduced planar st-graph. And Γ be the corresponding straight line drawing constructed by algorithm dominance-straight-line. We have : ◦ Simply isomorphic components of G have drawings in Γ that are congruent up to a translation. ◦ Axially isomorphic components of G have drawings in Γ that are congruent up to a translation and reflection.
16
Display of symmetries cont. Rotationally isomorphic components of G have drawings in Γ that are congruent up to a translation and 180 o rotation.
17
Minimum area dominance drawings E L set of edges { } such that is the rightmost incoming edge of v and leftmost outgoing of u. E R – vice versa. E H – { } the only outgoing edge of u and the only incoming of v. E H is intersection of E L and E R Area = (n -1 – (m L - m H )) * (n -1-(m R - m H )) Minimum area : E H is empty
18
Minimum area dominance drawings Compute m L and m R in preprocessing phase If Y(u) > Y(v) or (Firstout(u) = lastout(u) and firstin(v) = lastin(v) and m L m R for x) ) Then x(v) = x(u) + 1 Else x(v) = x(u)
19
Minimum area cont. Theorem 4.12. Let G be a reduced planar st-graph with n vertices. A minimum area Dominance-Straight-Line grid drawing of G can be constructed in O(n) time. Note: Symmetry not guaranteed.
20
General planar st-graphs Input : Planar st-graph G=(V,E) Output : Polyline dominance drawing Γ of G ◦ Construct reduced G’ ◦ Run Algorithm Dominance-straight-line ◦ Remove dummies
21
General planar st-graphs cont. Adding a dummy vertex: At least n-1 edges are not transitive => at most 2n – 5 dummies => 2n-5 bends. Recall at most 3n-6 edges in planar graph. s k w q a b t X
22
Dominance Drawings - Summary Γ is planar, upward, grid, dominance, polyline. Γ has O(n 2 ) area. Γ has at most 2n-5 bends. Every edge at most one bend. Γ presents symmetric and isomorphic components.
23
Contents Dominance Drawings Undirected Planar Graphs Planar Orthogonal Drawings Planar Straight Line Drawings Real-World Example
24
Extension - Undirected Planar Graphs Tessellation Visibility Upward polyline drawings O(n) time, O(n 2 ) area, 2n-5 bends for planar polyline.
25
The extension Construct a planar embedding of G. Make it biconnected (dummy edges). Let s and t be 2 vertices on external face. St-numbering Orient edges according to st-numbering. st1 2 3 4
26
Contents Dominance Drawings Undirected Planar Graphs Planar Orthogonal Drawings Planar Straight Line Drawings Real-World Example
27
Planar Orthogonal Drawings Graphs with degree less than or equal to four. Uses visibility representations as an intermediate construction. At most 2 bends for each edge (except two edges for s and t with four bends each). Total: 2n+4 O(n) time, O(n 2 ) area
28
Orthogonal-from-Visibility Input : biconnected planar graph G=(V,E) with n vertices of degree at most 4. Output : planar orthogonal grid drawing of G. ◦ Construct planar embedding -> planar st -graph ◦ Create paths ◦ Run Constrained-Visibility ◦ Construct a planar orthogonal grid drawing
29
Create paths ◦ n – 2 directed paths associated to vertices distinct from s, t ◦ Unify paths sharing edges Orthogonal-from-Visibility cont. w v wv
30
Run Constrained –Visibility with respect to ∏ nonintersecting paths. Prespecified edges vertically alligned. For 2 edges on same path, the edge segments have same x coordinate.
31
Orthogonal-from-Visibility cont. Construct a planar orthogonal grid drawing: ◦ For each v: draw at the intersection of vertex segment with the edge segments of its path ◦ For s (t): intersection of its segment with edge segment of median outgoing (incoming).
32
Orthogonal-from-Visibility cont. For each e=(u,v): orthogonal chain through the following points : Placement of u Intersection of Γ ( u) and Γ ( e) Intersection Γ ( e) and Γ ( v) Placement of v Γ(u) Γ(v) Γ(e)
33
Example
34
Contents Dominance Drawings Undirected Planar Graphs Planar Orthogonal Drawings Planar Straight Line Drawings Real-World Example
35
Planar straight line Every planar graph admits a straight line drawing. Existence is not the same as nice one. Until 1988 vertices exponentially close together (in minimum unit of distance). So no visualization can be made.
36
Planar straight line Theorem 4.17. Every n-vertex planar graph has a planar straight line grid drawing with O(n 2 ) area.
37
Planar straight line How ? ◦ Orientation ◦ One vertex at a time ◦ Partial order on vertices, edges and faces.
38
Contents Dominance Drawings Undirected Planar Graphs Planar Orthogonal Drawings Planar Straight Line Drawings Real-World Example
39
UML
40
USE example Force directed methods
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.