Morphing Planar Graph Drawings Efficiently Patrizio Angelini ⋄ , Fabrizio Frati§ , Maurizio Patrignani ⋄ , Vincenzo Roselli ⋄
ROMA
TRE
⋄ UNIVERSITÀ DEGLI STUDI
§
Morphing Planar Graph Drawings Given two planar straight-line drawings of a plane graph, transform one into the other preserving planarity and moving vertices at constant speed along straight-line trajectories
.
Planar Linear Morphing Steps For some pairs of drawings, the morph requires several steps
.
The complexity of a morphing algorithm is defined as the number of (planar linear morphing) steps it performs
Previous Work Steps O(2n )
Cairns ’44
existence of a planar morph for triangulations O(2n )
Thomassen ’83
morph preserving the convexity of each face extension to biconnected graphs Lubiw et al.’06, Biedl ’06
polynomial
orthogonal drawings (preserving edge directions) Lubiw & Petrick ’11
polynomial
polyline drawings of plane graphs Floater & Gotsman ’99, Gotsman & Surazhsky ’01,’03
Non-linear trajectories
?
Previous Work Steps O(2n )
Cairns ’44
existence of a planar morph for triangulations O(2n )
Thomassen ’83
morph preserving the convexity of each face extension to biconnected graphs Lubiw et al.’06, Biedl ’06
polynomial
orthogonal drawings (preserving edge directions) Lubiw & Petrick ’11
polynomial
polyline drawings of plane graphs Floater & Gotsman ’99, Gotsman & Surazhsky ’01,’03
Non-linear trajectories
?
Previous Work Steps O(2n )
Cairns ’44
existence of a planar morph for triangulations O(2n )
Thomassen ’83
morph preserving the convexity of each face extension to biconnected graphs Lubiw et al.’06, Biedl ’06
polynomial
orthogonal drawings (preserving edge directions) Lubiw & Petrick ’11
polynomial
polyline drawings of plane graphs Floater & Gotsman ’99, Gotsman & Surazhsky ’01,’03
Non-linear trajectories
?
Polynomial Algorithms for the Original Setting
Steps Aichholzer et al. ’11
O(n2 )
Polygons Alamdari et al. ’13
Triangulations General Planar Graphs
O(n2 ) O(n4 )
This paper Series-Parallel Graphs General Planar Graphs
O(n) O(n2 )
Polynomial Algorithms for the Original Setting
Steps Aichholzer et al. ’11
O(n2 )
Polygons Alamdari et al. ’13
Triangulations General Planar Graphs
O(n2 ) O(n4 )
This paper Series-Parallel Graphs General Planar Graphs
O(n) O(n2 )
Preliminaries: Kernel In a straight-line planar drawing Γ of G − v , the kernel of a vertex v is the set of points where v can be placed obtaining a straight-line planar drawing Γ′ of G .
Elementary Operations . Contraction . Under certain circumstances, v can be contracted to a neighbor v ′ in its kernel .
; . Uncontraction . Conversely, if v has been contracted to v ′ , then v can be uncontracted from v ′ . . Pseudo-Morph . Contracted vertices move according to their neighbors .
Elementary Operations . Contraction . Under certain circumstances, v can be contracted to a neighbor v ′ in its kernel .
; . Uncontraction . Conversely, if v has been contracted to v ′ , then v can be uncontracted from v ′ . . Pseudo-Morph . Contracted vertices move according to their neighbors .
Elementary Operations . Contraction . Under certain circumstances, v can be contracted to a neighbor v ′ in its kernel .
; . Uncontraction . Conversely, if v has been contracted to v ′ , then v can be uncontracted from v ′ . . Pseudo-Morph . Contracted vertices move according to their neighbors .
Morphing Series-Parallel Graph Drawings in O(n) steps
Two-Terminal Series-Parallel Graphs The smallest TTG is an edge and its ends are called source and sink
Series Composition
+
=
Parallel Composition
+
=
Morphing Series-Parallel Graph Drawings
;
Canonical
;
Source
Target
Canonical Drawings of Series-Parallel Graphs
Series Component
;
Parallel Component
❀
Canonical Drawings of Series-Parallel Graphs Example
→
→
(Pseudo-)Morphing to a Canonical Drawing: Idea
uncontract v
→
→
contract v
→ pseudo-morph →
Pseudo-Morphing
.
Pseudo-Morphing
.
Pseudo-Morphing
.
Pseudo-Morphing
.
Pseudo-Morphing
.
Pseudo-Morphing
.
Pseudo-Morphing
.
Computational Complexity
each vertex is contracted and uncontracted exactly once at each step groups of vertices move in a constant number of linear morphs T (n) = O(1) + T (n − 1) = O(n)
Computational Complexity
each vertex is contracted and uncontracted exactly once at each step groups of vertices move in a constant number of linear morphs T (n) = O(1) + T (n − 1) = O(n)
Morphing Plane Graph Drawings in O(n2) steps
Morphing Maximal Plane Graph Drawings Alamdari et al. ’13
. Computational complexity . T (n) = O(n) + T (n − 1) + O(1) = O(n2 ) .
Morphing Maximal Plane Graph Drawings Alamdari et al. ’13
O(1)
. Computational complexity . T (n) = O(n) + T (n − 1) + O(1) = O(n2 ) .
O(1)
Morphing Maximal Plane Graph Drawings Alamdari et al. ’13
O(1)
O(1)
Convexifier O(n)
. Computational complexity . T (n) = O(n) + T (n − 1) + O(1) = O(n2 ) .
Morphing Maximal Plane Graph Drawings Alamdari et al. ’13
O(1)
O(1) O(1)
Convexifier O(n)
recursion T (n − 1)
. Computational complexity . T (n) = O(n) + T (n − 1) + O(1) = O(n2 ) .
Generalization to General Plane Graphs No low-degree vertex might be contractible u Alamdari et al. ’13: add O(n2 ) vertices to turn both input drawings of G into two drawings of the same triangulation =⇒ T (n) ∈ O ((n2 )2 ) = O(n4 )
w Our Idea: locally modify each drawing and exploit the Convexifier subroutine
Avoiding Additional Vertices For each face f vertex v is adjacent to:
u
w
Avoiding Additional Vertices For each face f vertex v is adjacent to:
u
add vertex t and connect it to v and its two neighbors u and w in f
t
w
Avoiding Additional Vertices For each face f vertex v is adjacent to:
u
consider the polygon P ⟨u, t, w , v ⟩ and triangulate the rest of the drawing
t
w
Avoiding Additional Vertices For each face f vertex v is adjacent to:
apply Convexifier to P
Avoiding Additional Vertices For each face f vertex v is adjacent to:
u
add edge (u, w )
w
Avoiding Additional Vertices For each face f vertex v is adjacent to:
u
repeat on each face adjacent to v
w
Avoiding Additional Vertices For each face f vertex v is adjacent to:
apply Convexifier to the polygon induced by the neighbors of v
Avoiding Additional Vertices For each face f vertex v is adjacent to:
remove added edges
Avoiding Additional Vertices For each face f vertex v is adjacent to:
contract v onto the desired neighbor
Computational Complexity
each vertex is (un)contracted once; contracting a vertex requires O(n) linear morphing steps . .
T (n) = O(n) + T (n − 1) = O(n2 )
Future work . Open problems . general plane graph drawings: is O(n2 ) a tight bound?
morphing planar 3-trees [Alamdari et al. ’13] and series-parallel graphs drawings requires O(n) steps: any other meaningful subclasses admitting “short” morphs? . . In the meanwhile. . . . We strongly suspect that morphing series-parallel graphs requires Ω(n) .
Future work . Open problems . general plane graph drawings: is O(n2 ) a tight bound?
morphing planar 3-trees [Alamdari et al. ’13] and series-parallel graphs drawings requires O(n) steps: any other meaningful subclasses admitting “short” morphs? . . In the meanwhile. . . . We strongly suspect that morphing series-parallel graphs requires Ω(n) .
Thank you!