Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
A 4-Approximation Algorithmfor
Guarding 1.5D Terrains
James KingMcGill University
March 21, 2006
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Outline
Introduction to Terrain Guarding
Previous Work
Preliminaries
Our 4-Approximation Algorithm
Future Work
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
What is a 1.5D Terrain?
I Also known as an x-monotone chain.
I The terrain intersects any vertical line at most once.
I No caves or overhangs.
I Points on the terrain ‘see’ each other if the line segmentconnecting them is never below the terrain.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
What is a 1.5D Terrain?
I Also known as an x-monotone chain.
I The terrain intersects any vertical line at most once.
I No caves or overhangs.
I Points on the terrain ‘see’ each other if the line segmentconnecting them is never below the terrain.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
The Terrain Guarding Problem
I We want a minimum set of guards that see the entire terrain.
I This is very similar to the Art Gallery Problem.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
The Terrain Guarding Problem
The continuous problem:
I The entire terrain mustbe guarded.
I Guards can be placedanywhere.
I Closer to real-lifeapplications.
The discrete problem:
I Only vertices need to beguarded.
I Guards can only be placed onvertices.
I Closely related to non-geometricproblems (e.g. Vertex Cover).
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Outline
Introduction to Terrain Guarding
Previous Work
Preliminaries
Our 4-Approximation Algorithm
Future Work
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Is 1.5D Terrain Guarding NP-Complete?
I We don’t know.I Many related problems
are NP-complete:I Art Gallery Problem.I Vertex Domination.I Set Cover.I 2.5D Terrain Guarding.
I However, 1.5D Terrainsseem to forbid complexconstructions.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Is 1.5D Terrain Guarding NP-Complete?
I We don’t know.I Many related problems
are NP-complete:I Art Gallery Problem.I Vertex Domination.I Set Cover.I 2.5D Terrain Guarding.
I However, 1.5D Terrainsseem to forbid complexconstructions.
Not 1.5D
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Terrain Guarding Algorithms
I Constant factor approximation algorithms given by:I Ben-Moshe, Katz, and Mitchell.I Clarkson and Varadarajan (randomized).
I They did not attempt to minimize the approximation factor.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
The Terrain Guarding Problem
I Our contribution is a 4-approximation algorithm.
I Simpler than previous algorithms.
I Best approximation factor so far.
I We will present the algorithm for the discrete problem.
I Works for the continuous problem with a slight modification.
I Runs in Θ(n2) time.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Outline
Introduction to Terrain Guarding
Previous Work
Preliminaries
Our 4-Approximation Algorithm
Future Work
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Terminology and Notation
I p < q means p is to the left of q.
I p dominates q means p sees every unguarded point that qsees.
I L(p) is the leftmost point that sees p.
I R(p) is the rightmost point that sees p.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Order Claim
I The fundamental property of 1.5D terrains that we exploit.
a
b
cd
a
b
cd
I Consider a < b < c < d .
I If a sees c and b sees d then a sees d .
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
External Domination
I Consider a < b < c such that a sees c .
I {a, c} dominates b outside the interval (a, c).
a
b
c
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Outline
Introduction to Terrain Guarding
Previous Work
Preliminaries
Our 4-Approximation Algorithm
Future Work
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
The Algorithm
while unguarded points remain dofind u, S(u) such that:• u is unguarded• |S(u)| ≤ 4• S(u) dominates any guard that sees u
place guards at the points in S(u)end while
I This guarantees an approximation factor of 4.
I The real work is finding u and S(u).
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Finding u and S(u)
I The work is done by GuardRight, a recursive method.
I GuardLeft is the mirror image of GuardRight.
GuardRight
GuardLeft
GuardRight
recurse
recurse
place guards
I GuardRight recurses by callingGuardLeft and vice versa.
I Guards are placed only in theterminal case.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
GuardRight(p, c)
I p is an unguarded vertex (noton the convex hull).
I c sees every unguarded vertex in[L(R(p)), p)
I We look for u and S(u) in[L(R(p)), R(p)].
I We either find them or isolate asubregion to recurse on.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Guards on the Left
I Left vertices (•) are on theconvex hull between p andL(R(p)).
I Right vertices (•) are between pand R(p).
I If we place a guard at c wedon’t need to consider placingguards in [L(R(p)), p) except onleft vertices.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Yet More Terminology
I Unguarded vertices in [p,R(p))are either exposed or sheltered.
I Exposed vertices ( ) can see aleft vertex.
I Sheltered vertices ( ) cannotsee any left vertex.
I p is exposed.
I d is a special exposed vertexthat our algorithm finds.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
The Terminal Case
I L(d) sees every exposed vertex to the right of L′(d).I L′(d) is the leftmost right vertex that sees d .
I If {c , L(d), L′(d), R(d)} sees every unguarded vertex in[L′(d), R(d)] then the set dominates any vertex that sees d .
I This is the terminal case so we place guards.
I u ← d .
I S(u) ← {c , L(d), L′(d), R(d)}.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
The Recursive Case
I If not terminal, there must be asheltered vertex in [L′(d),R(p))
I Define q as the rightmost shelteredvertex.
I L(d) sees every unguarded vertex in(q, R(L(q))].
I We call GuardLeft(q, L(d)).
R(L(q))
d
L(d)
p
R(p)
q
GuardRight(p,c)
GuardLeft(q,L(d))
L(R(p))
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
The Recursive Case
I We recurse on [L(q), R(L(q))], which is a proper subterrain of[L(R(p)), R(p)].
I Problem size shrinks, so we reach a terminal case eventually.
I We just repeat this whole process until the entire terrain isguarded.
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Outline
Introduction to Terrain Guarding
Previous Work
Preliminaries
Our 4-Approximation Algorithm
Future Work
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Future Work
I Primary question: is 1.5D terrain guarding in P or is itNP-complete?
I Characterize visibility graphs of terrains.I The order claim isn’t the only tool we can use!I What other tools are available?
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains
Introduction to Terrain GuardingPrevious Work
PreliminariesOur 4-Approximation Algorithm
Future Work
Thank you!
James King A 4-Approximation Algorithm for Guarding 1.5D Terrains