Orthogonal Drawings of SeriesParallel Graphs - PowerPoint PPT Presentation

1 / 90
About This Presentation
Title:

Orthogonal Drawings of SeriesParallel Graphs

Description:

any two edges don't cross except at their common ends. planar graph. orthogonal drawings ... An orthogonal drawing of a planar graph G is optimal if it has the ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 91
Provided by: nishizeki
Category:

less

Transcript and Presenter's Notes

Title: Orthogonal Drawings of SeriesParallel Graphs


1
Orthogonal Drawings of Series-Parallel Graphs
by
Takao Nishizeki
Joint work with Xiao Zhou
Tohoku University
2
Orthogonal Drawings of Series-Parallel Graphs
with Minimum Bends
by
Xiao Zhou and Takao Nishizeki
Tohoku University
planar graph
3
Orthogonal Drawings of Series-Parallel Graphs
with Minimum Bends
by
Xiao Zhou and Takao Nishizeki
Tohoku University
planar graph
orthogonal drawings
4
Orthogonal Drawings of Series-Parallel Graphs
with Minimum Bends
  • each vertex is mapped to a point
  • each edge is drawn as a sequence of alternate
    horizontal and vertical line segments
  • any two edges dont cross except at their common
    ends

by
Xiao Zhou and Takao Nishizeki
Tohoku University
crossing
planar graph
orthogonal drawings
5
Orthogonal Drawings of Series-Parallel Graphs
with Minimum Bends
another embedding
  • each vertex is mapped to a point
  • each edge is drawn as a sequence of alternate
    horizontal and vertical line segments
  • any two edges dont cross except at their common
    ends

