Presentation is loading. Please wait.

Presentation is loading. Please wait.

Orthogonal Drawings of Series-Parallel Graphs Joint work with Xiao Zhou by Tohoku University Takao Nishizeki.

Similar presentations


Presentation on theme: "Orthogonal Drawings of Series-Parallel Graphs Joint work with Xiao Zhou by Tohoku University Takao Nishizeki."— Presentation transcript:

1 Orthogonal Drawings of Series-Parallel Graphs Joint work with Xiao Zhou by Tohoku University Takao Nishizeki

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

3 Orthogonal Drawings of Series-Parallel Graphs with Minimum Bends Xiao Zhou and Takao Nishizeki by Tohoku University 1.each vertex is mapped to a point 2.each edge is drawn as a sequence of alternate horizontal and vertical line segments 3.any two edges don’t cross except at their common ends planar graphorthogonal drawings bend one bend

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

5 Orthogonal Drawings of Series-Parallel Graphs with Minimum Bends Xiao Zhou and Takao Nishizeki by Tohoku University 1.each vertex is mapped to a point 2.each edge is drawn as a sequence of alternate horizontal and vertical line segments 3.any two edges don’t cross except at their common ends planar graphorthogonal drawings one bendno bend another embedding bend

6 An orthogonal drawing of a planar graph G is optimal if it has the minimum # of bends among all possible orthogonal drawings of G. orthogonal drawings one bendno bend Optimal orthogonal drawing optimal planar graph bend via-hole, through-hole VLSI design

7 Example 4 bends Orthogonal Drawings drawing bend

8 Example 4 bends Orthogonal Drawings drawing bend Optimal ? No

9 Example embedding Orthogonal Drawings drawing bend flip 4 bends

10 Example embedding flip 4 bends Orthogonal Drawings drawing bend

11 Example embedding flip 4 bends Orthogonal Drawings drawing bend

12 Example embedding flip 4 bends Orthogonal Drawings drawing bend

13 Example embedding 4 bends Orthogonal Drawings drawing bend

14 Example drawing embedding 0 bend optimal 4 bends Orthogonal Drawings drawing bend

15 Orthogonal Drawings drawing bend 4 bends Example drawing embedding 0 bend optimal Given a planar graph Wish to find an optimal orthogonal drawing Find an optimal orthogonal drawing of a given planar graph. Problem

16 An orthogonal drawing of a planar graph G is optimal if it has the minimum # of bends among all possible orthogonal drawings of G. Optimal orthogonal drawing Find an optimal orthogonal drawing of a given planar graph. Problem

17 where degree of vertex v: # of edges incident to v Δ : max degree Δ =3, n=7 Known results The problem: NP-complete for planar graphs of Δ ≦ 4 A. Garg, R. Tamassia, 2001 If Δ ≧ 5, then no orthogonal drawing. d(v)=2 d(v)=3 2 2 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 If Δ ≦ 3, O( n 5 log n ) time where n: # of vertices Δ =3, n=7

19 Known results The problem: NP-complete for planar graphs of Δ ≦ 4 A. Garg, R. Tamassia, 2001 If Δ ≦ 3, O( n 5 log n ) time D. Battista, et al. 1998 If Δ ≦ 4, O( n 4 ) time If Δ ≦ 3, O( n 3 ) time D. Battista, et al. 1998 For biconnected series-parallel graphs

20 If Δ ≦ 4, O( n 4 ) time If Δ ≦ 3, O( n 3 ) time D. Battista, et al. 1998 For biconnected series-parallel graphs Connected graphs ?

21 If Δ ≦ 4, O( n 4 ) time If Δ ≦ 3, O( n 3 ) time D. Battista, et al. 1998 For biconnected series-parallel graphs Connected graphsNon-connected graphs

22 Connected graphsNon-connected graphs Biconnected graphs

23 Known results The problem: NP-complete for planar graphs of Δ ≦ 4 A. Garg, R. Tamassia, 2001 If Δ ≦ 3, O( n 5 log n ) time D. Battista, et al. 1998 If Δ ≦ 4, O( n 4 ) time If Δ ≦ 3, O( n 3 ) time D. Battista, et al. 1998 For biconnected series-parallel graphs

24 Our results If Δ ≦ 3, O( n ) time our result For series-parallel (multiple) graphs Non-connectedConnected

25 Our results If Δ ≦ 3, O( n ) time our result much simpler and faster than the known algorithms For series-parallel graphs

