230 likes | 248 Vues
Explore solutions to 1.5D terrain guarding problems with various algorithms such as Greedy, Ben-Moshe's, and King's. Discover efficient strategies, notations, terminology, and application areas like surveillance equipment placement. Delve into approximation factors and sub-section solving techniques to address complex scenarios. Uncover insights into Opposite-side Greedy algorithm for optimal guarding in diverse terrain configurations.
E N D
A Constant Greedy Approximation Factor for 1.5D Terrain Guarding by Yoav Srebrnik
What will we see? • Introduction & Motivation • "The Fall" of the greedy algorithm. • Notation & Terminology • Upward-Looking Case • Ben-Moshe's Algorithm • King's Algorithm • Opppsite-Side Greedy Algorithm • Summary
Motivation – why solve 1.5D? • Terrain Guarding is useful in determining where to place Cellular-Antenna's and Surveillance equipment (Home-Land Security). • Solving 1.5D efficiently may give us a good heuristic to solve the more general and difficult problem of 2.5D.
Problem's Description • A chain of straight lines between k vertices, defines the terrain – T. • G – the group of guards that are spread over T. • Goal: Find a minimal sub-group of G that can guard every point in G. • If the 'Line of Sight' between two guards doesn't cut the terrain T, then they can see eachother.
The greedy algorithm The basic Greedy algorithm will look similar to : • While there exist un-guarded guards • Add to G' the not-chosen guard which can see the most other not-chosen guards. • End While This Algorithm results in an unbounded approximation factor.
Notation & Terminology • Convex-Hull (CH) – Similar to polygons, chain of lines between (some of) T's maxima-points. • L(p) – The leftmost guard which can see p. • R(p) – The rightmost guard which can see p. • Guard x dominates y - x can see every guard that y can see.
The Upward-Looking Case • In the Upward-Looking Case , for a guard x to see y, the 'line of sight' connecting them can't cut T, and x is not higher than y. • This problem is similar to a Dominating-Set (famous NP-Hard problem) over DAG. • A simple algorithm by King • While There exist an un-guarded p • A = { L(p), p, R(p) } • G' = G' ∪ A • Approximation Factor : 2-Θ(1/n)
The General case – Can we solve in parts? • In the general case, the demand of x to be not higher than y is dropped. • We can use CH(T), to cut the problems into different sub-sections, and solve the problem on them. (i.e – one sub-section of T, can't guard another sub-section of T) • It is always useful to place guards on CH(T) (if possible) because they see two adjacent sub-sections.
Ben-Moshe's algorithm • Given a terrain T, compute its CH, and place guards at its vertices (if possible). Then solve each sub-section seperatly. • Given a sub-section T', Partition it into maximal sub-sections that can be guarded from outside the section, and place guards at end-points of T', and R(al), R(ar), L(bl) & L(br) . • The remaining guards, handle seperatly. First algorithm to show a constant approximation factor.
King's Algorithm • The algorithm repetedly finds the two leftmost unguarded vertices. • In case they both are in CH(T), it place one guard to guard them both. • Otherwise, the algorithm calls a recursive function that can: • place 4 guards to dominate section T. or • Recursively call GuardRight / GuardLeft over T. • The algorithm got his name from the property of placing guards which look right.
King's Algorithm cont'd • The GuardRight function chooses how to place the guards by evaluating the sub-terrain to cover. • If the sub-terrain contains vertices that can't be guarded from the right, it calls a "mirror-like" function : GuardLeft.
Opposite-side Greedy Algorithm • The algorithm classifies each guard into 2 groups – Left & Right guards. • We have a visibility graph which is a "quasi-bisided" graph. • An Edge between x and y, means x sees y. • On that graph we can define 2 different degrees – number of edges to all vertices in the graph D1, number of edges to opposite-side vertices D2.
Opposite-side Greedy Alg – Cont'd • The algorithm: • Build Ĝ – the quasi-bisided graph. • While T is not covered • Order the vertices list by descending D2 value, and then by descending D1 value. • Choose the 1st vertex in the list. • Update Ĝ, D1 and D2 for every remaining vertices. • The algorithm complexity is O(n²logn) But what is the approximation-factor ?
Opposite-side Greedy Alg – cont'd • Every terrain can be broken into simple/stair-like pockets, and planar sub-sections. • For every simple pocket, both the Optimal and the Greedy will put 1 guard. • For a stair-like pocket, |Ĝ| <= 1.5 G'-optimal. • For each planar sub-section, the O.S.Greedy algorithm puts up to 1 guards. Total: Approximation factor = 2.5
Summary • We have seen a constant-factor approximation factor alg for "Upward Looking Case". • We have seen 3 constant-factor approximation factor alg's for the general problem. • We saw that a Greedy heuristic can produce good results in 1.5D terrain guarding.