by
one bend
no bend
Xiao Zhou and Takao Nishizeki
Tohoku University
bend
planar graph
orthogonal drawings
6
Optimal orthogonal drawing
An orthogonal drawing of a planar graph G is
optimal if it has the minimum of bends among
all possible orthogonal drawings of G.
one bend
no bend
bend
planar graph
orthogonal drawings
optimal
7
Example
4 bends
8
Example
4 bends
Optimal ?
No
9
Example
4 bends
flip
10
Example
4 bends
flip
11
Example
4 bends
flip
12
Example
4 bends
flip
13
Example
4 bends
14
Example
4 bends
0 bend
optimal
15
Example
Given a planar graph
4 bends
Wish to find an optimal orthogonal drawing
0 bend
optimal
16
Optimal orthogonal drawing
An orthogonal drawing of a planar graph G is
optimal if it has the minimum of bends among
all possible orthogonal drawings of G.
17
Known results
The problem
NP-complete for planar graphs of ??4
A. Garg, R. Tamassia, 2001
d(v)2
2
2
d(v)3
2
2
3
2
3
18
Known results
The problem
NP-complete for planar graphs of ??4
A. Garg, R. Tamassia, 2001
D. Battista, et al. 1998
where n of vertices
?3, n7
19
Known results
The problem
NP-complete for planar graphs of ??4
A. Garg, R. Tamassia, 2001
If ??3,
O(n5logn) time
D. Battista, et al. 1998
For biconnected series-parallel graphs
20
Connected graphs ?
For biconnected series-parallel graphs
21
Connected graphs
Non-connected graphs
For biconnected series-parallel graphs
22
Connected graphs
Non-connected graphs
Biconnected graphs
23
Known results
The problem
NP-complete for planar graphs of ??4
A. Garg, R. Tamassia, 2001
If ??3,
O(n5logn) time
D. Battista, et al. 1998
For biconnected series-parallel graphs
24
Our results
For series-parallel (multiple) graphs
O(n) time
our result
If ??3,
25
Our results
For series-parallel graphs
O(n) time
our result
If ??3,
26
Series-Parallel Graphs
A SP graph is recursively defined as follows
(a)
is a SP graph.
a single edge
(b)
are SP graphs,
if
are SP graphs
then
27
Series-Parallel Graphs
A SP graph is recursively defined as follows
(a)
is a SP graph.
a single edge
(b)
are SP graphs,
if
are SP graphs
then
28
Series-Parallel Graphs
A SP graph is recursively defined as follows
(a)
is a SP graph.
a single edge
(b)
are SP graphs,
if
are SP graphs
then
29
Series-Parallel Graphs
A SP graph is recursively defined as follows
(a)
is a SP graph.
a single edge
(b)
are SP graphs,
if
are SP graphs
then
parallel-connection
30
Series-Parallel Graphs
A SP graph is recursively defined as follows
(a)
is a SP graph.
a single edge
(b)
are SP graphs,
if
are SP graphs
then
series-connection
parallel-connection
31
Series-Parallel Graphs
A SP graph is recursively defined as follows
(a)
is a SP graph.
a single edge
(b)
are SP graphs,
if
are SP graphs
then
parallel-connection
series-connection
32
Series-Parallel Graphs
A SP graph is recursively defined as follows
(a)
is a SP graph.
a single edge
(b)
are SP graphs,
if
are SP graphs
then
33
Series-Parallel Graphs
Example
SP graph
34
Series-Parallel Graphs
Example
SP graph
series-connection
35
Series-Parallel Graphs
Example
SP graph
parallel-connection
36
Series-Parallel Graphs
Example
SP graph
Series-connection
37
Series-Parallel Graphs
Example
SP graph
Parallel-connection
38
Series-Parallel Graphs
Biconnected graphs G G v is connected for
each vertex v.
Example
v
v
SP graph
biconnected
Biconnected SP graphs
39
Series-Parallel Graphs
Biconnected graphs G G v is connected for
each vertex v.
Example
v
SP graph
biconnected
not biconnected
Biconnected SP graphs
40
Series-Parallel Graphs
Example
41
Series-Parallel Graphs
A SP graph is recursively defined as follows
(a)
is a SP graph.
a single edge
(b)
are SP graphs,
if
are SP graphs
then
42
Lemma 1
(Our Main Idea)
Every biconnected SP graph G of ??3 has one of
the following three substructures (a) a
diamond C (b) two adjacent vertices u and v
s.t. d(u)d(v)2 (c) a triangle K3.
43
Lemma 1
(Our Main Idea)
Every biconnected SP graph G of ??3 has one of
the following three substructures (a) a
diamond C (b) two adjacent vertices u and v
s.t. d(u)d(v)2 (c) a triangle K3.
u v
K3
(a)
(b)
(c)
44
Algorithm(G)
Let G be a biconnected SP graph of ??3. Case (a)
? a diamond ,
Recursively find an optimal drawing.
45
Algorithm(G)
Let G be a biconnected SP graph of ??3. Case (a)
? a diamond ,
Return
expand
Algorithm( ),
expand
optimal
optimal
46
Algorithm(G)
Let G be a biconnected SP graph of ??3. Case (a)
? a diamond ,
Return
expand
Algorithm( ),
expand
Example
optimal
optimal
drawing
47
Algorithm(G)
Let G be a biconnected SP graph of ??3. If n(G)lt
6, Then find an optimal drawing of G Else If ? a
diamond , Then
Algorithm( ),
Return
optimal
optimal
48
Algorithm(G)
Let G be a biconnected SP graph of ??3. If n(G)lt
6, Then find an optimal drawing of G Else If ? a
diamond , Then
Algorithm( ),
Example
Find an optimal drawing of SP graphs without
diamonds
49
Algorithm(G)
Let G be a biconnected SP graph of ??3. If n(G)lt
6, Then find an optimal drawing of G Else If ? a
diamond , Then
Algorithm( ),
Example
Find an optimal drawing of SP graphs without
diamonds
50
Algorithm(G)
Let G be a biconnected SP graph of ??3. Case (a)
? a diamond ,
Return
expand
Algorithm( ),
Case (b) ?
51
deg1 deg1
2-legged SP
Case (b) ?
Find an opt U-shape
52
Our Main Idea
Definition of I- , L- and U-shaped drawings
  • terminals are drawn on the outer face
  • the drawing except terminals doesnt intersect
    the north side