26 Series-Parallel Graphs (a) if are SP graphs, is a SP graph. then are SP graphs A SP graph is recursively defined as follows: (b) a single edge

27 Series-Parallel Graphs (a) if are SP graphs, is a SP graph. then are SP graphs A SP graph is recursively defined as follows: (b) a single edge

28 Series-Parallel Graphs (a) if are SP graphs, is a SP graph. then are SP graphs A SP graph is recursively defined as follows: (b) a single edge

29 parallel-connection Series-Parallel Graphs (a) if are SP graphs, is a SP graph. then are SP graphs A SP graph is recursively defined as follows: (b) a single edge

30 series-connectionparallel-connection Series-Parallel Graphs (a) if are SP graphs, is a SP graph. then are SP graphs A SP graph is recursively defined as follows: (b) a single edge

31 parallel-connectionseries-connection Series-Parallel Graphs (a) if are SP graphs, is a SP graph. then are SP graphs A SP graph is recursively defined as follows: (b) a single edge

32 Series-Parallel Graphs (a) if are SP graphs, is a SP graph. then are SP graphs A SP graph is recursively defined as follows: (b) a single edge

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 Example Biconnected SP graphs SP graph biconnected Biconnected graphs G : G – v is connected for each vertex v. vv

39 Series-Parallel Graphs Example SP graph biconnected Biconnected graphs G : G – v is connected for each vertex v. not biconnected v Biconnected SP graphs cut vertex

40 Series-Parallel Graphs Example SP graphs biconnected

41 Series-Parallel Graphs (a) if are SP graphs, is a SP graph. then are SP graphs A SP graph is recursively defined as follows: (b) a single edge

42 (Our Main Idea) Lemma 1 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 K 3. (a) u v (b) K3K3 (c) 2 3 2 3 22 2 3 3

43 (Our Main Idea) Lemma 1 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 K 3. (a) u v K3K3 (b)(c) 2 3 2 3 22 2 3 3

44 Algorithm( G ) Let G be a biconnected SP graph of Δ ≦ 3. Case (a): ∃ a diamond, Recursively find an optimal drawing. Case (b): ∃ Decompose to smaller subgraphs in series or parallel, and iteratively find an optimal drawing Case (c): ∃ Similar as Case (b).

45 Let G be a biconnected SP graph of Δ ≦ 3. Case (a): ∃ a diamond, Algorithm( G ) Algorithm( ), Recur G to a smaller one find optimal contract Return expand

46 Let G be a biconnected SP graph of Δ ≦ 3. Case (a): ∃ a diamond, Algorithm( G ) Algorithm( ), find optimal contract Return expand contract Example contract drawing

47 Algorithm( G ) Let G be a biconnected SP graph of Δ ≦ 3. If n ( G )< 6, Then find an optimal drawing of G Else If ∃ a diamond, Then Algorithm( ), Recur G to a smaller one find optimal contract Return

48 Algorithm( G ) Let G be a biconnected SP graph of Δ ≦ 3. If n ( G )< 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 )< 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 delete edge Let G be a biconnected SP graph of Δ ≦ 3. Case (a): ∃ a diamond, Algorithm( G ) Algorithm( ), find contract Return expand Case (b): ∃

51 deg=1 2-legged SP Find an opt & U-shape delete edge Case (b): ∃

52 terminals are drawn on the outer face; the drawing except terminals doesn’t intersect the north side Our Main Idea Definition of I-, L- and U-shaped drawings I-shapeL-shapeU-shape 2-legged SP graph s t U-shape

53 Our Main Idea 2-legged SP graph s t Definition of I-, L- and U-shaped drawings L-shapeU-shape terminals are drawn on the outer face; the drawing except terminals intersects neither the north side nor the south side I-shape

54 terminals are drawn on the outer face; the drawing except terminals intersects neither the north side nor the east side Our Main Idea Definition of I-, L- and U-shaped drawings I-shapeL-shapeU-shape 2-legged SP graph s t L-shape

55 Lemma 2 Every 2-legged SP graph without diamond has optimal I-, L- and U-shaped drawings optimal I-shapeL-shape optimal U-shape optimal

56 Lemma 2 Every 2-legged SP graph without diamond has optimal I-, L- and U-shaped drawings I-shape optimal bend L-shape optimal bend U-shape optimal bend

