SLIDE 1 Two-Sided Boundary Labeling with Adjacent Sides
Philipp Kindermann Lehrstuhl f¨ ur Informatik I Universit¨ at W¨ urzburg
Joint work with Benjamin Niedermann, Ignaz Rutter, Marcus Schaefer, Andr´ e Schulz & Alexander Wolff
SLIDE 2
Problem Statement
enclosing rectangle
SLIDE 3 Problem Statement
sites enclosing rectangle
- n sites in general position
SLIDE 4 Problem Statement
labels enclosing rectangle sites
- n sites in general position
- labels on the boundary
SLIDE 5 Problem Statement
enclosing rectangle sites labels
- n sites in general position
- labels on the boundary
ports
- ports are fixed or sliding
SLIDE 6 Problem Statement
enclosing rectangle sites labels
- n sites in general position
- labels on the boundary
- ports are fixed or sliding
ports
SLIDE 7 Problem Statement
leaders ports enclosing rectangle sites labels
- n sites in general position
- labels on the boundary
- ports are fixed or sliding
Find a site-label matching with crossing-free leaders.
SLIDE 8 Why Boundary Labeling?
c Google Maps
SLIDE 9 Why Boundary Labeling?
Hotel Ibis Kulturspeicher Main Station Bus Terminal Main Station West Hotel Poppular Barbarossaplatz Juliuspromenade Escalera Ulmer Hof Hotel Urlaub
c Google Maps
SLIDE 10 Why Boundary Labeling?
Hotel Ibis Kulturspeicher Main Station Bus Terminal Main Station West Hotel Poppular Barbarossaplatz Juliuspromenade Escalera Ulmer Hof Hotel Urlaub
c Google Maps
SLIDE 11 Why Boundary Labeling?
c DW-TV
SLIDE 12 Why Boundary Labeling?
c DW-TV Henry Vandyke Carter, via Wikimedia Commons
SLIDE 13 Why Boundary Labeling?
c DW-TV Henry Vandyke Carter, via Wikimedia Commons c friv5games.me
SLIDE 14 Previous Work
1 2 (opp.) 4 2 (adj.) style sides
SLIDE 15 Previous Work
1 2 (opp.) 4 s O(n2+ǫ)[1] 2 (adj.) style sides
[1] Bekos et al. CGTA’07
SLIDE 16 Previous Work
1 2 (opp.) 4 s
O(n2+ǫ)[1] O(n2 log3 n)[1] O(n log n)[1] 2 (adj.) O(n2)[1] style sides
[1] Bekos et al. CGTA’07
SLIDE 17 Previous Work
1 2 (opp.) 4 s
do/pd O(n2+ǫ)[1] O(n2 log3 n)[1] O(n2)[2] O(n log n)[1] 2 (adj.) O(n2)[1] O(n3)[3] style sides
[1] Bekos et al. CGTA’07 [2] Benkert et al. JGAA’09 [3] Bekos et al. Algorithmica’10
SLIDE 18 Previous Work
1 2 (opp.) 4 s
do/pd po O(n2+ǫ)[1] O(n2 log3 n)[1] O(n2)[2] O(n log n)[1] O(n log n)[2] O(n2)[1] 2 (adj.) O(n2)[1] O(n3)[3] style sides
[1] Bekos et al. CGTA’07 [2] Benkert et al. JGAA’09 [3] Bekos et al. Algorithmica’10
SLIDE 19 Previous Work
1 2 (opp.) 4 s
do/pd po O(n2+ǫ)[1] O(n2 log3 n)[1] O(n2)[2] O(n log n)[1] O(n log n)[2] O(n2)[1]
?
2 (adj.) O(n2)[1] O(n3)[3]
?
style sides
[1] Bekos et al. CGTA’07 [2] Benkert et al. JGAA’09 [3] Bekos et al. Algorithmica’10
SLIDE 20 Previous Work
1 2 (opp.) 4 s
do/pd po O(n2+ǫ)[1] O(n2 log3 n)[1] O(n2)[2] O(n log n)[1] O(n log n)[2] O(n2)[1]
?
2 (adj.) O(n2)[1] O(n3)[3]
?
style sides
[1] Bekos et al. CGTA’07 [2] Benkert et al. JGAA’09 [3] Bekos et al. Algorithmica’10
SLIDE 21 Previous Work
1 2 (opp.) 4 s
do/pd po O(n2+ǫ)[1] O(n2 log3 n)[1] O(n2)[2] O(n log n)[1] O(n log n)[2] O(n2)[1]
?
2 (adj.) O(n2)[1] O(n3)[3]
?
style sides
[1] Bekos et al. CGTA’07 [2] Benkert et al. JGAA’09 [3] Bekos et al. Algorithmica’10
2-Approximation on number of bends[4]
[4] Speckmann & Verbeek LATIN’10
SLIDE 22 Previous Work
1 2 (opp.) 4 s
do/pd po O(n2+ǫ)[1] O(n2 log3 n)[1] O(n2)[2] O(n log n)[1] O(n log n)[2] O(n2)[1]
?
2 (adj.) O(n2)[1] O(n3)[3]
?
style sides
[1] Bekos et al. CGTA’07 [2] Benkert et al. JGAA’09 [3] Bekos et al. Algorithmica’10
2-Approximation on number of bends[4]
[4] Speckmann & Verbeek LATIN’10
SLIDE 23
Structure of Planar Solutions
R
SLIDE 24
Structure of Planar Solutions
xy-separating curve C R C
SLIDE 25 Structure of Planar Solutions
xy-separating curve C
R C
SLIDE 26 Structure of Planar Solutions
xy-separating curve C
R C
SLIDE 27 Structure of Planar Solutions
xy-separating curve C
- xy-monotone
- rectilinear
- connects the top-right to the
bottom-left corner of R R C
SLIDE 28 Structure of Planar Solutions
xy-separating curve C
- xy-monotone
- rectilinear
- connects the top-right to the
bottom-left corner of R R C xy-separated solution
SLIDE 29 Structure of Planar Solutions
xy-separating curve C
- xy-monotone
- rectilinear
- connects the top-right to the
bottom-left corner of R R C xy-separated solution
- top sites and leaders lie above C
SLIDE 30 Structure of Planar Solutions
xy-separating curve C
- xy-monotone
- rectilinear
- connects the top-right to the
bottom-left corner of R R C xy-separated solution
- top sites and leaders lie above C
- right sites and leaders lie below C
SLIDE 31 Structure of Planar Solutions
xy-separating curve C
- xy-monotone
- rectilinear
- connects the top-right to the
bottom-left corner of R R C xy-separated solution
- does not contain any of the following patterns
C C C C
- top sites and leaders lie above C
- right sites and leaders lie below C
SLIDE 32 Structure of Planar Solutions
xy-separated solution
- does not contain any of the following patterns
C C C C
SLIDE 33 Structure of Planar Solutions
xy-separated solution
- does not contain any of the following patterns
Planar solution ⇒ xy-separated planar solution C C C C
SLIDE 34 Structure of Planar Solutions
xy-separated solution
- does not contain any of the following patterns
Planar solution ⇒ xy-separated planar solution C C C C C C C C
SLIDE 35 Structure of Planar Solutions
xy-separated solution
- does not contain any of the following patterns
Planar solution ⇒ xy-separated planar solution C C C C Eliminate local crossings C C C C
SLIDE 36
The Strip Condition
R C Given: xy-monotone curve C
SLIDE 37 The Strip Condition
R C Given: xy-monotone curve C
h0 hi hk h1
- h0, . . . , hk: horizontal segments of C extended to the left
SLIDE 38 The Strip Condition
R C Given: xy-monotone curve C
h0 hi hk
S1 Si Sk h1
- h0, . . . , hk: horizontal segments of C extended to the left
strips of R partitioned by h0, . . . , hk
SLIDE 39 The Strip Condition
R C Given: xy-monotone curve C
h0 hi hk
S1 Si Sk h1
- h0, . . . , hk: horizontal segments of C extended to the left
- pi:
any point on hi \ C
pi
strips of R partitioned by h0, . . . , hk
SLIDE 40 The Strip Condition
R C Given: xy-monotone curve C
h0 hi hk
S1 Si Sk h1
- h0, . . . , hk: horizontal segments of C extended to the left
- pi:
any point on hi \ C
polygon spanned by pi, hi and C
Rpi pi
strips of R partitioned by h0, . . . , hk
SLIDE 41 The Strip Condition
R C Given: xy-monotone curve C
h0 hi hk
S1 Si Sk h1
- h0, . . . , hk: horizontal segments of C extended to the left
- pi:
any point on hi \ C
polygon spanned by pi, hi and C
Rpi pi
strips of R partitioned by h0, . . . , hk
- Rpi is valid: number of sites ≥ number of ports
SLIDE 42 The Strip Condition
R C Given: xy-monotone curve C
h0 hi hk
S1 Si Sk h1
- h0, . . . , hk: horizontal segments of C extended to the left
- pi:
any point on hi \ C
polygon spanned by pi, hi and C
Rpi pi
strips of R partitioned by h0, . . . , hk
- Rpi is valid: number of sites ≥ number of ports
- Condition. strip condition of Si is satisfied
⇔ ∃pi ∈ hi \ C : Rpi is valid.
SLIDE 43
The Strip Condition - An Example
C
SLIDE 44
The Strip Condition - An Example
C
h1
S1
SLIDE 45
The Strip Condition - An Example
C
h1
S1
p1
SLIDE 46
The Strip Condition - An Example
C
h1
S1
p1
SLIDE 47
The Strip Condition - An Example
C
h1
S1
SLIDE 48
The Strip Condition - An Example
C
h1
S1
SLIDE 49
The Strip Condition - An Example
C
h1
S1
SLIDE 50
The Strip Condition - An Example
C
h1
S1
p1
SLIDE 51
The Strip Condition - An Example
C
h1
S1
p1
SLIDE 52
The Strip Condition - An Example
C
h1
S1
p1 The strip conditions are sufficient and necessary
SLIDE 53 The Algorithm
- Find an xy-separating curve C
that satisfies the strip conditions.
SLIDE 54 The Algorithm
- Find an xy-separating curve C
that satisfies the strip conditions.
- Consider the dual of the grid
induced by sites and ports
SLIDE 55 The Algorithm
- Find an xy-separating curve C
that satisfies the strip conditions.
- Consider the dual of the grid
induced by sites and ports
- Define grid points G(s, t)
and top-right corner r
G(s, t) s t G(0, 0) r s−1 r
SLIDE 56 The Algorithm
G(0, 0) G(s, t)
Dynamic Program: Compute table T[(s, t), u] .
r s t s−1
SLIDE 57 The Algorithm
G(0, 0) G(s, t)
Dynamic Program: Compute table T[(s, t), u] . T[(s, t), u] = true ⇔ ∃xy-monotone chain C:
r s t s−1
SLIDE 58 The Algorithm
G(0, 0) G(s, t)
Dynamic Program: Compute table T[(s, t), u] . T[(s, t), u] = true ⇔ ∃xy-monotone chain C:
- C starts at r and ends at G(s, t)
r C s t s−1
SLIDE 59 The Algorithm
G(0, 0) G(s, t)
Dynamic Program: Compute table T[(s, t), u] . T[(s, t), u] = true ⇔ ∃xy-monotone chain C:
- C starts at r and ends at G(s, t)
r C s t s−1
SLIDE 60 The Algorithm
G(0, 0) G(s, t)
Dynamic Program: Compute table T[(s, t), u] . T[(s, t), u] = true ⇔ ∃xy-monotone chain C:
- C starts at r and ends at G(s, t)
r C s t s−1
- u sites above C
- strip conditions are satisfied
SLIDE 61 The Algorithm
G(0, 0) G(s, t)
Dynamic Program: Compute table T[(s, t), u] . T[(s, t), u] = true ⇔ ∃xy-monotone chain C:
- C starts at r and ends at G(s, t)
r C s t s−1
- u sites above C
- strip conditions are satisfied
Instance solvable ⇔ T[(0, 0), u] = true for some u.
SLIDE 62 One Step of the Algorithm
G(0, 0) G(s+1, t) r
Assume T[(s + 1, t), u] = true.
SLIDE 63 One Step of the Algorithm
G(0, 0) r
Assume T[(s + 1, t), u] = true. Go from s + 1 to s.
G(s, t)
SLIDE 64 One Step of the Algorithm
G(0, 0) r
Assume T[(s + 1, t), u] = true. Go from s + 1 to s. Case 1: site event
G(s, t) p
SLIDE 65 One Step of the Algorithm
G(0, 0) r
Assume T[(s + 1, t), u] = true. Go from s + 1 to s. Case 1: site event y(p) > Gy(t)
G(s, t) p
SLIDE 66 One Step of the Algorithm
G(0, 0) r
Assume T[(s + 1, t), u] = true. Go from s + 1 to s. Case 1: site event y(p) > Gy(t) ⇒ T[(s, t), u + 1] = true.
G(s, t) p
SLIDE 67 One Step of the Algorithm
G(0, 0) r
Assume T[(s + 1, t), u] = true. Go from s + 1 to s. Case 1: site event y(p) > Gy(t) ⇒ T[(s, t), u + 1] = true. y(p) < Gy(t)
G(s, t) p
SLIDE 68 One Step of the Algorithm
G(0, 0) r
Assume T[(s + 1, t), u] = true. Go from s + 1 to s. Case 1: site event y(p) > Gy(t) ⇒ T[(s, t), u + 1] = true. y(p) < Gy(t) ⇒ T[(s, t), u] = true.
G(s, t) p
SLIDE 69 One Step of the Algorithm
G(0, 0) r
Assume T[(s + 1, t), u] = true. Go from s + 1 to s. Case 1: site event y(p) > Gy(t) ⇒ T[(s, t), u + 1] = true. y(p) < Gy(t) ⇒ T[(s, t), u] = true. Case 2: port event
G(s, t) ℓ
SLIDE 70 One Step of the Algorithm
G(0, 0) r
Assume T[(s + 1, t), u] = true. Go from s + 1 to s. Case 1: site event y(p) > Gy(t) ⇒ T[(s, t), u + 1] = true. y(p) < Gy(t) ⇒ T[(s, t), u] = true. Case 2: port event
G(s, t) ℓ
Check strip condition
SLIDE 71 One Step of the Algorithm
G(0, 0) r
Assume T[(s + 1, t), u] = true. Go from s + 1 to s. Case 1: site event y(p) > Gy(t) ⇒ T[(s, t), u + 1] = true. y(p) < Gy(t) ⇒ T[(s, t), u] = true. Case 2: port event
G(s, t) ℓ
Check strip condition satisfied ⇒ T[(s, t), u] = true
SLIDE 72 Running Time
- Three table entries ⇒ O(n3) steps
SLIDE 73 Running Time
- Three table entries ⇒ O(n3) steps
- O(n2) preprocessing ⇒ check strip condition in O(1) time
SLIDE 74 Running Time
- Three table entries ⇒ O(n3) steps
- O(n2) preprocessing ⇒ check strip condition in O(1) time
→ O(n3) time, O(n3) space
SLIDE 75 Running Time
- Three table entries ⇒ O(n3) steps
- O(n2) preprocessing ⇒ check strip condition in O(1) time
→ O(n3) time, O(n3) space
- Entries of T depend only on previous row and column
SLIDE 76 Running Time
- Three table entries ⇒ O(n3) steps
- O(n2) preprocessing ⇒ check strip condition in O(1) time
→ O(n3) time, O(n3) space
- Entries of T depend only on previous row and column
- Use algorithm of [Hirschberg, 1975] to backtrack a solution
SLIDE 77 Running Time
- Three table entries ⇒ O(n3) steps
- O(n2) preprocessing ⇒ check strip condition in O(1) time
→ O(n3) time, O(n3) space
- Entries of T depend only on previous row and column
→ O(n3) time, O(n2) space
- Use algorithm of [Hirschberg, 1975] to backtrack a solution
SLIDE 78 Running Time
- Three table entries ⇒ O(n3) steps
- O(n2) preprocessing ⇒ check strip condition in O(1) time
→ O(n3) time, O(n3) space
- Entries of T depend only on previous row and column
→ O(n3) time, O(n2) space
- Use algorithm of [Hirschberg, 1975] to backtrack a solution
- Valid values of u form an interval
⇒ We only need to save the boundaries of u
SLIDE 79 Running Time
- Three table entries ⇒ O(n3) steps
- O(n2) preprocessing ⇒ check strip condition in O(1) time
→ O(n3) time, O(n3) space
- Entries of T depend only on previous row and column
→ O(n3) time, O(n2) space
- Use algorithm of [Hirschberg, 1975] to backtrack a solution
- Valid values of u form an interval
⇒ We only need to save the boundaries of u → O(n2) time, O(n) space
SLIDE 80 Extensions
O(n2) time, O(n) space
SLIDE 81 Extensions
- Maximize number of labeled sites:
O(n3 log n) time, O(n) space
O(n2) time, O(n) space
SLIDE 82 Extensions
- Maximize number of labeled sites:
O(n3 log n) time, O(n) space
- Leader-length minimization:
O(n8 log n) time, O(n6) space
O(n2) time, O(n) space
SLIDE 83 Extensions
- Maximize number of labeled sites:
O(n3 log n) time, O(n) space
- Leader-length minimization:
O(n8 log n) time, O(n6) space
- Four-Sided Boundary Labeling:
- Sliding Ports:
O(n2) time, O(n) space
SLIDE 84 Extensions
- Maximize number of labeled sites:
O(n3 log n) time, O(n) space
- Leader-length minimization:
O(n8 log n) time, O(n6) space
- Four-Sided Boundary Labeling:
- Sliding Ports:
O(n2) time, O(n) space
Guess ”extremal“ leader for all sides
SLIDE 85 Extensions
- Maximize number of labeled sites:
O(n3 log n) time, O(n) space
- Leader-length minimization:
O(n8 log n) time, O(n6) space
- Four-Sided Boundary Labeling:
- Sliding Ports:
O(n2) time, O(n) space
Guess ”extremal“ leader for all sides Partition rectangle into four areas
SLIDE 86 Extensions
- Maximize number of labeled sites:
O(n3 log n) time, O(n) space
- Leader-length minimization:
O(n8 log n) time, O(n6) space
- Four-Sided Boundary Labeling:
- Sliding Ports:
O(n2) time, O(n) space
Guess ”extremal“ leader for all sides Partition rectangle into four areas Solve each area independantly
SLIDE 87 Extensions
- Maximize number of labeled sites:
O(n3 log n) time, O(n) space
- Leader-length minimization:
O(n8 log n) time, O(n6) space
- Four-Sided Boundary Labeling:
- Sliding Ports:
O(n2) time, O(n) space O(n10) time, O(n) space
SLIDE 88 Extensions
- Maximize number of labeled sites:
O(n3 log n) time, O(n) space
- Leader-length minimization:
O(n8 log n) time, O(n6) space
- Three-Sided Boundary Labeling:
O(n4) time, O(n) space
- Four-Sided Boundary Labeling:
- Sliding Ports:
O(n2) time, O(n) space O(n10) time, O(n) space