Altitude Terrain Guarding and Guarding Uni-Monotone Polygons - - PowerPoint PPT Presentation
Altitude Terrain Guarding and Guarding Uni-Monotone Polygons - - PowerPoint PPT Presentation
Altitude Terrain Guarding and Guarding Uni-Monotone Polygons Stephan Friedrichs Valentin Polishchuk Christiane Schmidt image source:
EuroCG 2018 2
image source: http://2.bp.blogspot.com/-eUnhAo8SfFQ/VDaLij2_csI/AAAAAAAABPM/847rgT6VpQE/s1600/Screen%2BShot%2B2014-05-01%2Bat%2B00.02.54.png https://www.dronerush.com/best-drones-1977/drone.bmp
EuroCG 2018 2
image source: http://2.bp.blogspot.com/-eUnhAo8SfFQ/VDaLij2_csI/AAAAAAAABPM/847rgT6VpQE/s1600/Screen%2BShot%2B2014-05-01%2Bat%2B00.02.54.png https://www.dronerush.com/best-drones-1977/drone.bmp
EuroCG 2018 2
image source: http://2.bp.blogspot.com/-eUnhAo8SfFQ/VDaLij2_csI/AAAAAAAABPM/847rgT6VpQE/s1600/Screen%2BShot%2B2014-05-01%2Bat%2B00.02.54.png https://www.dronerush.com/best-drones-1977/drone.bmp
EuroCG 2018 2
image source: http://2.bp.blogspot.com/-eUnhAo8SfFQ/VDaLij2_csI/AAAAAAAABPM/847rgT6VpQE/s1600/Screen%2BShot%2B2014-05-01%2Bat%2B00.02.54.png https://www.dronerush.com/best-drones-1977/drone.bmp
EuroCG 2018 2
image source: http://2.bp.blogspot.com/-eUnhAo8SfFQ/VDaLij2_csI/AAAAAAAABPM/847rgT6VpQE/s1600/Screen%2BShot%2B2014-05-01%2Bat%2B00.02.54.png https://www.dronerush.com/best-drones-1977/drone.bmp
EuroCG 2018 3
image source: http://2.bp.blogspot.com/-eUnhAo8SfFQ/VDaLij2_csI/AAAAAAAABPM/847rgT6VpQE/s1600/Screen%2BShot%2B2014-05-01%2Bat%2B00.02.54.png
EuroCG 2018 3
image source: http://2.bp.blogspot.com/-eUnhAo8SfFQ/VDaLij2_csI/AAAAAAAABPM/847rgT6VpQE/s1600/Screen%2BShot%2B2014-05-01%2Bat%2B00.02.54.png
2.5D
EuroCG 2018 3
2.5D 1.5D
EuroCG 2018
Altitude Terrain Guarding Problem
4
EuroCG 2018
Altitude Terrain Guarding Problem
4
EuroCG 2018
Altitude Terrain Guarding Problem
4
Terrain T
EuroCG 2018
Altitude Terrain Guarding Problem
4
Terrain T Altitude line A
EuroCG 2018
Altitude Terrain Guarding Problem
4
Terrain T Altitude line A
x-monotone chain of line segments in R2 defined by its vertices V(T) = { v1 , . . . , vn}
EuroCG 2018
Altitude Terrain Guarding Problem
4
Terrain T Altitude line A
x-monotone chain of line segments in R2 defined by its vertices V(T) = { v1 , . . . , vn} Monotonicity
EuroCG 2018
Altitude Terrain Guarding Problem
4
Terrain T Altitude line A
x-monotone chain of line segments in R2 defined by its vertices V(T) = { v1 , . . . , vn} Monotonicity ➡ Points on T are totally ordered wrt to x-coordinate: p<q .
EuroCG 2018
Altitude Terrain Guarding Problem
4
Terrain T Altitude line A
x-monotone chain of line segments in R2 defined by its vertices V(T) = { v1 , . . . , vn} A point p ∈ A sees or covers q ∈ T if and only if pq is nowhere below T (i.e. pq lies on or above T ). p ∈ A q ∈ T
EuroCG 2018
Altitude Terrain Guarding Problem
4
Terrain T Altitude line A
x-monotone chain of line segments in R2 defined by its vertices V(T) = { v1 , . . . , vn} A point p ∈ A sees or covers q ∈ T if and only if pq is nowhere below T (i.e. pq lies on or above T ). p ∈ A q ∈ T q2 ∈ T
EuroCG 2018
Altitude Terrain Guarding Problem
4
Terrain T Altitude line A
x-monotone chain of line segments in R2 defined by its vertices V(T) = { v1 , . . . , vn} A point p ∈ A sees or covers q ∈ T if and only if pq is nowhere below T (i.e. pq lies on or above T ). p ∈ A q ∈ T q2 ∈ T
EuroCG 2018
Altitude Terrain Guarding Problem
4
Terrain T Altitude line A
x-monotone chain of line segments in R2 defined by its vertices V(T) = { v1 , . . . , vn} A point p ∈ A sees or covers q ∈ T if and only if pq is nowhere below T (i.e. pq lies on or above T ). VT(p) is the visibility region of p with VT(p) := {q∈T | p sees q} . p ∈ A q ∈ T
EuroCG 2018
Altitude Terrain Guarding Problem
4
Terrain T Altitude line A
x-monotone chain of line segments in R2 defined by its vertices V(T) = { v1 , . . . , vn} A point p ∈ A sees or covers q ∈ T if and only if pq is nowhere below T (i.e. pq lies on or above T ). VT(p) is the visibility region of p with VT(p) := {q∈T | p sees q} . For G⊆A VT(G) := ∪g∈G VT(g). p ∈ A q ∈ T
EuroCG 2018
Altitude Terrain Guarding Problem
4
Terrain T Altitude line A
x-monotone chain of line segments in R2 defined by its vertices V(T) = { v1 , . . . , vn} A point p ∈ A sees or covers q ∈ T if and only if pq is nowhere below T (i.e. pq lies on or above T ). VT(p) is the visibility region of p with VT(p) := {q∈T | p sees q} . For G⊆A VT(G) := ∪g∈G VT(g). p ∈ A q ∈ T Altitude Terrain Guarding Problem (ATGP) ATGP(T,A) Given: a terrain T and an altitude line A . A minimum set of guards that see all of T. (Formally: A guard set G⊂A is optimal w.r.t. ATGP(T,A) if G is feasible, that is, T⊆VT(G) , and |G| = OPT(T,A) := min{|C| | C⊂A is feasible w.r.t. ATGP(T,A)} .)
EuroCG 2018
AGP in uni-monotone polygons
5
uni-monotone polygon?
EuroCG 2018
AGP in uni-monotone polygons
5
uni-monotone polygon? monotone polygon
EuroCG 2018
AGP in uni-monotone polygons
5
uni-monotone polygon? monotone polygon
EuroCG 2018
AGP in uni-monotone polygons
5
uni-monotone polygon? monotone polygon
EuroCG 2018
AGP in uni-monotone polygons
5
uni-monotone polygon? uni-monotone polygon
EuroCG 2018
AGP in uni-monotone polygons
5
uni-monotone polygon? uni-monotone polygon
H
EuroCG 2018
AGP in uni-monotone polygons
5
uni-monotone polygon? uni-monotone polygon
H
LC(P)
EuroCG 2018
AGP in uni-monotone polygons
5
uni-monotone polygon? uni-monotone polygon
H
p ∈ P LC(P)
EuroCG 2018
AGP in uni-monotone polygons
5
uni-monotone polygon? uni-monotone polygon
H
p ∈ P VP(p) - visibility polygon LC(P)
EuroCG 2018
AGP in uni-monotone polygons
5
uni-monotone polygon? uni-monotone polygon
H
p ∈ P VP(p) - visibility polygon Formally: Art Gallery Problem (AGP) AGP(G,W) Given: a polygon P and sets of guard candidates and points to cover G,W⊆P. A minimum guard set C⊆G that covers W (that is, W⊆VP(C)). We want to solve AGP(P,P). LC(P)
EuroCG 2018
AGP in uni-monotone polygons
6
If we want to solve the AGP for a uni-monotone polygon, w.l.o.g. we can restrict our guards to be located on H.
EuroCG 2018
AGP in uni-monotone polygons
6
If we want to solve the AGP for a uni-monotone polygon, w.l.o.g. we can restrict our guards to be located on H. Proof: Consider any optimal guard set G, let g∈G be a guard not located on H
EuroCG 2018
AGP in uni-monotone polygons
6
If we want to solve the AGP for a uni-monotone polygon, w.l.o.g. we can restrict our guards to be located on H. Proof: Consider any optimal guard set G, let g∈G be a guard not located on H
EuroCG 2018
AGP in uni-monotone polygons
6
If we want to solve the AGP for a uni-monotone polygon, w.l.o.g. we can restrict our guards to be located on H. Proof: Consider any optimal guard set G, let g∈G be a guard not located on H
EuroCG 2018
AGP in uni-monotone polygons
7
Let P be a uni-monotone polygon, let G be a guard set with g∈H ∀g∈G that covers LC(P), that is, LC(P)⊂VP(G) . Then G covers all of P, that is, P⊆VP(G).
EuroCG 2018
AGP in uni-monotone polygons
7
Let P be a uni-monotone polygon, let G be a guard set with g∈H ∀g∈G that covers LC(P), that is, LC(P)⊂VP(G) . Then G covers all of P, that is, P⊆VP(G). Proof: Assume p∈P, p∉LC(P), p∉VP(G)
EuroCG 2018
AGP in uni-monotone polygons
7
Let P be a uni-monotone polygon, let G be a guard set with g∈H ∀g∈G that covers LC(P), that is, LC(P)⊂VP(G) . Then G covers all of P, that is, P⊆VP(G). Proof: Assume p∈P, p∉LC(P), p∉VP(G)
EuroCG 2018
AGP in uni-monotone polygons
7
Let P be a uni-monotone polygon, let G be a guard set with g∈H ∀g∈G that covers LC(P), that is, LC(P)⊂VP(G) . Then G covers all of P, that is, P⊆VP(G). Proof: Assume p∈P, p∉LC(P), p∉VP(G)
EuroCG 2018
AGP in uni-monotone polygons
7
Let P be a uni-monotone polygon, let G be a guard set with g∈H ∀g∈G that covers LC(P), that is, LC(P)⊂VP(G) . Then G covers all of P, that is, P⊆VP(G). Proof: Assume p∈P, p∉LC(P), p∉VP(G)
EuroCG 2018
AGP in uni-monotone polygons
7
Let P be a uni-monotone polygon, let G be a guard set with g∈H ∀g∈G that covers LC(P), that is, LC(P)⊂VP(G) . Then G covers all of P, that is, P⊆VP(G). Proof: Assume p∈P, p∉LC(P), p∉VP(G)
EuroCG 2018
AGP in uni-monotone polygons
7
Let P be a uni-monotone polygon, let G be a guard set with g∈H ∀g∈G that covers LC(P), that is, LC(P)⊂VP(G) . Then G covers all of P, that is, P⊆VP(G). Proof: Assume p∈P, p∉LC(P), p∉VP(G) ➜ATGP and AGP for uni-monotone polygons equivalent
EuroCG 2018
AGP-TGP-ATGP
8
Terrain Guarding Problem (TGP) Given: a terrain T. Find: minimum number of guards located on T. Art Gallery Problem (AGP) Given: a polygon P. A minimum guard set that covers P.
EuroCG 2018
AGP-TGP-ATGP
8
Terrain Guarding Problem (TGP) Given: a terrain T. Find: minimum number of guards located on T. Art Gallery Problem (AGP) Given: a polygon P. A minimum guard set that covers P.
NP-hard
EuroCG 2018
AGP-TGP-ATGP
8
Terrain Guarding Problem (TGP) Given: a terrain T. Find: minimum number of guards located on T. Art Gallery Problem (AGP) Given: a polygon P. A minimum guard set that covers P.
NP-hard NP-hard, even in monotone polygons
EuroCG 2018
AGP-TGP-ATGP
8
Terrain Guarding Problem (TGP) Given: a terrain T. Find: minimum number of guards located on T. Art Gallery Problem (AGP) Given: a polygon P. A minimum guard set that covers P.
NP-hard NP-hard, even in monotone polygons
Altitude Terrain Guarding Problem (ATGP) Given: a terrain T and an altitude line A . A minimum set of guards that see all of T.
EuroCG 2018
AGP-TGP-ATGP
8
Terrain Guarding Problem (TGP) Given: a terrain T. Find: minimum number of guards located on T. Art Gallery Problem (AGP) Given: a polygon P. A minimum guard set that covers P.
NP-hard NP-hard, even in monotone polygons
Altitude Terrain Guarding Problem (ATGP) Given: a terrain T and an altitude line A . A minimum set of guards that see all of T. Art Gallery Problem (AGP) in Uni-Monotone Polygons Given: a uni-monotone polygon P. A minimum guard set that covers P.
EuroCG 2018
AGP-TGP-ATGP
8
Terrain Guarding Problem (TGP) Given: a terrain T. Find: minimum number of guards located on T. Art Gallery Problem (AGP) Given: a polygon P. A minimum guard set that covers P.
NP-hard NP-hard, even in monotone polygons
Our Problems: “Inbetween”?!
Altitude Terrain Guarding Problem (ATGP) Given: a terrain T and an altitude line A . A minimum set of guards that see all of T. Art Gallery Problem (AGP) in Uni-Monotone Polygons Given: a uni-monotone polygon P. A minimum guard set that covers P.
EuroCG 2018
AGP-TGP-ATGP
8
Terrain Guarding Problem (TGP) Given: a terrain T. Find: minimum number of guards located on T. Art Gallery Problem (AGP) Given: a polygon P. A minimum guard set that covers P.
NP-hard NP-hard, even in monotone polygons Both polytime
Our Problems: “Inbetween”?!
Altitude Terrain Guarding Problem (ATGP) Given: a terrain T and an altitude line A . A minimum set of guards that see all of T. Art Gallery Problem (AGP) in Uni-Monotone Polygons Given: a uni-monotone polygon P. A minimum guard set that covers P.
EuroCG 2018 9
We show:
EuroCG 2018 9
We show:
- A polytime algorithm for AGTP and AGP in uni-monotone polygons
EuroCG 2018 9
We show:
- A polytime algorithm for AGTP and AGP in uni-monotone polygons
- Uni-monotone polygons are perfect - first non-trivial class
EuroCG 2018 9
We show:
- A polytime algorithm for AGTP and AGP in uni-monotone polygons
- Uni-monotone polygons are perfect - first non-trivial class
perfect ?
EuroCG 2018 9
We show:
- A polytime algorithm for AGTP and AGP in uni-monotone polygons
- Uni-monotone polygons are perfect - first non-trivial class
perfect ?
A set W⊂P (W⊂T ) is a witness set if ∀wi≠wj ∈W we have VP(wi)∩VP(wj) = ∅.
EuroCG 2018 9
We show:
- A polytime algorithm for AGTP and AGP in uni-monotone polygons
- Uni-monotone polygons are perfect - first non-trivial class
perfect ?
A set W⊂P (W⊂T ) is a witness set if ∀wi≠wj ∈W we have VP(wi)∩VP(wj) = ∅.
EuroCG 2018 9
We show:
- A polytime algorithm for AGTP and AGP in uni-monotone polygons
- Uni-monotone polygons are perfect - first non-trivial class
perfect ?
A set W⊂P (W⊂T ) is a witness set if ∀wi≠wj ∈W we have VP(wi)∩VP(wj) = ∅. A maximum witness set Wopt is a witness set of maximum cardinality, |Wopt| = max{|W|: witness set W}.
EuroCG 2018 9
We show:
- A polytime algorithm for AGTP and AGP in uni-monotone polygons
- Uni-monotone polygons are perfect - first non-trivial class
perfect ?
A set W⊂P (W⊂T ) is a witness set if ∀wi≠wj ∈W we have VP(wi)∩VP(wj) = ∅. A maximum witness set Wopt is a witness set of maximum cardinality, |Wopt| = max{|W|: witness set W}. A polygon class P is perfect if
EuroCG 2018 9
We show:
- A polytime algorithm for AGTP and AGP in uni-monotone polygons
- Uni-monotone polygons are perfect - first non-trivial class
perfect ?
A set W⊂P (W⊂T ) is a witness set if ∀wi≠wj ∈W we have VP(wi)∩VP(wj) = ∅. A maximum witness set Wopt is a witness set of maximum cardinality, |Wopt| = max{|W|: witness set W}. A polygon class P is perfect if cardinality of an optimum guard set = cardinality of a maximum witness set ∀P∈P
EuroCG 2018
Altitude Terrain Guarding Problem
10
Guards to the left “don’t help”:
EuroCG 2018
Altitude Terrain Guarding Problem
10
Guards to the left “don’t help”:
EuroCG 2018
Altitude Terrain Guarding Problem
10
Guards to the left “don’t help”:
EuroCG 2018
Altitude Terrain Guarding Problem
10
Guards to the left “don’t help”:
EuroCG 2018
Altitude Terrain Guarding Problem
10
Guards to the left “don’t help”:
EuroCG 2018
Altitude Terrain Guarding Problem
10
Guards to the left “don’t help”:
EuroCG 2018
Altitude Terrain Guarding Problem
10
Guards to the left “don’t help”:
EuroCG 2018
Sweep Algorithm
11
EuroCG 2018
Sweep Algorithm
11
EuroCG 2018
Sweep Algorithm
11
EuroCG 2018
Sweep Algorithm
11
EuroCG 2018
Sweep Algorithm
11
EuroCG 2018
Sweep Algorithm
11
EuroCG 2018
Sweep Algorithm
11
EuroCG 2018
Sweep Algorithm
12
- Start: empty set of guards G = ∅ ; at leftmost point of A ; all edges in E(T) are completely unseen
(Eg=E(T)).
EuroCG 2018
Sweep Algorithm
12
- Start: empty set of guards G = ∅ ; at leftmost point of A ; all edges in E(T) are completely unseen
(Eg=E(T)).
- Sweep along A from left to right
EuroCG 2018
Sweep Algorithm
12
- Start: empty set of guards G = ∅ ; at leftmost point of A ; all edges in E(T) are completely unseen
(Eg=E(T)).
- Sweep along A from left to right
- Place a guard gi whenever we could no longer see all of an “edge” e if we would move more to the right
- first point in C.
EuroCG 2018
Sweep Algorithm
12
- Start: empty set of guards G = ∅ ; at leftmost point of A ; all edges in E(T) are completely unseen
(Eg=E(T)).
- Sweep along A from left to right
- Place a guard gi whenever we could no longer see all of an “edge” e if we would move more to the right
- first point in C.
- Compute VT(gi)
EuroCG 2018
Sweep Algorithm
12
- Start: empty set of guards G = ∅ ; at leftmost point of A ; all edges in E(T) are completely unseen
(Eg=E(T)).
- Sweep along A from left to right
- Place a guard gi whenever we could no longer see all of an “edge” e if we would move more to the right
- first point in C.
- Compute VT(gi)
- Remove all completely seen edges from Eg
EuroCG 2018
Sweep Algorithm
12
- Start: empty set of guards G = ∅ ; at leftmost point of A ; all edges in E(T) are completely unseen
(Eg=E(T)).
- Sweep along A from left to right
- Place a guard gi whenever we could no longer see all of an “edge” e if we would move more to the right
- first point in C.
- Compute VT(gi)
- Remove all completely seen edges from Eg
- For each edge e = {v,w} partially seen by gi: split edge, keep the open interval that is not yet guarded
—>new “edge” e’⊂e
EuroCG 2018
Sweep Algorithm
12
- Start: empty set of guards G = ∅ ; at leftmost point of A ; all edges in E(T) are completely unseen
(Eg=E(T)).
- Sweep along A from left to right
- Place a guard gi whenever we could no longer see all of an “edge” e if we would move more to the right
- first point in C.
- Compute VT(gi)
- Remove all completely seen edges from Eg
- For each edge e = {v,w} partially seen by gi: split edge, keep the open interval that is not yet guarded
—>new “edge” e’⊂e
EuroCG 2018
Sweep Algorithm
12
- Start: empty set of guards G = ∅ ; at leftmost point of A ; all edges in E(T) are completely unseen
(Eg=E(T)).
- Sweep along A from left to right
- Place a guard gi whenever we could no longer see all of an “edge” e if we would move more to the right
- first point in C.
- Compute VT(gi)
- Remove all completely seen edges from Eg
- For each edge e = {v,w} partially seen by gi: split edge, keep the open interval that is not yet guarded
—>new “edge” e’⊂e
- Delete pec and add pe’c to C
EuroCG 2018
Sweep Algorithm
12
- Start: empty set of guards G = ∅ ; at leftmost point of A ; all edges in E(T) are completely unseen
(Eg=E(T)).
- Sweep along A from left to right
- Place a guard gi whenever we could no longer see all of an “edge” e if we would move more to the right
- first point in C.
- Compute VT(gi)
- Remove all completely seen edges from Eg
- For each edge e = {v,w} partially seen by gi: split edge, keep the open interval that is not yet guarded
—>new “edge” e’⊂e
- Delete pec and add pe’c to C
- Delete e from Eg and add e’
EuroCG 2018
Sweep Algorithm
12
- Start: empty set of guards G = ∅ ; at leftmost point of A ; all edges in E(T) are completely unseen
(Eg=E(T)).
- Sweep along A from left to right
- Place a guard gi whenever we could no longer see all of an “edge” e if we would move more to the right
- first point in C.
- Compute VT(gi)
- Remove all completely seen edges from Eg
- For each edge e = {v,w} partially seen by gi: split edge, keep the open interval that is not yet guarded
—>new “edge” e’⊂e
- Delete pec and add pe’c to C
- Delete e from Eg and add e’
EuroCG 2018
Sweep Algorithm
12
- Start: empty set of guards G = ∅ ; at leftmost point of A ; all edges in E(T) are completely unseen
(Eg=E(T)).
- Sweep along A from left to right
- Place a guard gi whenever we could no longer see all of an “edge” e if we would move more to the right
- first point in C.
- Compute VT(gi)
- Remove all completely seen edges from Eg
- For each edge e = {v,w} partially seen by gi: split edge, keep the open interval that is not yet guarded
—>new “edge” e’⊂e
- Delete pec and add pe’c to C
- Delete e from Eg and add e’
EuroCG 2018
Sweep Algorithm
12
- Start: empty set of guards G = ∅ ; at leftmost point of A ; all edges in E(T) are completely unseen
(Eg=E(T)).
- Sweep along A from left to right
- Place a guard gi whenever we could no longer see all of an “edge” e if we would move more to the right
- first point in C.
- Compute VT(gi)
- Remove all completely seen edges from Eg
- For each edge e = {v,w} partially seen by gi: split edge, keep the open interval that is not yet guarded
—>new “edge” e’⊂e
- Delete pec and add pe’c to C
- Delete e from Eg and add e’
EuroCG 2018
Sweep Algorithm
13
How do we preprocess our terrain to easily identify the point on A that we need to add to C when we split an edge?
EuroCG 2018
Sweep Algorithm
13
How do we preprocess our terrain to easily identify the point on A that we need to add to C when we split an edge?
- Sweep rightmost to leftmost vertex
EuroCG 2018
Sweep Algorithm
13
How do we preprocess our terrain to easily identify the point on A that we need to add to C when we split an edge?
- Sweep rightmost to leftmost vertex
- For each vertex we shoot ray through all vertices to its left
EuroCG 2018
Sweep Algorithm
13
How do we preprocess our terrain to easily identify the point on A that we need to add to C when we split an edge?
- Sweep rightmost to leftmost vertex
- For each vertex we shoot ray through all vertices to its left
- Where rays hit terrain: mark points
EuroCG 2018
Sweep Algorithm
13
How do we preprocess our terrain to easily identify the point on A that we need to add to C when we split an edge?
- Sweep rightmost to leftmost vertex
- For each vertex we shoot ray through all vertices to its left
- Where rays hit terrain: mark points
- O(n2) preprocessed intervals
EuroCG 2018
Sweep Algorithm
13
How do we preprocess our terrain to easily identify the point on A that we need to add to C when we split an edge?
- Sweep rightmost to leftmost vertex
- For each vertex we shoot ray through all vertices to its left
- Where rays hit terrain: mark points
- O(n2) preprocessed intervals
- For each mark point m remember the rightmost of the two ray-vertices vm
EuroCG 2018
Sweep Algorithm
13
How do we preprocess our terrain to easily identify the point on A that we need to add to C when we split an edge?
- Sweep rightmost to leftmost vertex
- For each vertex we shoot ray through all vertices to its left
- Where rays hit terrain: mark points
- O(n2) preprocessed intervals
- For each mark point m remember the rightmost of the two ray-vertices vm
- When placing guard g splits edge e, and we are left with interval e’⊂e:
EuroCG 2018
Sweep Algorithm
13
How do we preprocess our terrain to easily identify the point on A that we need to add to C when we split an edge?
- Sweep rightmost to leftmost vertex
- For each vertex we shoot ray through all vertices to its left
- Where rays hit terrain: mark points
- O(n2) preprocessed intervals
- For each mark point m remember the rightmost of the two ray-vertices vm
- When placing guard g splits edge e, and we are left with interval e’⊂e:
- Identify mark point, me’, to the right of e’
EuroCG 2018
Sweep Algorithm
13
How do we preprocess our terrain to easily identify the point on A that we need to add to C when we split an edge?
- Sweep rightmost to leftmost vertex
- For each vertex we shoot ray through all vertices to its left
- Where rays hit terrain: mark points
- O(n2) preprocessed intervals
- For each mark point m remember the rightmost of the two ray-vertices vm
- When placing guard g splits edge e, and we are left with interval e’⊂e:
- Identify mark point, me’, to the right of e’
- Shoot ray r from right endpoint of e’ through vme’
EuroCG 2018
Sweep Algorithm
13
How do we preprocess our terrain to easily identify the point on A that we need to add to C when we split an edge?
- Sweep rightmost to leftmost vertex
- For each vertex we shoot ray through all vertices to its left
- Where rays hit terrain: mark points
- O(n2) preprocessed intervals
- For each mark point m remember the rightmost of the two ray-vertices vm
- When placing guard g splits edge e, and we are left with interval e’⊂e:
- Identify mark point, me’, to the right of e’
- Shoot ray r from right endpoint of e’ through vme’
- Intersection point of r and A is the new closing point
EuroCG 2018
Sweep Algorithm
14
Lemma 1: The set G output by the algorithm is feasible.
EuroCG 2018
Sweep Algorithm
14
Lemma 1: The set G output by the algorithm is feasible. Theorem 2: The set G output by the algorithm is optimal.
EuroCG 2018
Sweep Algorithm
14
Lemma 1: The set G output by the algorithm is feasible. Theorem 2: The set G output by the algorithm is optimal. Proof idea: If we can find a witness set with |W|=|G|, G is optimal.
EuroCG 2018
Sweep Algorithm
14
Lemma 1: The set G output by the algorithm is feasible. Theorem 2: The set G output by the algorithm is optimal. Proof idea: If we can find a witness set with |W|=|G|, G is optimal. Let Si be the strip of all points with x -coordinates between x(gi−1) + 𝜁 and x(gi).
EuroCG 2018
Sweep Algorithm
14
Lemma 1: The set G output by the algorithm is feasible. Theorem 2: The set G output by the algorithm is optimal. Proof idea: If we can find a witness set with |W|=|G|, G is optimal. Let Si be the strip of all points with x -coordinates between x(gi−1) + 𝜁 and x(gi). We place a witness wi per guard gi such that VT(wi)⊆Si ∀i.
EuroCG 2018
Sweep Algorithm
14
Lemma 1: The set G output by the algorithm is feasible. Theorem 2: The set G output by the algorithm is optimal. Proof idea: If we can find a witness set with |W|=|G|, G is optimal. Let Si be the strip of all points with x -coordinates between x(gi−1) + 𝜁 and x(gi). We place a witness wi per guard gi such that VT(wi)⊆Si ∀i.
e’=[vj, q) for some point q∈ej, q≠vj+1 we place witness at q𝜁, a point 𝜁 to the left of q on T
EuroCG 2018
Sweep Algorithm
14
Lemma 1: The set G output by the algorithm is feasible. Theorem 2: The set G output by the algorithm is optimal. Proof idea: If we can find a witness set with |W|=|G|, G is optimal. Let Si be the strip of all points with x -coordinates between x(gi−1) + 𝜁 and x(gi). We place a witness wi per guard gi such that VT(wi)⊆Si ∀i.
e’=[vj, q) for some point q∈ej, q≠vj+1 we place witness at q𝜁, a point 𝜁 to the left of q on T
Theorem 3: Uni-monotone polygons are perfect.
EuroCG 2018
Runtime
15
- Preprocessing: mark points O(n2)
EuroCG 2018
Runtime
15
- Preprocessing: mark points O(n2)
- Accordingly: mark points from left for opening points (using left vertex of an edge to shoot the ray)
EuroCG 2018
Runtime
15
- Preprocessing: mark points O(n2)
- Accordingly: mark points from left for opening points (using left vertex of an edge to shoot the ray)
- and for soft opening points (using right vertex of an edge to shoot the ray)
EuroCG 2018
Runtime
15
- Preprocessing: mark points O(n2)
- Accordingly: mark points from left for opening points (using left vertex of an edge to shoot the ray)
- and for soft opening points (using right vertex of an edge to shoot the ray)
- Whenever we insert a guard
EuroCG 2018
Runtime
15
- Preprocessing: mark points O(n2)
- Accordingly: mark points from left for opening points (using left vertex of an edge to shoot the ray)
- and for soft opening points (using right vertex of an edge to shoot the ray)
- Whenever we insert a guard
- Shoot O(n) rays
EuroCG 2018
Runtime
15
- Preprocessing: mark points O(n2)
- Accordingly: mark points from left for opening points (using left vertex of an edge to shoot the ray)
- and for soft opening points (using right vertex of an edge to shoot the ray)
- Whenever we insert a guard
- Shoot O(n) rays
- For each of intersection points re: shoot ray through vme’
EuroCG 2018
Runtime
15
- Preprocessing: mark points O(n2)
- Accordingly: mark points from left for opening points (using left vertex of an edge to shoot the ray)
- and for soft opening points (using right vertex of an edge to shoot the ray)
- Whenever we insert a guard
- Shoot O(n) rays
- For each of intersection points re: shoot ray through vme’
➡ O(n2 log n) - not optimized
EuroCG 2018
Runtime
15
- Preprocessing: mark points O(n2)
- Accordingly: mark points from left for opening points (using left vertex of an edge to shoot the ray)
- and for soft opening points (using right vertex of an edge to shoot the ray)
- Whenever we insert a guard
- Shoot O(n) rays
- For each of intersection points re: shoot ray through vme’
➡ O(n2 log n) - not optimized O(n)
EuroCG 2018
Runtime
15
- Preprocessing: mark points O(n2)
- Accordingly: mark points from left for opening points (using left vertex of an edge to shoot the ray)
- and for soft opening points (using right vertex of an edge to shoot the ray)
- Whenever we insert a guard
- Shoot O(n) rays
- For each of intersection points re: shoot ray through vme’
➡ O(n2 log n) - not optimized O(n)
EuroCG 2018 16
Lemma 1: The set G output by the algorithm is feasible. Theorem 2: The set G output by the algorithm is optimal. Proof idea: If we can find a witness set with |W|=|G|, G is optimal. Let Si be the strip of all points with x -coordinates between x(gi−1) + 𝜁 and x(gi). We place a witness wi per guard gi such that VT(wi)⊆Si ∀i.
e’=[vj, q) for some point q∈ej, q≠vj+1 we place witness at q𝜁, a point 𝜁 to the left of q on T
Theorem 3: Uni-monotone polygons are perfect.