57 Δ ≦ 3 deg=1 2-legged SP Find an opt & U-shape parallel connection series connection delete edge Case (b): ∃ decompose

58 opt & L-shape opt & U-shape opt & L-shape Find an opt & U-shape delete edge Case (b): ∃

59 opt & U-shape opt & I-shape opt & U-shape opt & I-shape opt & U-shape Find an opt & U-shape delete edge Case (b): ∃

60 opt & U-shape opt & I-shape opt & U-shape opt & I-shape Find an opt & U-shape delete edge Return an optimal drawing extend Case (b): ∃

61 Example How to find an optimal U-shaped drawing ? Else If ∃ Then

62 Example Recursively find L-shaped drawings series connection U-shape

63 Example parallel connection recursively L-shapeI-shapeU-shape I-shapeU-shape

64 Example

65 Algorithm( ), Algorithm( G ) u v Case (c): ∃ a complete graph K 3. opt & U-shape Return optimal drawing bend expand Let G be a biconnected SP graph of Δ ≦ 3. Case (a): ∃ a diamond, contraction Case (b): ∃

66 Algorithm( G ) Let G be a biconnected SP graph of Δ ≦ 3. If n ( G )< 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 u v Else ∃ a complete graph K 3. Find an optimal drawing of SP graphs without diamonds

67 Algorithm( G ) Let G be a biconnected SP graph of Δ ≦ 3. If n ( G )< 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 u v Else ∃ a complete graph K 3.

68 An optimal orthogonal drawing of a biconnected SP graph G of Δ ≦ 3 can be found in linear time. multiple edges Our algorithm works well even if G has multiple edges Theorem 1 Conclusions bend

69 An optimal orthogonal drawing of a biconnected SP graph G of Δ ≦ 3 can be found in linear time. Theorem 1

70 An optimal orthogonal drawing of a biconnected SP graph G of Δ ≦ 3 can be found in linear time. Theorem 1 Our algorithm works well even if G is not biconnected. find three types of drawings best one of Optimal drawing = bend 4 bends 2 bends 3 bends

71 An optimal orthogonal drawing of a SP graph G of Δ ≦ 3 can be found in linear time. Theorem 1 Conclusions

72 bend( G ) ≦ n /3 for biconnected SP graphs G of Δ ≦ 3 Grid size ≦ 8 n /9 =width + height width height

73

74 Optimal orthogonal drawings ? Optimal orthogonal drawing planar graph

75 a 2-bend orthogonal drawing Optimal orthogonal drawing 1-connected SP graph not optimal one bend bend not optimal one bend bend Is this optimal ? ∃ a one-bend orthogonal drawing ?

76 Optimal orthogonal drawing one bend no bend optimalnot optimal bend ∃ a one-bend orthogonal drawing ? 1-connected SP graph

77 Yes one bend no bend optimalnot optimal bend ∃ a one-bend orthogonal drawing ? Is this optimal ? ∃ a 0-bend orthogonal drawing ?

78 orthogonal drawings Optimal orthogonal drawing 0 bend optimal ∃ a 0-bend orthogonal drawing ? 1-connected SP graph

79 0 bend Optimal orthogonal drawing optimal 0 bend optimal ∃ a 0-bend orthogonal drawing ? orthogonal drawings 1-connected SP graph

80 Optimal orthogonal drawing No optimal no bend optimal no bend crossing ∃ a 0-bend orthogonal drawing ? 1-connected SP graph

81 one bend optimal bend two bends bend 1-connected SP graph

82 An optimal orthogonal drawing of a biconnected SP graph G of Δ ≦ 3 can be found in linear time. Theorem 1 Conclusions Our algorithm works well even if G is not biconnected. min # of bends min # of bends = 1-connected SP graph

83 Conclusions bend( G ) ≦ n /3 for biconnected SP graphs G of Δ ≦ 3 Grid size ≦ 8 n /9 =width + height width height

84 Conclusions bend( G ) ≦ ( n +4)/3for SP graphs G of Δ ≦ 3 Our algorithm works well even if G is not biconnected. Best possible bend( G )= ( n – 8)/3 + 4 = ( n +4)/3 bend

85 Is there an O( n )-time algorithm to find an optimal orthogonal drawing of G ? For series-parallel graphs G with Δ =4 open s t s t s t s t s t s t optimal I-shape optimal L-shape no optimal U-shape

