The Terrain Guarding problem is a well-studied visibility problem in Discrete and Computational Geometry. So far, the understanding of the parameterized complexity of Terrain Guarding has been very limited, and, more generally, exact (exponential-time) algorithms for visibility problem are extremely scarce. In this talk we will look at two results regarding Terrain Guarding, from the viewpoint of parameterized complexity. Both of these results will utilize new and known structural properties of terrains. The first result that we will see is a polynomial kernel for Terrain Guarding, when parameterized by the number of reflex vertices. (A reflex vertex is a vertex of the terrain where the angle is at least 180 degrees.) The next result will be regarding a special version of Terrain Guarding, called Orthogonal Terrain Guarding. We will consider the above problem when parameterized by the number of minima in the input terrain, and obtain a dynamic programming based XP algorithm for it.
This presentation is the one that I gave at the Parameterized Complexity Seminar (https://sites.google.com/view/pcseminar).
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
Ā
Guarding Terrains though the Lens of Parameterized Complexity
1. Ben-Gurion University of the Negev, Israel
Guarding Terrains through the Lens of
Parameterized Complexity
Akanksha Agrawal
PARAMETERIZED COMPLEXITY SEMINAR
Based on a joint work with Sudeshna Kolay and Meirav Zehavi, SWAT 2020
(and an invited survey with Meirav Zehavi, CSR 2020)
2. *
A Short Walk Through the Terrains
A Brief History Of Terrain Guarding
A Kernel and an XP Algorithm
*Artistic icons in this presentation are from Iconļ¬nder.
3. *
A Short Walk Through the Terrains
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
Terrains
Sequence of points in the plane, such that any vertical line is intersected
continuously
4. Terrains
A Short Walk Through the Terrains
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
Sequence of points in the plane, such that any vertical line is intersected
continuously
5. A Short Walk Through the Terrains
Not a Terrain!
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
Sequence of points in the plane, such that any vertical line is intersected
continuously
6. Vertices and Edges of a Terrains
A Short Walk Through the Terrains
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
edge
vertex
Vertex: Points in the sequence that deļ¬nes the terrain
Edge: Line segment connecting consecutive points (vertices) of the terrain
7. Points of a Terrain
A Short Walk Through the Terrains
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
point
point
All points (including the vertices) on the edges of the terrain are its points
9. A Short Walk Through the Terrains
Visibility
Two points on the terrain see each other if the line segment
between them is contained on or above the terrain
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
10. A Short Walk Through the Terrains
Orthogonal Terrains
All the edges of the terrain are horizontal/vertical lines
11. QUESTION
Terrain T
Integer k
&
Is there is a set of at most k points in
T that sees all the points of T?
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
Terrain Guarding
NPUT
12. QUESTION
Terrain T
Integer k
&
Is there is a set of at most k points in
T that sees all the points of T?
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
Terrain Guarding
NPUT
Where can we place the guards?
What all points do we need to guard?
DIFFERENT VERSIONS
Discrete: Vertices guarding vertices
Continuous: Points guarding points
13. QUESTION
Terrain T
Integer k
&
Is there is a set of at most k points in
T that sees all the points of T?
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
Terrain Guarding
NPUT
Where can we place the guards?
What all points do we need to guard?
DIFFERENT VERSIONS
Discrete: Vertices guarding vertices
Continuous: Points guarding points
14. A Brief History Of Terrain Guarding
Classical Complexity
Terrain Guarding is a close cousin of the Art Gallery problem, where
the objective is to guard a polygon, instead of a terrain.
15. A Brief History Of Terrain Guarding
Terrain Guarding is a close cousin of the Art Gallery problem, where
the objective is to guard a polygon, instead of a terrain.
An NP-hardness for Terrain Guarding was claimed in 1995, but a
proof was for it was only obtained after 15 years.
[King and Krohn]
no algorithm2ā¦(n/3)
Classical Complexity
16. A Brief History Of Terrain Guarding
Terrain Guarding is a close cousin of the Art Gallery problem, where
the objective is to guard a polygon, instead of a terrain.
An NP-hardness for Terrain Guarding was claimed in 1995, but a
proof was for it was only obtained after 15 years.
[King and Krohn]
Orthogonal Terrain Guarding was shown to be NP-hard only in 2018.
[Bonnet and Giannopoulos]
no algorithm2ā¦(n/3)
Classical Complexity
17. A Brief History Of Terrain Guarding
Approximation Algorithms
In 2005, the ļ¬rst constant factor approximation was obtained for
Discrete Terrain Guarding.
[Ben-Moshe et al.]
18. A Brief History Of Terrain Guarding
Approximation Algorithms
In 2005, the ļ¬rst constant factor approximation was obtained for
Discrete Terrain Guarding.
[Ben-Moshe et al.]
Later, Discrete Terrain Guarding was shown to admit a PTAS.
[Gibson et al.]
19. A Brief History Of Terrain Guarding
Approximation Algorithms
By discretization for Continuous Terrain Guarding, the following
results were obtained: 1) NP-completeness and 2) a PTAS.
[Friedrichs et al.]
20. A Brief History Of Terrain Guarding
Approximation Algorithms
By discretization for Continuous Terrain Guarding, the following
results were obtained: 1) NP-completeness and 2) a PTAS.
[Friedrichs et al.]
Discretization
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
21. A Brief History Of Terrain Guarding
Approximation Algorithms
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
Discretization
Allowed Guard Set
Points to be Guarded
FINITE
By discretization for Continuous Terrain Guarding, the following
results were obtained: 1) NP-completeness and 2) a PTAS.
[Friedrichs et al.]
22. A Brief History Of Terrain Guarding
Parameterized Complexity
An XP-algorithm for Terrain Guarding running in time .
Art Gallery: has no algorithm running in time:
or
[Ashok et al.]
nO(
p
k)
2o(n) f(k) Ā· nO(k/ log k)
23. A Brief History Of Terrain Guarding
Parameterized Complexity
An XP-algorithm for Terrain Guarding running in time .
Art Gallery: has no algorithm running in time:
or
A -time FPT algorithm for Orthogonal Terrain Guarding.
[Ashok et al.]
nO(
p
k)
2o(n) f(k) Ā· nO(k/ log k)
kO(k)
nO(1)
24. A Brief History Of Terrain Guarding
Parameterized Complexity
An XP-algorithm for Terrain Guarding running in time .
Art Gallery: has no algorithm running in time:
or
A -time FPT algorithm for Orthogonal Terrain Guarding.
[Ashok et al.]
FPT algorithms for Terrain Guarding for structural parameters like
onion peeling number and guard range.
[Khodakarami et al.]
nO(
p
k)
2o(n) f(k) Ā· nO(k/ log k)
kO(k)
nO(1)
26. This Talk
Polynomial kernel for Terrain Guarding parameterized by the
number of reļ¬ex vertices
XP algorithm for Orthogonal Terrain Guarding parameterized
by the number of minima
29. This Talk
Polynomial kernel for Terrain Guarding parameterized by the
number of reļ¬ex vertices
Why #reļ¬ex vertices?
30. This Talk
Polynomial kernel for Terrain Guarding parameterized by the
number of reļ¬ex vertices
Why #reļ¬ex vertices?
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
Placing guards at all reļ¬ex
vertices guards the whole
terrain
31. This Talk
Polynomial kernel for Terrain Guarding parameterized by the
number of reļ¬ex vertices
Why #reļ¬ex vertices?
v1
v2
v3
v4
v5
v6 v7
v8
v9
v10
Placing guards at all reļ¬ex
vertices guards the whole
terrain
k ļ£æ r
32. This Talk
Polynomial kernel for Terrain Guarding parameterized by the
number of reļ¬ex vertices
Restricted to Vertices Guarding
Vertices
33. Overview of our Kernelization
MARK 1: Mark enough solution candidates.
MARK 2: Mark enough vertices to be guarded.
Short Circuit: Remove unmarked vertices.
34. Overview of our Kernelization
MARK 1: Mark enough solution candidates.
MARK 2: Mark enough vertices to be guarded.
Short Circuit: Remove unmarked vertices.
35. A Claim to Remember
Order Claim
x
yp q
x sees y & p sees q
x sees q
36. Region of (no) Chaos
Convex Regions
Sequence of maximal consecutive convex vertices
37. Region of (no) Chaos
Convex Regions
Sequence of maximal consecutive convex vertices
Any two vertices of a convex
region see each other
38. MARK 1: Mark enough solution candidates.
ā¢ Mark all reļ¬ex vertices
ā¢ Mark endpoints of convex regions
Kernel for Terrain Guarding: Mark 1
39. Kernel for Terrain Guarding: Mark 1
MARK 1: Mark enough solution candidates.
ā¢ Mark all reļ¬ex vertices
ā¢ Mark endpoints of convex regions
ā¢ For pair of convex regions C,Cā, mark the smallest and
the largest vertices of Cā, that sees all of C (also do the
above for a pair of reflex vertex and a convex region)
C
Cāu
v
w
40. Construction of Mark 1 is Correct!
For a convex region C, if a vertex v to the right of it,
sees the right endpoint, then v sees everything in C
v
C
If there is a solution, then there is a solution from Mark 1
41. Construction of Mark 1 is Correct!
v=q
C
For a convex region C, if a vertex v to the right of it,
sees the right endpoint, then v sees everything in C
Order Claim x
y
p
If there is a solution, then there is a solution from Mark 1
42. Construction of Mark 1 is Correct!
More generally, once v starts seeing, it sees up to the
left vertex
v
C
Order Claim
p
seen
If there is a solution, then there is a solution from Mark 1
43. Construction of Mark 1 is Correct!
v
(unmarked guard)
C
Consider a solution S
If there is a solution, then there is a solution from Mark 1
44. Construction of Mark 1 is Correct!
v
(unmarked guard)
Consider the closest marked guard, u1 and
u2, to the left and right of v, respectively
u1
u2
One of them works as a
replacement for v?C
Consider a solution S
If there is a solution, then there is a solution from Mark 1
45. Construction of Mark 1 is Correct!
v
(unmarked guard)
Consider the closest marked guard, u1 and
u2, to the left and right of v, respectively
u1
u2
One of them works as a
replacement for v?C
Consider a solution S
If there is a solution, then there is a solution from Mark 1
Case 1: v sees a convex
region partially
Case 2: v sees all convex
regions fully
46. Construction of Mark 1 is Correct!
C
v
(unmarked guard)
u1
u2
Cā
p
Consider a solution S
If there is a solution, then there is a solution from Mark 1
Case 1: v sees a convex region partially, say to its left
47. Construction of Mark 1 is Correct!
C
v
(unmarked guard)
u1
u2
Cā
z
p
Consider a solution S
If there is a solution, then there is a solution from Mark 1
Case 1: v sees a convex region partially, say to its left
48. Construction of Mark 1 is Correct!
C
v
(unmarked guard)
u1
u2
Cā
zā
(sees z; after Cā)
zā sees all of Cā!
z
p
Consider a solution S
If there is a solution, then there is a solution from Mark 1
Case 1: v sees a convex region partially, say to its left
49. Construction of Mark 1 is Correct!
zā
C
v
(unmarked guard)
u1
u2
Cā
z
p
Consider a solution S
If there is a solution, then there is a solution from Mark 1
u2 is a replacement!
ā¢ vertex to the left of v seen by u2
Case 1: v sees a convex region partially, say to its left
50. Construction of Mark 1 is Correct!
zā
C
v
(unmarked guard)
u1
u2
Cā
z
p
Consider a solution S
If there is a solution, then there is a solution from Mark 1
u2 is a replacement!
ā¢ vertex to the left of v seen by u2
ā¢ vertex to the right of v seen by zā
Case 1: v sees a convex region partially, say to its left
51. Construction of Mark 1 is Correct!
Consider a solution S
If there is a solution, then there is a solution from Mark 1
zā
C
v
(unmarked guard)
u1
u2
Cā
z
u2 is a replacement!
ā¢ vertex to the left of v seen by u2
ā¢ vertex to the right of v seen by zā
p
Case 1: v sees a convex region partially, say to its left
52. Construction of Mark 1 is Correct!
Consider a solution S
If there is a solution, then there is a solution from Mark 1
zā
C
v
(unmarked guard)
u1
u2
Cā
z
u2 is a replacement!
ā¢ vertex to the left of v seen by u2
ā¢ vertex to the right of v seen by zā
p
Case 1: v sees a convex region partially, say to its left
53. Construction of Mark 1 is Correct!
Consider a solution S
If there is a solution, then there is a solution from Mark 1
zā
C
v
(unmarked guard)
u1
u2
Cā
z
u2 is a replacement!
ā¢ vertex to the left of v seen by u2
ā¢ vertex to the right of v seen by zā
p
w
Case 1: v sees a convex region partially, say to its left
54. Construction of Mark 1 is Correct!
If there is a solution, then there is a solution from Mark 1
C
v
(unmarked guard)
u1
u2
Case 2: v sees all convex regions fully
u2 is a replacement!
Consider a solution S
55. Construction of Mark 1 is Correct!
If there is a solution, then there is a solution from Mark 1
C
v
(unmarked guard)
u1
u2
Case 2: v sees all convex regions fully
u2 is a replacement!
Cā
Consider a solution S
56. Construction of Mark 1 is Correct!
If there is a solution, then there is a solution from Mark 1
C
v
(unmarked guard)
u1
u2
Case 2: v sees all convex regions fully
u2 is a replacement!
Cā
Consider a solution S
57. Construction of Mark 1 is Correct!
If there is a solution, then there is a solution from Mark 1
C
v
(unmarked guard)
u1
u2
Case 2: v sees all convex regions fully
u2 is a replacement!
Cā
Consider a solution S
58. Construction of Mark 1 is Correct!
If there is a solution, then there is a solution from Mark 1
C
v
(unmarked guard)
u1
u2
Case 2: v sees all convex regions fully
u2 is a replacement!
Cā
someone sees Cā fully
Consider a solution S
59. Construction of Mark 1 is Correct!
If there is a solution, then there is a solution from Mark 1
C
v
(unmarked guard)
u1
u2
Case 2: v sees all convex regions fully
u2 is a replacement!
Cā
someone sees Cā fully
Consider a solution S
60. Construction of Mark 1 is Correct!
v
(unmarked guard)
u1
u2
C
Consider a solution S
If there is a solution, then there is a solution from Mark 1
Case 1: v sees a convex
region partially
Case 2: v sees all convex
regions fully
Replacement for v exists!
61. Construction of Mark 1 is Correct!
If there is a solution, then there is a solution from Mark 1
62. Overview of our Kernelization
MARK 1: Mark enough solution candidates.
MARK 2: Mark enough vertices to be guarded.
Short Circuit: Remove unmarked vertices.
Poly(r) vertices
63. Short Circuit to Complete the Algorithm
Terrain T, integer k
Terrain Tā, integer k
NPUT
x
y
p q
x
y
64. Overview of our Kernelization
MARK 1: Mark enough solution candidates.
MARK 2: Mark enough vertices to be guarded.
Short Circuit: Remove unmarked vertices.
Terrain Guarding admits a polynomial kernel, when parameterized
by the number of reļ¬ex vertices
Poly(r) vertices
+NP-completeness of Terrain Guarding
65. Overview of our Kernelization
+the Known Discretization =>
Continuous Terrain Guarding
Terrain Guarding admits a polynomial kernel, when parameterized
by the number of reļ¬ex vertices
66. This Talk
Polynomial kernel for Terrain Guarding parameterized by the
number of reļ¬ex vertices
XP algorithm for Orthogonal Terrain Guarding parameterized
by the number of minima
Each vertex is adjacent to at most one
horizontal and at most one vertical edge
67. Minima of an Orthogonal Terrain
A horizontal edge uv, where the two neighbors of u and v are both at a
higher elevation them.
minimum
Reļ¬ex vertices are circles and convex vertices are squares
68. Maxima of an Orthogonal Terrain
A horizontal edge uv, where the two neighbors of u and v are both at a
lower elevation than u and v.
maximum
69. Valleys
Roughly, a valley is a maximal regions between a maxima and a minima
W1 W2 W3 W4
#Valleys <= #minima + 2
70. Minima vs. Sol. Size
Solution Size = 2
|Minima| >>2
Solution Size >> 1
|Minima| =1
71. W1 W2 W3 W4
(T,k) is a yes-instance
A subset of reļ¬ex vertices of
size at most k, guarding all
the convex vertices
A Useful Result
72. A Useful Result
W1 W2 W3 W4
(T,k) is a yes-instance
A subset of reļ¬ex vertices of
size at most k, guarding all
the convex vertices
Focus only on reļ¬ex solutions guarding convex vertices!
74. DP States
XP Algorithm
For each valley Wi, we have:
ā¢ What we must necessarily be
seen from the left and right side
of the valley
Integer kā<= k and a height h
Wi
pi
h
bpi
to be seen
to be seen
allowed guards
allowed guards
75. DP States
1 if and only if there is a set of reļ¬ex
vertices of size at most kā, at height
at least h, such that for each Wi, we
have:
ā¢ All the necessary vertices are seen
XP Algorithm
For each valley Wi, we have:
ā¢ What we must necessarily be
seen from the left and right side
of the valley
Integer kā<= k and a height h
Wi
pi
h
bpi
to be seen
to be seen
allowed guards
allowed guards
76. DP States
1 if and only if there is a set of reļ¬ex
vertices of size at most kā, at height
at least h, such that for each Wi, we
have:
ā¢ All the necessary vertices are seen
XP Algorithm
For each valley Wi, we have:
ā¢ What we must necessarily be
seen from the left and right side
of the valley
Integer kā<= k and a height h
Wi
pi
h
bpi
to be seen
to be seen
allowed guards
allowed guards
#Table Entries is bounded by
= #Valleysā«
n2ā«+1
Ā· (k + 1)
77. W1 W2 W3 W4
At height h, at most 2#Valleys many reļ¬ex vertices
height h
A Fact
78. Recursive Formula
W1 W2 W3 W4
lowest
height h*
ā¢ Go over all subsets of guards to
be placed at h*
At height h, at
most 2#Valleys
many reļ¬ex
79. Recursive Formula
W1 W2 W3 W4
lowest
height h*
ā¢ Go over all subsets of guards to
be placed at h*
ā¢ Increment what needs to be seen
for each valley
Updation Safe!
80. Recursive Formula
W1 W2 W3 W4
lowest
height h*
ā¢ Go over all subsets of guards to
be placed at h^*
ā¢ Increment what needs to be seen
for each valley
Take OR over all answers
Updation Safe?
83. Conclusion & Open Problems
We designed a polynomial kernel for Terrain Guarding when
parameterized by the number of reļ¬ex vertices.
Is the problem FPT parameterized by the solution size?
84. Conclusion & Open Problems
We designed a polynomial kernel for Terrain Guarding when
parameterized by the number of reļ¬ex vertices.
Is the problem FPT parameterized by the solution size?
We designed an XP-algorithm for Orthogonal Terrain Guarding when
parameterized by the number of minima.
Is the problem FPT parameterized by the number of
minimas?
85. Conclusion & Open Problems
Thanks!
We designed a polynomial kernel for Terrain Guarding when
parameterized by the number of reļ¬ex vertices.
Is the problem FPT parameterized by the solution size?
We designed an XP-algorithm for Orthogonal Terrain Guarding when
parameterized by the number of minima.
Is the problem FPT parameterized by the number of
minimas?