I-shape
L-shape
U-shape
53
Our Main Idea
Definition of I- , L- and U-shaped drawings
  • terminals are drawn on the outer face
  • the drawing except terminals intersects neither
    the north side nor the south side

L-shape
U-shape
I-shape
54
Our Main Idea
Definition of I- , L- and U-shaped drawings
  • terminals are drawn on the outer face
  • the drawing except terminals intersects neither
    the north side nor the east side

I-shape
L-shape
U-shape
55
Lemma 2
Every 2-legged SP graph without diamond has
optimal I-, L- and U-shaped drawings
56
Lemma 2
Every 2-legged SP graph without diamond has
optimal I-, L- and U-shaped drawings
57
parallel connection
series connection
decompose
deg1 deg1
2-legged SP
? ? 3
Case (b) ?
Find an opt U-shape
58
opt U-shape
opt L-shape
opt L-shape
opt L-shape
opt U-shape
Case (b) ?
Find an opt U-shape
59
opt U-shape
opt I-shape
opt U-shape
opt U-shape
opt U-shape
opt I-shape
Case (b) ?
Find an opt U-shape
60
opt U-shape
opt I-shape
Return an optimal drawing
opt U-shape
opt U-shape
opt I-shape
Case (b) ?
extend
Find an opt U-shape
61
Example
Else If? Then
62
series connection
Example
U-shape
Recursively find L-shaped drawings
63
parallel connection
Example
I-shape
U-shape
recursively
L-shape
I-shape
U-shape
64
Example
65
Algorithm(G)
Return optimal drawing
Let G be a biconnected SP graph of ??3. Case (a)
? a diamond ,
expand
Algorithm( ),
Case (b) ?
opt U-shape
Case (c)? a complete graph K3.
bend
66
Algorithm(G)
Let G be a biconnected SP graph of ??3. If n(G)lt
6, Then find an optimal drawing of G Else If ? a
diamond , Then
Algorithm( ),
Else If? two adjacent vertices u,v s.t.
d(u)d(v)2 Then
Find an optimal drawing of SP graphs without
diamonds
Else? a complete graph K3.
67
Algorithm(G)
Let G be a biconnected SP graph of ??3. If n(G)lt
6, Then find an optimal drawing of G Else If ? a
diamond , Then
Algorithm( ),
Else If? two adjacent vertices u,v s.t.
d(u)d(v)2 Then
Else? a complete graph K3.
68
Conclusions
Theorem 1
An optimal orthogonal drawing of a biconnected SP
graph G of ??3 can be found in linear time.
bend
69
Theorem 1
An optimal orthogonal drawing of a biconnected SP
graph G of ??3 can be found in linear time.
70
4 bends
3 bends
2 bends
71
Conclusions
Theorem 1
An optimal orthogonal drawing of a SP graph G of
??3 can be found in linear time.
72
Conclusions
bend(G)? n/3
for biconnected SP graphs G of ??3
Grid size ? 8n/9
73
Thank You
74
Optimal orthogonal drawing
planar graph
Optimal orthogonal drawings ?
75
Optimal orthogonal drawing
1-connected SP graph
a 2-bend orthogonal drawing
?a one-bend orthogonal drawing ?
Is this optimal ?
76
Optimal orthogonal drawing
1-connected SP graph
?a one-bend orthogonal drawing ?
bend
optimal
not optimal
77
one bend
Yes
?a one-bend orthogonal drawing ?
?a 0-bend orthogonal drawing ?
bend
one bend
no bend
Is this optimal ?
optimal
not optimal
78
Optimal orthogonal drawing
1-connected SP graph
?a 0-bend orthogonal drawing ?
0 bend
orthogonal drawings
optimal
79
Optimal orthogonal drawing
1-connected SP graph
?a 0-bend orthogonal drawing ?
0 bend
0 bend
orthogonal drawings
optimal
optimal
80
Optimal orthogonal drawing
1-connected SP graph
No
?a 0-bend orthogonal drawing ?
crossing
crossing
no bend
no bend
optimal
optimal
81
one bend optimal
1-connected SP graph
bend
bend
bend
two bends
82
Conclusions
Theorem 1
An optimal orthogonal drawing of a biconnected SP
graph G of ??3 can be found in linear time.
1-connected SP graph
83
Conclusions
bend(G)? n/3
for biconnected SP graphs G of ??3
Grid size ? 8n/9
84
Conclusions
Our algorithm works well even if G is not
biconnected.
Best possible
bend(G) (n 8)/3 4 (n 4)/3
85
For series-parallel graphs G with ?4
Is there an O(n)-time algorithm to find an
optimal orthogonal drawing of G ?
open
no optimal U-shape
optimal I-shape
optimal L-shape
86
(No Transcript)
87
Our Main Idea
2-legged SP graph
A SP graph G is 2-legged if n(G)?3 and
d(s)d(t)1 for the terminals s and t.
88
Our Main Idea
2-legged SP graph
A SP graph G is 2-legged if n(G)?3 and
d(s)d(t)1 for the terminals s and t.
s
t
Definition of I- , L- and U-shaped drawings
  • terminals are drawn on the outer face
  • the drawing except terminals intersects neither
    the north side nor the south side