86 Optimal drawing

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. s 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 L-shapeU-shape terminals are drawn on the outer face; the drawing except terminals intersects neither the north side nor the south side I-shape

89 terminals are drawn on the outer face; the drawing except terminals intersects neither the north side nor the east side 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 I-shapeL-shapeU-shape s L-shape t

90 terminals are drawn on the outer face; the drawing except terminals doesn’t intersect the north side 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 I-shapeL-shapeU-shape t not U-shapeU-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. optimal I-shapeL-shape optimal U-shape optimal

93 Definition of Diamond Graph (a) if are diamond graphs, is a diamond graph. then is a diamond graph A Diamond graph is recursively defined as follows: (b) a path with three vertices

94 Definition of Diamond Graph (a) if are diamond graphs, is a diamond graph. then is a diamond graph A Diamond graph is recursively defined as follows: (b) a path with three edges

95 Diamond Graph (a) is a diamond graph. If and are diamond graphs, (b) then is a diamond graph

96 Diamond Graph (a) is a diamond graph. If and are diamond graphs, (b) then is a diamond graph

97 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. Lemma 1 I-shape L-shape ∃ no-bend U-shaped drawing ? NO 1-bend U-shaped drawing

98 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. Lemma 1 no-bend I-shaped drawings

99 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. I-shaped L-shaped Lemma 1 no-bend I-shaped drawings Such drawings can be found in linear time.

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. I-shape L-shape diamond graph no-bend drawing I-shape L-shape not a diamond graph U-shape

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. Proof: by an induction on # of vertices. Parallel-connection Series-connection Suppose that the lemma holds true for and

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. optimal U-shaped drawings optimal I-shaped drawings

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. Proof: by an induction on # of vertices. Parallel-connection Series-connection Suppose that the lemma holds true for and

104 Known results In the fixed embedding setting: Min-cost flow problem n : # of vertices For plane graph: O( n 2 log n ) time R. Tamassia, 1987

105 Known results In the fixed embedding setting: improved n : # of vertices For plane graph: O( n 2 log n ) time R. Tamassia, 1987 O( n 7/4 log n ) time A. Garg, R. Tamassia, 1997

106 Known results In the fixed embedding setting: For plane graph: O( n 2 log n ) time R. Tamassia, 1987 O( n 7/4 log n ) time A. Garg, R. Tamassia, 1997 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( n 2 log n ) time R. Tamassia, 1987 O( n 7/4 log n ) 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( n 5 log n ) 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 K 3. (a) G

109 G Lemma 1 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 K 3. G G G bend( G )=bend( G )bend( G )=bend( G )=0 (Our Main Idea)

110 Proof bend( G )=bend( G ) G G

111 Proof G G bend( G ) ≦ bend( G ) Given an optimal drawing of G

112 Proof G G bend( G ) ≧ bend( G ) Given an optimal drawing of G Case 1: bend( ) = 0 Case 2: bend( ) = 1 Case 3: bend( ) ≧ 2 omitted

113 Lemma 1 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 K 3. u v G G G bend( G )=bend( G ) (Our Main Idea) No diamonds ∃ an optimal U- shape drawing

114 G Lemma 2 For each SP graph G If n ≧ 4, Δ ≦ 3 and d(s)=d(t)=1, then ∃ an optimal U-shape drawing u v G G bend( G )=bend( G ) No diamonds ∃ an optimal U- shape drawing s t optimal U-shaped drawing s t G

115 terminals are drawn on the outer face; the drawing except terminals doesn’t intersect the north side 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 I-shapeL-shapeU-shape

116 Lemma 1 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 K 3. K3K3 G G bend( G )=bend( G )+1 (Our Main Idea) No diamonds G ∃ an optimal U- shape drawing

117 Lemma 2 K3K3 G G G bend( G )=bend( G )+1 No diamonds G ∃ an optimal U- shape drawing For each SP graph G If n ≧ 4, Δ ≦ 3 and d(s)=d(t)=1, then ∃ an optimal U-shape drawing s t optimal U-shaped drawing s t

118 Optimal orthogonal drawings ? Optimal orthogonal drawing 1-connected planar graphnon

119 deg=1 2-leg SP Find an opt & U-shape U-shape not U-shapeU-shape parallel connection series connection delete edge Case (b): ∃


Download ppt "Orthogonal Drawings of Series-Parallel Graphs Joint work with Xiao Zhou by Tohoku University Takao Nishizeki."

Similar presentations


Ads by Google