Minimum Rectilinear Polygons for Given Angle Sequences
- W. Evans1, K. Fleszar2, P. Kindermann2,
- N. Saeedi1, C.-S. Shin3, A. Wolff2
- 1. UBC, Canada
- 2. W¨
urzburg Univ., Germany
- 3. HUFS, Korea
Minimum Rectilinear Polygons for Given Angle Sequences W. Evans 1 , - - PowerPoint PPT Presentation
Minimum Rectilinear Polygons for Given Angle Sequences W. Evans 1 , K. Fleszar 2 , P. Kindermann 2 , N. Saeedi 1 , C.-S. Shin 3 , A. Wolff 2 1. UBC, Canada 2. W urzburg Univ., Germany 3. HUFS, Korea Problems Rectilinear polygon P Problems
urzburg Univ., Germany
Rectilinear polygon P
Rectilinear polygon P
Rectilinear polygon P
L
Rectilinear polygon P
L R L
Rectilinear polygon P
L R L L L L L L R R R
An angle sequence
Rectilinear polygon P Angle sequence
Rectilinear polygon P Angle sequence
integer grid
Rectilinear polygon P Angle sequence
integer grid
Rectilinear polygon P Angle sequence
integer grid
Realize a given angle sequence as a rectilinear polygpon on the integer grid with ...
Rectilinear polygon P Angle sequence
integer grid
Realize a given angle sequence as a rectilinear polygpon on the integer grid with ...
Rectilinear polygon P Angle sequence
integer grid minimum area 7 6
Realize a given angle sequence as a rectilinear polygpon on the integer grid with ...
Rectilinear polygon P Angle sequence
integer grid 9 8 minimum bounding box
Realize a given angle sequence as a rectilinear polygpon on the integer grid with ...
Rectilinear polygon P Angle sequence
integer grid minimum perimeter 14 14
P(S) = an optimal polygon that realizes an angle seq. S of length n
P(S) = an optimal polygon that realizes an angle seq. S of length n
not even for the minimum bounding box.
P(S) = an optimal polygon that realizes an angle seq. S of length n
not even for the minimum bounding box. Patrignani (2001): Orthogonal representation Compaction min bounding box min total edge length min max edge length
P(S) = an optimal polygon that realizes an angle seq. S of length n
not even for the minimum bounding box. Patrignani (2001): Orthogonal representation Compaction min bounding box min total edge length min max edge length showed all three criteria are NP-complete
P(S) = an optimal polygon that realizes an angle seq. S of length n
not even for the minimum bounding box. Patrignani (2001): Orthogonal representation Compaction min bounding box min total edge length min max edge length showed all three criteria are NP-complete Our bounding box problem corresponds to the special case that the input graph is a simple cycle.
P(S) = an optimal polygon that realizes an angle seq. S of length n
not even for the minimum bounding box. Patrignani (2001): Orthogonal representation Compaction min bounding box min total edge length min max edge length showed all three criteria are NP-complete Our bounding box problem corresponds to the special case that the input graph is a simple cycle.
Open!
P(S) = an optimal polygon that realizes an angle seq. S of length n
not even for the minimum bounding box.
P(S) = an optimal polygon that realizes an angle seq. S of length n
δ(n) = n
2 − 1 if n ≡ 4 mod 8, n 2 otherwise
not even for the minimum bounding box.
P(S) = an optimal polygon that realizes an angle seq. S of length n
δ(n) = n
2 − 1 if n ≡ 4 mod 8, n 2 otherwise
∆(n) = 1
8(n − 2)(n + 4)
not even for the minimum bounding box.
P(S) = an optimal polygon that realizes an angle seq. S of length n
δ(n) = n
2 − 1 if n ≡ 4 mod 8, n 2 otherwise
∆(n) = 1
8(n − 2)(n + 4)
meaning that one can realize any S in this area, also tight
not even for the minimum bounding box.
P(S) = an optimal polygon that realizes an angle seq. S of length n
δ(n) = n
2 − 1 if n ≡ 4 mod 8, n 2 otherwise
∆(n) = 1
8(n − 2)(n + 4)
meaning that one can realize any S in this area, also tight
not even for the minimum bounding box.
bounding box, perimeter) are NP-hard.
bounding box, perimeter) are NP-hard.
sequences:
bounding box, perimeter) are NP-hard.
sequences:
Area Bounding Box Perimeter x-monotone
bounding box, perimeter) are NP-hard.
sequences:
Area Bounding Box Perimeter x-monotone O(n4) O(n3) O(n2)
bounding box, perimeter) are NP-hard.
sequences:
Area Bounding Box Perimeter x-monotone O(n4) O(n3) O(n2) xy-monotone
bounding box, perimeter) are NP-hard.
sequences:
Area Bounding Box Perimeter x-monotone O(n4) O(n3) O(n2) xy-monotone O(n) O(n) O(n)
bounding box, perimeter) are NP-hard.
sequences:
Area Bounding Box Perimeter x-monotone O(n4) O(n3) O(n2) xy-monotone O(n) O(n) O(n)
⋆ ⋆ ⋆
We reduce from 3-Partition: Given a multiset S of n = 3m integers with S = mB, is there a partition of S into m subsets S1, . . . , Sm such that Si = B for each i?
We reduce from 3-Partition: Given a multiset S of n = 3m integers with S = mB, is there a partition of S into m subsets S1, . . . , Sm such that Si = B for each i? B
We reduce from 3-Partition: Given a multiset S of n = 3m integers with S = mB, is there a partition of S into m subsets S1, . . . , Sm such that Si = B for each i? B
We reduce from 3-Partition: Given a multiset S of n = 3m integers with S = mB, is there a partition of S into m subsets S1, . . . , Sm such that Si = B for each i? 3-Partition is NP-hard even if (i) B = poly(m) (ii) for each s ∈ S, we have B/4 < s < B/2 (⇒ all |Si| = 3). B
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance
S
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea:
S
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea:
S
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea:
S
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea:
S
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea:
S
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea:
S
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea:
S
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea:
S
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea:
S
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea:
S
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea:
S
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea:
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea: Distance always 2 · 3m
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea: Distance always 2 · 3m Blocks:
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea: Distance always 2 · 3m Blocks: 4 · 6m · sj 6m · (m + 1)
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea: Distance always 2 · 3m Blocks: 4 · 6m · sj 6m · (m + 1)
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea: Distance always 2 · 3m Blocks: 4 · 6m · sj 6m · (m + 1) Walls:
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea: Distance always 2 · 3m Blocks: 4 · 6m · sj 6m · (m + 1) Walls: ≈ m4B
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea: Distance always 2 · 3m Blocks: 4 · 6m · sj 6m · (m + 1) Walls: ≈ m4B
Given an instance S = (s1, . . . , s3m) of 3-Partition, compute in poly(m) time K > 0 and an instance σ of MinBBLRSequence s.t. area(σ) < K ⇔ S is yes-instance Idea: Distance always 2 · 3m Blocks: 4 · 6m · sj 6m · (m + 1) Walls: ≈ m4B reduction ∈ poly(m, B)
extreme edges
extreme edges Bounding Box Bounding Box
extreme edges Bounding Box Bounding Box . . . connected to a blue stair!
connected
connected
connected
connected
not connected!
connected
connected
connected!
connected
connected
Given angle sequence . . . TL TR BL BR
Given angle sequence . . . TL TR BL BR TL TR BL BR . . . O(1) candidates for OPT.
Given angle sequence . . . TL TR BL BR TL TR BL BR TL TR BL BR . . . O(1) candidates for OPT.
Given angle sequence . . . TL TR BL BR TL TR BL BR TL TR BL BR . . . O(1) candidates for OPT.
Given angle sequence . . . TL TR BL BR TL TR BL BR TL TR BL BR . . . O(1) candidates for OPT.
Given angle sequence . . . TL TR BL BR TL TR BL BR TL TR BL BR . . . O(1) candidates for OPT.
Given angle sequence . . . TL TR BL BR TL TR BL BR TL TR BL BR . . . O(1) candidates for OPT.
Given a candidate . . .
≤ 2 stairs Given a candidate . . .
≤ 2 stairs Given a candidate . . .
OPT1 ≤ 2 stairs OPT2 OPT3 O(n) time Given a candidate . . .
OPT1 ≤ 2 stairs OPT2 OPT3 O(n) time Given a candidate . . .
Put together!
OPT1 ≤ 2 stairs OPT2 OPT3 O(n) time Given a candidate . . .
OPT1 ≤ 2 stairs OPT2 OPT3 O(n) time Given a candidate . . .
OPT1 ≤ 2 stairs OPT2 OPT3 O(n) time Given a candidate . . .
OPT1 ≤ 2 stairs OPT2 OPT3 O(n) time Given a candidate . . .
Algorithm: For every candidate compute OPTcandidate
compute OPTcandidate ×O(1) O(n)
Bounding Box (BB)
Red part fixed!
Only unknowns:
a) Height of BB b) Width of extreme edges
Red part fixed!
Only unknowns:
a) Height of BB b) Width of extreme edges
Red part fixed!
Algorithm: Guess height of BB Use DP to find widths
h T[p, e]
T[p, e] p
T[p, e] e p
h w T[p, e] = minimum w s.t. left part ∈ BB(w × h) left part e p
T[p, e] = minimum w s.t. left part ∈ BB(w × h)
previous extreme vertex
q e p f
w ′ T[p, e] = minimum w s.t. left part ∈ BB(w × h) is fixed q e p f
w ′ T[p, e] = minimum w s.t. left part ∈ BB(w × h) T[q, f ] f + = q e p
w ′ T[p, e] = min w s.t. left part ∈ BB(w × h) T[q, f ] + = Algorithm: Guess height of BB Use DP to find widths O(n) O(n2)
All vertical edges (except two extremes) are of unit-length
Assume that upper chain is longer (with more reflex vertices).
e Assume that upper chain is longer (with more reflex vertices).
e e′ Assume that upper chain is longer (with more reflex vertices).
e e′ Assume that upper chain is longer (with more reflex vertices). e e′
e e′ e e′ Assume that upper chain is longer (with more reflex vertices).
e e′ e e′ All horizontal edges in the longer chain are of unit-length Assume that upper chain is longer (with more reflex vertices).
e e′ e e′ Canonical x-monotone polygon if
unit-length, and
unit-length Assume that upper chain is longer (with more reflex vertices).
The upper (longer) chain is fixed, i.e., width w is fixed w
The upper (longer) chain is fixed, i.e., width w is fixed h w h′ perimeter = 2w+ (# of vertical edges) +h + h′
The upper (longer) chain is fixed, i.e., width w is fixed h w h′ Unknowns: Height h (= length of the rightmost edge) perimeter = 2w+ (# of vertical edges) +h + h′
The upper (longer) chain is fixed, i.e., width w is fixed h w h′
Unknowns: Height h (= length of the rightmost edge) perimeter = 2w+ (# of vertical edges) +h + h′
h[i, j]
i j
h[i, j]
i j R L
h[i, j]
i j R L
h[i, j]
i j R L
h[i + 1, j + 1]
h[i, j]
i j R L
h[i + 1, j]
h[i, j]
i j For (i, j) pairs: Update h[i, j]
h[i, j]
i j For (i, j) pairs: Update h[i, j] O(n2) O(1) O(n2)
NP-hard.
NP-hard.
Many questions...
NP-hard.
Many questions...
NP-hard.
Many questions...
NP-hard.
Many questions...