L-shape
U-shape
I-shape
89
Our Main Idea
2-legged SP graph
A SP graph G is 2-legged if n(G)?3 and
d(s)d(t)1 for the terminals s and t.
Definition of I- , L- and U-shaped drawings
  • terminals are drawn on the outer face
  • the drawing except terminals intersects neither
    the north side nor the east side

I-shape
L-shape
U-shape
90
Our Main Idea
2-legged SP graph
A SP graph G is 2-legged if n(G)?3 and
d(s)d(t)1 for the terminals s and t.
t
t
s
Definition of I- , L- and U-shaped drawings
  • terminals are drawn on the outer face
  • the drawing except terminals doesnt intersect
    the north side

I-shape
L-shape
U-shape
91
Lemma 2
The following (a) and (b) hold for a 2-legged SP
graph G of ??3 unless G has a diamond (a) G
has three optimal I-, L- and
U-shaped drawings (b) such drawings can be
found in linear time.
optimal U-shaped drawings
optimal I-shaped drawings
92
Lemma 2
The following (a) and (b) hold for a 2-legged SP
graph G of ??3 unless G has a diamond (a) G
has three optimal I-, L- and
U-shaped drawings (b) such drawings can be
found in linear time.
93
Definition of Diamond Graph
A Diamond graph is recursively defined as follows
(a)
is a diamond graph.
a path with three vertices
(b)
are diamond graphs,
if
is a diamond graph
then
94
Definition of Diamond Graph
A Diamond graph is recursively defined as follows
(a)
is a diamond graph.
a path with three edges
(b)
are diamond graphs,
if
is a diamond graph
then
95
Diamond Graph
(a)
is a diamond graph.
(b)
If and
are diamond graphs,
then
is a diamond graph
96
Diamond Graph
(a)
is a diamond graph.
(b)
If and
are diamond graphs,
then
is a diamond graph
97
Lemma 1
If G is a diamond graph, then (a) G has both
a no-bend I-shaped drawing
and a no-bend L-shaped drawing (b)
every no-bend drawing is either I-shaped or
L-shaped.
?no-bend U-shaped drawing ?
NO
98
Lemma 1
If G is a diamond graph, then (a) G has both
a no-bend I-shaped drawing
and a no-bend L-shaped drawing (b)
every no-bend drawing is either I-shaped or
L-shaped.
no-bend I-shaped drawings
99
Lemma 1
If G is a diamond graph, then (a) G has both
a no-bend I-shaped drawing
and a no-bend L-shaped drawing (b)
every no-bend drawing is either I-shaped or
L-shaped.
Such drawings can be found in linear time.
L-shaped
I-shaped
no-bend I-shaped drawings
100
Lemma 2
The following (a) and (b) hold for a 2-legged SP
graph G of ??3 unless G is a diamond graph (a)
G has three optimal I-, L- and
U-shaped drawings (b) such drawings can be
found in linear time.
diamond graph
not a diamond graph
no-bend drawing
101
Lemma 2
The following (a) and (b) hold for a 2-legged SP
graph G of ??3 unless G is a diamond graph (a)
G has three optimal I-, L- and
U-shaped drawings (b) such drawings can be
found in linear time.
102
Lemma 2
The following (a) and (b) hold for a 2-legged SP
graph G of ??3 unless G is a diamond graph (a)
G has three optimal I-, L- and
U-shaped drawings (b) such drawings can be
found in linear time.
103
Lemma 2
The following (a) and (b) hold for a 2-legged SP
graph G of ??3 unless G is a diamond graph (a)
G has three optimal I-, L- and
U-shaped drawings (b) such drawings can be
found in linear time.
104
Known results
In the fixed embedding setting
n of vertices
For plane graph
Min-cost flow problem
105
Known results
In the fixed embedding setting
n of vertices
For plane graph
improved
106
Known results
In the fixed embedding setting
For plane graph
In the variable embedding setting
NP-complete for planar graphs of ??4
A. Garg, R. Tamassia, 2001
107
Known results
In the fixed embedding setting
For plane graph
O(n2logn) time
R. Tamassia, 1987
O(n7/4 logn) time
A. Garg, R. Tamassia, 1997
In the variable embedding setting
NP-complete for planar graphs of ??4
A. Garg, R. Tamassia, 2001
If ??3,
O(n5logn) time
D. Battista, et al. 1998
108
Lemma 3
Every biconnected SP graph G of ??3 has one of
the following three substructures (a) a
diamond C (b) two adjacent vertices u and v
s.t. d(u)d(v)2 (c) a complete graph K3.
(a) G
109
Lemma 1
(Our Main Idea)
Every biconnected SP graph G of ??3 has one of
the following three substructures (a) a
diamond (b) two adjacent vertices u and v
s.t. d(u)d(v)2 (c) a complete graph K3.
110
Proof
G
111
Proof
bend(G)?bend(G )
G
112
Given an optimal drawing of G
Proof
bend(G)?bend(G )
G
Case 1 bend( ) 0
Case 2 bend( ) 1
omitted
Case 3 bend( ) ? 2
113
Lemma 1
(Our Main Idea)
Every biconnected SP graph G of ??3 has one of
the following three substructures (a) a
diamond (b) two adjacent vertices u and v
s.t. d(u)d(v)2 (c) a complete graph K3.
?an optimal U-shape drawing
u v
G
No diamonds
114
Lemma 2
For each SP graph G If n ? 4, ??3 and
d(s)d(t)1, then ?an optimal U-shape drawing
bend(G)bend(G )
?an optimal U-shape drawing
u v
G
No diamonds
115
Our Main Idea
2-legged SP graph
A SP graph G is 2-legged if n(G)?3 and
d(s)d(t)1 for the terminals s and t.
U-shape
s
t
U-shape
Definition of I- , L- and U-shaped drawings
  • terminals are drawn on the outer face
  • the drawing except terminals doesnt intersect
    the north side

I-shape
L-shape
U-shape
116
Lemma 1
(Our Main Idea)
Every biconnected SP graph G of ??3 has one of
the following three substructures (a) a
diamond (b) two adjacent vertices u and v
s.t. d(u)d(v)2 (c) a complete graph K3.
?an optimal U-shape drawing
K3
G
No diamonds
117
Lemma 2
For each SP graph G If n ? 4, ??3 and
d(s)d(t)1, then ?an optimal U-shape drawing
?an optimal U-shape drawing
K3
G
No diamonds
118
Optimal orthogonal drawing
1-connected planar graph
non
Optimal orthogonal drawings ?
119
parallel connection
series connection
deg1 deg1
2-leg SP
Case (b) ?
Find an opt U-shape
Write a Comment
User Comments (0)
About PowerShow.com