Visibility-Based Pursuit-Evasion in a Polygonal Region by a Searcher Sang-Min Park
Jae-Ha Lee
Kyung-Yong Chwa
CS/TR-2001-161 January 29, 2001
KAIST Department of Computer Science
Visibility-Based Pursuit-Evasion in a Polygonal Region by a Searcher Sang-Min Park1
Jae-Ha Lee2
Kyung-Yong Chwa1
1
Dept. of Computer Science Korea Advanced Institute of Science and Technology, Korea E-mail: {smpark,kychwa}@jupiter.kaist.ac.kr 2
Max-Planck-Institut f¨ ur Informatik, Germany E-mail:
[email protected]
Abstract We consider the most basic visibility-based pursuit-evasion problem defined as follows: Given a polygonal region, a searcher with 360◦ vision, and an unpredictable intruder that is arbitrarily faster than the searcher, plan the motion of the searcher so as to see the intruder. In this paper, we present simple necessary and sufficient conditions for a polygon to be searchable, which settles a decade-old open problem raised in [15]. We also show that every searchable polygon is also searchable by a searcher with two flashlights (that is, ray visions). This implies, combined with the previous work, that there is an O(n2 )-time algorithm for constructing a search path for an n-sided polygon.
1
Introduction
The visibility-based pursuit-evasion problem is that of planning the motion of one or more searchers in a polygonal environment to eventually see an intruder that is unpredictable, has unknown initial position, and is capable of moving arbitrarily fast. This problem can model many practical applications such as search for an intruder in a house, rescue of a victim in a dangerous house and other surveillance with autonomous mobile robots. The motion plan calculated could be used by robots or human searchers. This paper discusses the most basic problem with a single searcher. Imagine that a detective has to find a fugitive in a house with no way 1
out. Probably, she should drive the fugitive into a corner by looking at every suspicious corner one by one. Can she eventually see the fugitive who is much faster? Or can the fugitive keep sneaking out of sight of the detective? It depends on the geometry of the house. More formally, we assume that the searcher’s environment is a simple polygon. The searcher is equipped with the omnidirectional vision that provides the visibility polygon in real time (also called ∞-searcher in [1, 15]). The intruder is assumed to have an unknown initial position and to be capable of moving arbitrarily fast, whereas the searcher can move at bounded speed. The question is whether the searcher can eventually see the intruder controlled by the adversary. If this is the case, the polygon is said to be searchable. Related work There have been many researches on detecting the unpredictable intruder. The general problem was first studied in the context of graphs, where the searchers and the intruder can move from vertex to vertex until a searcher and the intruder eventually lie in one vertex [11, 13]. After adopting geometric free-space constraints and visibility of the searchers, this problem has attracted much attention in computational geometry and robotics [1, 3–6, 8, 10, 15, 16, 18]. As the first attempt, Suzuki and Yamashita [15] introduced the polygon search problem, which is the topic of this paper. They presented some necessary or sufficient conditions for a polygon to be searchable by a single searcher but no complete characterizations. Guibas et al. [3] presented a complete algorithm to search a polygon by a single searcher, but the complexity of this problem, including the analysis of their algorithm, remains open. As a characterizable variant of the polygon, many researchers considered rooms and corridors. A room is a polygonal region having one door and the searcher should detect the intruder while not allowing the intruder to reach the door. Lee et al. [10] characterized the class of searchable rooms and presented an O(n2 )-time algorithm for constructing a search path. A corridor is a polygonal region having two doors and should be searched from one door d to the other door d′ in such a way that an intruder should be detected or evicted through d′ . Crass et al. [1] characterized the class of searchable corridors. The previous characterizations for rooms and corridors rely on the ‘orientation’ implicitly defined by the doors and thus cannot be applied to the polygon search problem. Suzuki and Yamashita [15] defined searchers with various visibilities.
2
The k-searcher has k flashlights each of which provides the scene along one ray that can be rotated at some bound speed. One interesting conjecture is that any searchable polygon is also searchable by the 2-searcher, which is the motivation of the introduction of the k-searcher. Recently, the authors of the present paper presented an O(n2 )-time algorithm for constructing a search schedule of the 2-searcher [9], which is also complete for the ∞-searcher if the above conjecture is true. There is a recent paper [17] which claims, incorrectly, the same result as ours. For details see Appendix. Our results This paper solves the polygon search problem. We first give three necessary conditions, say N1, N2, and N3, for a polygon to be searchable and show that they are sufficient. The main idea is to separate two necessary conditions N2 and N3 (N1 is previously known) as well as two steps in the sufficiency proof and to connect them in one-to-one way. As a by-product, we show that any searchable polygon is also searchable by a 2-searcher, which means that the O(n2 )-time algorithm for the 2-searcher [9] is also complete for the general searcher.
2 2.1
Preliminaries Problem Definition
We are given a simple polygon P in the plane. The searcher and the intruder are modeled as points that move continuously within P . Let φ(t) denote the position of the intruder at time t ≥ 0. It is assumed that φ : [0, ∞) → P is a continuous function, and the intruder is unpredictable in that he is capable of moving arbitrarily fast and his path φ is unknown to the searcher. Let γ(t) denote the position of the searcher at time t ≥ 0. Let γ represent a continuous path of the searcher of the form γ : [0, ∞) → P . The initial position of the searcher has no importance because she can move to any point and start searching there. Two points p and q are visible from each other if the segment pq does not intersect the exterior of P . For a point q ∈ P , let Vis(q) denote the set of all points in P that are visible from q. The searcher has the 360◦ vision, i.e., she sees all the points in Vis(γ(t)) at t. The polygon P is searchable if there exists a path γ such that for every continuous function φ : [0, ∞) → P , there is a time instant t ∈ [0, ∞) such that φ(t) ∈ Vis(γ(t)). That is, the intruder will be seen by the searcher
3
regardless of his path φ. Figure 1 depicts an example of a searchable polygon and some snapshots of its search path.
(a)
(c)
(b)
(d)
Figure 1: Some snapshots of a search path of the searcher. Gray region is currently visible from the searcher and dark region might contain the intruder.
2.2
Notations
Let ∂P denote the boundary of P . We assume that ∂P is oriented in the clockwise direction. For points p, q ∈ ∂P , the chain [p, q] denotes the connected boundary chain from p to q in the clockwise direction. Analogously, (p, q) (respectively, (p, q], [p, q)) denotes [p, q] \ {p, q} (respectively, [p, q] \ {p}, [p, q] \ {q}). An edge e of P is contained in a line l; an extended edge is a maximal line segment e′ ⊂ (l ∩P ) that shares only one endpoint (but no interior point) with e and whose the other endpoint also lies on ∂P . Each edge induces at most two extended edges. We call an extended edge e′ a cut and we call e the inner edge of the cut e′ (see Figure 2a). Every cut e′ divides the polygon into two sub-polygons: one containing e, called the inside of e′ , and the other. Observe that to see an inner edge e, the searcher must visit the inside of e′ . Let us denote two endpoints of a cut e′ by B(e′ ) and U (e′ ) such that the inside of e′ is bounded by e′ and the chain [B(e′ ), U (e′ )]. A chain C is said to contain a cut e′ , if [B(e′ ), U (e′ )] ⊆ C. A cut e′ is an essential cut if [B(e′ ), U (e′ )] contains no other cuts (see Figure 2a). In this paper, we consider essential cuts only. For a region R in P , the visibility polygon of R, written Vis(R), specifies the set of all points in P each of which is visible from some point in R. See Figure 2b. We define a cave of the cut e′ to be a (open) connected chain of ∂P whose two endpoints lie in Vis(e ′ ) but no other points. A cave of e′ is called a left cave if it lies to the left of the boundary of Vis(e ′ ); otherwise, it is a right cave. 4
B(e′ ) U (e′ ) e′ e
(a)
non-essential cut essential cut ′ 0 1 0∩ ∂P : left cave of e 1 11 00 ′ 00 11 00∩ ∂P : right cave of e 11
1 0 00 11 00000 11111 0 1 00 11 00000 11111 0 1 00 11 00000 11111 0 1 00e′ 11 00000 11111 Vis(e ′ ) 00000 11111 00000 11111 00 11 00 11 (b)
Figure 2: Definition of cuts, essential cuts and caves.
3
Necessary Conditions for Searchable Polygons
Suppose that γ is a search path for P . Following γ, the searcher crosses or touches every essential cut. Consider a fixed time t. Any region that might contain an undetected intruder is said to be contaminated; otherwise, it is clear. If a region is contaminated right before t and is clear at t, it is said to be cleared or become clear at t. The following observation is easily seen from the assumption that the intruder can move arbitrarily fast. Fact 1 Any region that is disjoint from Vis(γ(t)) is entirely clear or entirely contaminated at t. Fact 2 If a point p is cleared at t, p ∈ Vis(γ(t)). A cut c is defined to be clear if the inner edge of c is clear;1 otherwise it is contaminated. Fact 3 If a cut c is cleared at t, γ(t) lies in the inside of c. Since the intruder has unbounded speed, any path of the undetected intruder can be mapped to a path of the undetected intruder along ∂P . Thus, we assume w.l.o.g. that the intruder always moves along the boundary of P in the rest of this paper. In this section we present three necessary conditions for a polygon to be searchable. The first condition N1 is previously known. The second one N2 uses a new concept, called 2-cover. The third one generalizes the idea used in the last necessary condition for a room to be searchable, described in [10]. Sufficiency of these conditions will be shown in Section 4. 1
One might wonder why we do not use a more natural definition that a cut is clear if its inside is clear. With this definition, however, we cannot guarantee Fact 3 when two or more cuts overlap.
5
3.1
N1
Let us begin with examples that are known to be not searchable. See Figure 3a. We call them an unguarded triple, shortly u-triple. Formally, three cuts a, b, and c form a u-triple, if any two of them are contained in one cave of the other. The following theorem is not new (refer to [15]). Theorem 1 (N1) If a polygon contains a u-triple, it is not searchable.
b a
c1
b c
c2
a c0 c
c3 c4
(a) u-triple
(b) 5-Windmill
Figure 3: Dark region denotes the inside of a cut. (a) Examples that violate N1. (b) {ci | 0 ≤ i ≤ 4} has no 2-cover.
3.2
2-Cover and N2
Another example that is known to be not searchable consists of five cuts (Figure 3b). This is called 5-windmill. Interestingly, this forbidden pattern can be extended into k-windmills for any k ≥ 5. We introduce a new concept of 2-cover that explains why k-windmills are not searchable. We need some definitions. Let c0 , c1 , · · · , cm (= c0 ) denote essential cuts ordered by B (ci ) in the clockwise direction. If a cave of ci contains ci+1 , we call it the L-cave of ci . Symmetrically, if a cave of ci contains ci−1 , we call it the R-cave of ci . Notice that a cave of ci may contain both ci−1 and ci+1 (for example, see cut a in Figure 3a); in this case, the L-cave of ci is the same as the R-cave of ci and we say that ci is a deep cut. Observe that the L-cave of ci may be a left or a right cave of ci (for example, see cut a in Figure 3a). If a cut ci has the L-cave or the R-cave, we call it a neighbor. 6
Let N be the set of all neighbors in P . The reason why we define neighbors can be roughly stated as follows: whether a polygon is searchable or not depends on the visibility relation between essential cuts and the visibility is more restricted at neighbors than at other cuts. If a cut ci has both the L-cave and the R-cave which are different (i.e., ci is not deep), then we duplicate ci , in N , into imaginary twin cuts, say cli and cri , so that each copy has the unique L-cave or R-cave but not both. For a neighbor ci ∈ N , we denote the L-cave (or R-cave) of ci by Q(ci ) and its complement by D(ci ). That is, D(ci ) = ∂P \Q(ci ). (Observe that points in D(ci ) are not necessarily visible from ci .) Two neighbors ci and cj are said to be non-dominating each other if ci is contained in Q(cj ) and cj is contained in Q(ci ). Lemma 2 Let a and b are neighbors that are non-dominating each other. If {a} ∪ {b} becomes clear at t, either Q(a) or Q(b) is clear right before t. Proof: Two cuts that are non-dominating each other cannot be cleared at the same time, by Fact 3. Assume w.l.o.g. that a is cleared at t. The searcher must be inside of a at t by Fact 3. Since b lies in Q(a) and is clear at t, Q(a) is entirely clear at t by Fact 1. Since the searcher can move at bounded speed only, Q(a) must be clear right before t. A set X ⊆ ∂P covers an essential cut c if [B (c), U (c)] ∩ X is non-empty. Since D(c), Q(c) and [B (c), U (c)] are boundary chains, all relations in which we are interested (such as containment and covering) are defined for boundary chains. Definition 1 For a subset S of N , two essential cuts a and b form a 2-cover of S if a, b ∈ S and D(a) ∪ D(b) covers every cut in S. Theorem 3 (N2) If a polygon is searchable, there exists a 2-cover of S for any S ⊆ N such that all neighbors in S are associated with their L-caves (or R-caves symmetrically). Proof: An example violating N2 is given in Figure 3b. The set {ci | 0 ≤ i ≤ 4} has no 2-cover. For contradiction, suppose that a set S (⊆ N ) has no 2-cover and that the polygon P is searchable. We assume w.l.o.g. that every neighbor in S is associated with its L-cave. We fix a search path γ for P . Let c ∈ S denote the cut whose Q(c) becomes clear for the first time among the cuts in S by γ. Let t denote that time instant. 7
We claim that Q(c) contains two cuts in S that are non-dominating each other. Let Q(c) = (p, q). See Figure 4. To show this claim, we first pick a cut of S that is contained in Q(c) and that is first met when we traverse ∂P from q counterclockwise; let a denote that cut. Since S has no 2-cover, at least one cut of S is contained in Q(c) ∩ Q(a). Pick a cut in S, say b, that is contained in Q(c) ∩ Q(a) and that is first met when we traverse ∂P from B (a) counterclockwise. Clearly a is contained in Q(b) because otherwise, it is easily seen that a and b form a 2-cover of S (specifically, every cut contained in (B(b), U (a)) is covered by D(a) and every cut contained in (B(a), U (b)) is covered by D(b)). Therefore a and b are non-dominating each other.
a Q(c) b p
q Q(a)
Figure 4: Proof of Theorem 3.
Thus {a} ∪ {b} is clear at t and there is a time instant t′ (≤ t) at which {a}∪{b} becomes clear. Since a and b are non-dominating each other, either Q(a) or Q(b) is clear right before t′ by Lemma 2, which is a contradiction to the fact that Q(c) becomes clear for the first time.
3.3
Cycle in clearing order and N3
The third necessary condition uses the simple fact that for a polygon to be searchable, there must be no cycle in the order of clearing essential cuts in P. Let S = hc1 , c2 , c3 i be a triple of essential cuts that appear along ∂P in this order. We call S an s-triple if c1 has the L-cave that is a left cave and both c2 and c3 lie in it, and c3 has the R-cave that is a right cave and both c1 and c2 lie in it (in Figure 5b, hc1 , c3 , c4 i is an s-triple). This definition is a slight modification of the s-triple defined in [10] and the proof of the following lemma is exactly same as that of Lemma 1 in [10]. 8
Lemma 4 Suppose that a polygon P is searchable and that γ is its search path. If hc1 , c2 , c3 i is an s-triple, γ clears c1 or c3 last among {c1 , c2 , c3 }. If S is an s-triple, we say that c2 has an s-pair hc1 , c3 i. Lemma 4 says that any cut having an s-pair is not cleared last. The third necessary condition is a direct extension of this statement. Theorem 5 (N3) If every cut in P has an s-pair, P is not searchable. Proof: Examples that violate N3 is given in Figure 5. In Figure 5a, each ci has an s-pair hci−1 , ci+1 i. In Figure 5b, both c2i and c2i+1 have an s-pair hc2i−1 , c2i+2 i.
c2
c1
c4
c3 c3
c2
c5 c6
c1 c4 c0
c0
c5 (a)
c7 (b)
Figure 5: Examples of non-searchable polygon that violate N3. Suppose that every essential cut in P has an s-pair and that P is searchable. Let γ denote a search path and let S be a set of all essential cuts.. Then some cuts will be cleared last among those in S by γ. However, every cut has an s-pair and so cannot be cleared last, which is a contradiction.
4
Sufficiency
We will show in this section that a polygon P is searchable if it satisfies three necessary conditions described in Section 3. Theorem 6 A polygon P is searchable, if it satisfies N1, N2, and N3. In the rest of this section, we prove Theorem 6. To show that the polygon P is searchable, we consider a searcher with restricted visibility, called a 9
2-searcher [15]. The 2-searcher has two flashlights whose visibility is limited to two rays emanating from her position, where the direction of each ray can be changed independently and continuously with bounded angular rotation speed. We will show that the polygon is 2-searchable if it satisfies three necessary conditions. This implies that the 2-searcher has the same search capability as the searcher with 360◦ visibility, because any 2-searchable polygon is searchable. Actually, the 2-searcher has been used in the sufficiency proof of all previously-known characterizations [1, 10]. The basic idea is to divide the search into two steps and to use a greedy algorithm within each step. • In the FIRST STEP, the 2-searcher clears D(c) for some c ∈ N as in Figure 6. (If N is empty, the 2-searcher can easily search the polygon.) • In the SECOND STEP, the 2-searcher clears Q(c). During this step, we allow the points in D(c) to be recontaminated. • Post-processing: If D(c) was contaminated in the SECOND STEP, the 2-searcher clears it. We will see that this post-processing is always possible if the FIRST STEP runs successfully; thus we can safely ignore this step. For example see Figure 1, where c is the lower right cut. (While the searcher has 360◦ visibility in Figure 1, the 2-searcher can also search the polygon in the same manner.) The searcher first clears D(c) in (a), clears Q(c) in (b), (c), and (d); during the second step, D(c) is recontaminated, so the searcher must visit c again as post-processing, which is omitted in Figure 1. The above separation between two steps seems to be crucial: we show that the SECOND STEP is always successfully done if N1 and N2 hold (Section 4.3) and that the FIRST STEP is always successfully done if N1 and N3 hold (Section 4.4).
4.1
Movements of the 2-searcher
Let us denote two flashlights of the 2-searcher by FL and FR . Suppose that the searcher stands at a point s ∈ P , aiming FL and FR at points p and q respectively (see Figure 6). Intuitively, we view the polygonal chain p, s, q as a variable-length two-segment chain V and search P by sweeping it with V, satisfying the following invariant: when V is p, s, q, the chain [q, p] is clear. Especially, during the search, we keep V straight as long as possible.
10
(Details about when we bend V are explained later.) While V is straight, we use a shorthand p, q to denote p, s, q. s
q c p
p
q
s
c
(b)
(a)
Figure 6: Currently, V is at p, s, q. The chain [q, p] is clear. We will use the sub-movements defined in [1] to advance V. See Figure 7. Suppose that the current V is p, q. If some chain [p, r] is entirely visible from q, we can advance the left endpoint of V continuously to r, fixing the right endpoint (Figure 7a); we call this movement l-advance-by-sweep. If the clockwise neighborhood of p along ∂P is not visible from q, we take the point r (∈ (p, q)), closest to p, that is visible from q. Note that r lies on the line extending the segment pq. If [p, r] contains no essential cuts, we can advance V from p, q to r, q by performing l-advance-along-lid (Figure 7b and c), in which the searcher first moves to p fixing FR at q and then clears [p, r] by moving along the segment pr and by scanning the chain [p, r] with FL . (Note that V bends in this case.) Sometimes we can advance V by l-advanceby-rotation (Figure 7d), which is the ‘rotation’ from p, q to a, b centered at r′ where a ∈ (p, q) and b ∈ (q, p) and [p, a] is entirely visible from r′ . Although the right endpoint of V may jump backwards in l-advance-by-rotation, no intruder can sneak into the region below V. Actually, during the execution of all sub-movements no intruder can sneak into the region below V. The radvance-by-sweep,r-advance-along-lid, and r-advance-by-rotation are defined symmetrically. It will turn out that the above six types of sub-movements suffice to search any searchable polygon. Proofs of all previously-known characterizations used sub-movements only [1, 10]. Lemma 7 If the 2-searcher moves from p, s, q to p′ , s′ , q ′ using sub-movements only, the 2-searcher can move from q ′ , s′ , p′ to q, s, p using sub-movements only. Proof: Consider the reverse execution of each sub-movement in Figure 7. Clearly, during this reverse execution, the intruder cannot sneak from the 11
r p
q
(a)
p
q
r
r
(b)
p
q
a p
(c)
q r′
(d)
b
Figure 7: The left endpoint of V is advancing. region below V into the region above V. This means the reverse execution is also a sub-movement, if the opposite side of V is clear. The same arguments hold for the symmetric sub-movements. Due to this lemma, post-processing can be successfully done by the reverse execution of the FIRST STEP.
4.2
A characterization of searchable corridors [1]
Basically sufficiency proof is based on the case analyses. To simplify the proof, we utilize the previously-known characterization of the class of searchable corridors. A corridor is a polygon with two edge doors, d = pq and d′ = p′ q ′ . A corridor is searchable if the searcher starting at d can find the intruder or evict him through d′ out of P in such a way that the intruder couldn’t make a dash for the door d. Crass et al. [1] presented a characterization of searchable corridors and showed that the 2-searcher can search any searchable corridor, using sub-movements only. We restate them here in our notation. See Figure 8 for example of unsearchable corridors. Theorem 8 [1] A corridor (P , d , d ′ ) for d = pq and d′ = p′ q ′ is searchable if and only if the following three conditions C1,C2, and C3 hold: (C1) Every cut in [p, p′ ] is visible from some point in [q ′ , q]; and every cut in [q ′ , q] is visible from some point in [p, p′ ]. (C2) There are no cuts a and b such that (i) a is contained in [p, p′ ] and b is contained in [q ′ , q], (ii) a has the L-cave that is a left cave and that contains b and d′ , and (iii) b has the R-cave that is a right cave and that contains a and d′ . (C3) There are no cuts a and b such that (i) a is contained in [p, p′ ] and b is contained in [q ′ , q], (ii) a has the R-cave that is a right cave and that 12
contains b and some point of d, and (iii) b has the L-cave that is a left cave and that contains a and some point of d. A pair of cuts that violates C2 or C3 is called “deadlock”. p′
p′
q′
q′
b
a q
p
p′
a
q
p
q′
b p
q
(b)
(a)
(c)
Figure 8: Corridors that violate (a) C1, (b) C2, or (c) C3.
4.3
SECOND STEP
The starting configuration of the SECOND STEP would be as in Figure 9: D(c) is clear, Q(c) = (p, q) is the L-cave of c and contaminated, and V is p, q. We will repeatedly meet similar configurations; we refer to it as Room(c, p, q). (In this paper, we mostly consider the L-cave as a Room. This choice is arbitrary and symmetric arguments apply equally well to the case that Room is the R-cave.) p q
q
c
c
p
(b)
(a)
Figure 9: Starting configuration of the SECOND STEP. The next lemma says that V can advance locally. Lemma 9 Suppose that the current configuration is Room(c, p, q). If N1 holds, the 2-searcher either can clear the polygon or arrives at the configuration Room(u, ·, ·) for the most counterclockwise neighbor u in Q(c) such that q lies in the L-cave of u. 13
Proof: Suppose the current configuration is Room(c, p, q). See Figure 9. Thus V is p, q. Let u be the most counterclockwise neighbor contained in Q(c) such that q lies in the L-cave of u. It will turn out that if such a neighbor u does not exist, the 2-searcher can clear the polygon. Let c1 = c, α(c1 ) = q, α ¯ (c1 ) be some point in [B(c1 ), U (c1 )] that is visible from q. We define ci , α(ci ) and α(c ¯ i ) for i ≥ 2 inductively: ci is the neighbor first met when we traverse ∂P from B (ci −1 ) clockwise such that α(ci−1 ) lies in the L-cave or the R-cave of ci . If α(ci−1 ) is contained in the L-cave (resp. R-cave) of ci , α(ci ) is set to the point that is visible from some boundary point, say α(c ¯ i ), in the inside of ci and that is first met when we traverse ∂P from α(ci−1 ) clockwise (resp. counterclockwise). V advances step by ¯ (ci−1 ), α(ci−1 ). There are two cases step. Suppose that V is currently at α (see Figure 10): • Case 1. α(ci−1 ) lies in the L-cave (say S) of ci . If S is a right cave of ci , ci−1 is also contained in S. We claim that no cut is contained in [α(ci ), α ¯ (ci )]. Indeed otherwise, that is, if some cut lies in [α(ci ), α ¯ (ci )], the most counterclockwise one contains α(ci−1 ) in its Rcave, which contradicts the definition of ci . Since no cut is contained ¯ (ci ), α(ci ). in [α(ci ), α ¯ (ci )], the 2-searcher can easily move to α Now assume that S is a left cave of ci . See Figure 10a. Let d1 (= ci−1 ), d2 , · · · , dj (= ci ) be the essential cuts in this order. Let β(dk ) denote the point that is visible from some boundary point in the inside ¯ k ) and that is first met when we traverse ∂P from α(ci−1 ) of dk , say β(d ¯ k ), β(dk ), for all 1 ≤ k ≤ j, using clockwise. Then V can go through β(d sub-movements. (In Figure 10a, V advances using l-advance-by-sweep and l-advance-by-rotation and dark regions are cleared by l-advancealong-lid.) • Case 2. α(ci−1 ) lies in the R-cave of ci . See Figure 10b. In this case we can find a neighbor cj with the largest index j (< i) such that α(ci ) lies in the L-cave of cj . Let us temporarily view [α(c ¯ j ), α ¯ (ci )]∪[α(ci ), α(cj )] ¯ (cj )α(cj ) and α ¯ (ci )α(ci ). as a corridor, where two doors are line segments α It is easily seen that this corridor satisfies C1 (that is, every cut in [α ¯ (cj ), α ¯ (ci )] is visible from some point in [α(ci ), α(cj )] and vice versa) because otherwise we can find a u-triple. Moreover it is easily seen that “deadlock” does not occur (otherwise, we can find a u-triple again). This means [α ¯ (cj ), α ¯ (ci )] ∪ [α(ci ), α(cj )] is a searchable corridor and V ¯ (ci ), α(ci ) using the algorithm described in [4]. can advance to α 14
α(ci )
α(c ¯ i)
α(c ¯ i) α(ci−1 )
α(ci−1 ) = β(d2 ) ci−1
d2
α(ci )
α(cj ) cj α(c ¯ j)
ci−1
(a)
(b)
Figure 10: Proof of Lemma 9. (a) Case 1. (2) Case 2. In this way, the 2-searcher can advance step by step. If the neighbor u does not exist, the right endpoint of V never goes over q, so P will be cleared. ¯ (u), α(u). Depending on the location Thus assume that u exists and V is α of α(u), either no cut lies in (α(u), ¯ α(u)) or α(u) lies in the chain (q, B(u)). In the former case, the 2-searcher has nearly cleared the polygon and can complete searching easily. In the latter case, the 2-searcher must be performing Case 1, so α(u) is the clockwise endpoint of the L-cave of u. Thus the 2-searcher can easily move to Room(u, ·, ·). The procedure in the proof of Lemma 9 is called Local-Advance. In one execution of Local-Advance, V advances from Room(c, p, q) to Room(u, ·, ·) (if searching is completed during this execution we are done). One might suspect there is no progress. But this is not true; one endpoint of V can advance towards a goal, because the left endpoint and the right endpoint of V rotate clockwise. Let us return to the proof of the SECOND STEP. From the starting configuration Room(c, p, q), we repeatedly apply Lemma 9 – to find the new neighbor u and move to Room(u, ·, ·) by the procedure Local-Advance – until either the left endpoint of V reaches q or the right endpoint of V reaches p. If the first event occurs before the second event, it means the 2-searcher has already cleared Q(c), and so we can complete the SECOND STEP by simply backtracking the right endpoint of V to p. If the second event occurs before the first event, the right endpoint of V must be backtracking. When this execution of Local-Advance finishes, the resulting configuration is like this (Figure 11): the 2-searcher has cleared D(r ) for some r ∈ N and the L-cave Q(r ) of r contains both p and q. To complete the SECOND STEP, it suffices to show the following lemma.
15
s′
s c
r
p q
Figure 11: Lemma 10. Lemma 10 Suppose that the current configuration is Room(r, s′ , s) and that there is a neighbor c such that c and r are contained in the L-cave of each other. If N1 and N2 hold, the 2-searcher can clear Q(c). Proof: See Figure 11. Suppose that V is currently at s′ , s and D(r ) is clear. First let us view [p, s] ∪ [s′ , q] as a corridor with doors s′ s and qp. If it is 2-searchable we are done. Thus assume otherwise. If it contains “deadlock”, we can find a u-triple. Thus some cut in the chain [p, s] is not visible from the chain [s′ , q], or vice versa. To simplify the explanation, we imagine that a pair of 2-searchers Vb and Vu start from configurations Room(c, p, q) and Room(r, s′ , s), respectively, and show that they will meet at some time instant so that Vb and Vu correspond to each other. By Lemma 7, this implies the present lemma. Let L and R be sets of neighbors, initially L = {c} and R = {r}. If some cut in the chain [p, s] is not visible from the chain [s′ , q], take the most counterclockwise neighbor in [p, s] whose L-cave or R-cave contains [s′ , q]. (Symmetric arguments using Lemma 7 hold for the case that some cut in [s′ , q] is not visible from [p, s].) Let u denote it and assume that u is contained in [p, s]. First we claim that [s′ , q] is contained in the L-cave of u, because otherwise, that is, if it lies in the R-cave of u, then three cuts c, r, and u form a u-triple. So q is in the L-cave of u and by Lemma 9 Vb can advance to Room(u, ·, ·). Moreover since the set L ∪ R ∪ {u} must have 2-cover (by N2), D(u) must contain all cuts in L. We push u into L and update p and q to be the endpoints of D(u). We repeat the above procedure until two boundary chains between Vb and Vu contain no cut that is not visible from the opposite chain. Why does not this procedure fall into an infinite loop? Notice that whenever u is picked in [p, s], D(u) must cover the cuts in L and especially cut c, to 16
satisfy N2. This means the right endpoint of Vb cannot backtrack over U (c) and thus the left endpoint of Vu cannot go over U (c). Since one of Vb and Vu rotates each time but cannot go over some fixed point, this procedure will finish.
4.4
FIRST STEP
We will show that if N1 and N3 hold, the 2-searcher can clear D(c) for some neighbor c ∈ N . We choose a neighbor c such that D(c) does not contain D(w ) for any w ∈ N other than c. By Lemma 7, it suffices to show that the 2-searcher can clear P , assuming that Q(c) is clear. Since the polygon satisfies N3, some essential cut has no s-pair; let g denote such a cut. z
g
u
y
c
p
v′
x
q
v
(a)
(b)
Figure 12: (a) The starting configuration of the reverse execution of the FIRST STEP. (b) Case 2 of the proof of the FIRST STEP. Suppose that Q(c) is clear and that V is currently v, v ′ . See Figure 12a. Pick the neighbor w such that w is first met when we traverse from v clockwise and that Q(w ) contains v ′ . Observe that Q(w ) is the L-cave and a left cave of w (because otherwise D(w ) ⊂ D(c)). By using (Case 1 of) the procedure Local-Advance, the 2-searcher can clear D(w ) and arrive at Room(w, ·, ·). Then we repeatedly apply the procedure Local-Advance, until V arrives at the configuration Room(x, p, q) such that g is contained in (p, U (u)] for the most counterclockwise neighbor u in Q(x ) whose L-cave contains q. See Figure 12b.
17
Temporarily let us view Q(x ) as a corridor with two doors pq and B (g)U (g). If it is 2-searchable we are done. Assume otherwise. If there is a “deadlock”, it is easily seen that P violates N1 or g has an s-pair, which is a contradiction. Thus some cut in the chain [p, B (g)] is not visible from the chain [U (g), q] or vice versa. There are four cases and since there is no u-triple, Case 2 cannot occur simultaneously with other cases. • Case 1. [U (g), q] is contained in the L-cave of a neighbor (say y) in [p, B (g)]. Then y is to the counterclockwise of u, which contradicts the definition of u. • Case 2. [U (g), q] is contained in the R-cave of a neighbor in [p, B (g)]. See Figure 12b. Take the most clockwise cut (say y) in [p, B (g)] such that the R-cave of y contains [U (g), q]. Then using the procedure Local-Advance, we can clear Q(y). If we continue Local-Advance, either searching is completed or we meet some neighbor, say z, whose L-cave contains g and which makes the right endpoint of V backtrack over g. Then the resulting configuration is Room(z, ·, ·). We use Local-Advance until V arrives at the configuration Room(c′ , p′ , q ′ ) such that g is contained in (p′ , U (u′ )] for the most counterclockwise neighbor u′ in Q(c ′ ) whose L-cave contains q ′ . (Of course it is possible that c′ equals z.) Consider the corridor Q(c ′ ) with doors p′ q ′ and B (g), U (g). Since Case 2 cannot occur simultaneously with other cases and this corridor cannot violate Case 2 again (note that the left endpoint of V has passed y), it is a 2-searchable corridor. • Case 3. [p, B (g)] is contained in the L-cave of a neighbor in [U (g), q]. Among such neighbors, let y denote the most counterclockwise one. Proof is nearly symmetric with Case 2. First we can clear Q(y) by Lemma 10. Next, we execute the symmetric variant of Local-Advance, until either searching is completed or we meet some neighbor, say z, whose R-cave contains g and which makes the left endpoint of V backtrack over g. In the same way as Case 2, we can complete searching. • Case 4. [p, B (g)] is contained in the R-cave (say S) of a neighbor (say y) in [U (g), q]. If S is a right cave of y, g has an s-pair hx, yi, which is a contradiction. Assume otherwise, that is, S is a left cave of y. We claim that this case reduces to Case 3. If y is deep, Q(y) is also the L-cave of y, which can be dealt with in Case 3. Otherwise, there
18
is another neighbor y ′ whose L-cave contains [p, B (g)]. This case also reduces to Case 3.
5
Concluding Remarks
In this paper we presented a characterization of the class of searchable polygons. We also showed that the searcher with 360◦ visibility and the 2searcher have the same search capability. This implies that the O(n2 )-time algorithm for the 2-searcher [9] is also complete for the searcher with 360◦ visibility. There are some open problems: • Is there any simple proof (without resorting to a characterization) to show that the 2-searcher and the searcher with 360◦ visibility have the same search capability? Some partial results can be found in [7, 14]. • Extend the characterization in this paper to the case of multiple searchers where the searchers should form a chain during the search [2]. (For multiple searchers without chain restriction, the complexity of constructing a search schedule is in NP-hard [3].)
References [1] D. Crass, I. Suzuki, and M. Yamashita. Searching for a mobile intruder in a corridor–the open edge variant of the polygon search problem. Int. J. of Comp. Geom. and Appl., 5(4):397–412, 1995. [2] A. Efrat, L. Guibas, S. Har-Peled, D. Lin, J. Mitchell, and T. Murali. Sweeping simple polygons with a chain of guards. In Proc. of 16th Symp. on Discrete Algorithm, pages 927–936, 2000. [3] L.J. Guibas, J.C. Latombe, S.M. Lavalle, D. Lin, and R. Motwani. A visibility-based pursuit-evasion problem. Int. J. of Comp. Geom. and Appl., 9(4):471–493, 1998. [4] C. Icking and R. Klein. The two guards problem. In Proc. 7th Annu. ACM Sympos. Comput. Geom., pages 166–175, 1991. [5] S. M. LaValle, B. H. Simov, and G. Slutzki. An algorithm for searching a polygonal region with a flashlight. In Proc. of 16th ACM Symp. on Computational Geometry, pages 260–269, 2000. 19
[6] S.M. Lavalle, D. Lin, L.J. Guibas, J.C. Latombe, and R. Motwani. Finding an unpredictable target in a workspace with obstacles. In Proc. IEEE int. Conf. Robotics and Automation, 1997. [7] J.-H. Lee, S.-M. Park, and K.-Y. Chwa. On the polygon-search conjecture. Technical Report TR-2000-157, CS department, KAIST, 2000. [8] J.-H. Lee, S.-M. Park, and K.-Y. Chwa. Searching a polygonal room with one door by a 1-searcher. Int. J. of Comp. Geom. and Appl., 10(2):201–220, 2000. [9] J.-H. Lee, S.-M. Park, and K.-Y. Chwa. Simple algorithms for searching a polygon with flashlights. Submitted, 2000. [10] J.-H. Lee, S.Y. Shin, and K.-Y. Chwa. Visibility-based pursuit-evasion in a polygonal room with a door. In Proc. 15th ACM Sympos. on Computational Geometry, pages 281–290, 1999. [11] N. Megiddo, S.L. Hakimi, M.R. Garey, D.S. Johnson, and C. H. Papadimitriou. The complexity of searching a graph. Journal of the ACM, pages 18–44, 1988. [12] S.-M. Park, J.-H. Lee, and K.-Y. Chwa. A characterization of the class of polygons searchable by a 1-searcher. Technical Report TR-2000-160, CS department, KAIST, 2000. [13] T.D. Parsons. Pursuit-evasion in a graph. In Theorey and Applications of Graphs Y. Alavi and D.R. Lick eds. Lecture Notes in Mathematics, Springer-Verlag., pages 426–441, 1976. [14] I. Suzuki, Y. Tazoe, M. Yamashita, and T. Kameda. Searching a polygonal region from the boundary. In TR-20000925, EECS Department, Univ. of Wisconsin-Milwaukee, 2000. [15] I. Suzuki and M. Yamashita. Searching for a mobile intruder in a polygonal region. SIAM J. Comp., 21(5):863–888, 1992. [16] I. Suzuki, M. Yamashita, H. Umemoto, and T. Kameda. Bushness and a tight worst-case upper bound on the search number of a simple polygon. IPL, 66:49–52, 1998. [17] X. Tan. Searching a simple polygon by a k-searcher. In Proc. of 11th ISAAC, pages 503–514, 2000. 20
[18] M. Yamashita, H. Umemoto, I. Suzuki, and T. Kameda. Searching for mobile intruders in a polygonal region by a group of mobile searchers. In Proc. 13th Annu. ACM Sympos. Comput. Geom., pages 448–450, 1997.
6
Appendix
There is a recent paper [17] that claims a similar result to ours. But the main result of this paper is incorrect. His characterization decides that the polygon in Figure 13 is not searchable but in fact it is searchable. a’
b
c b’
a
e
d’
c’
e’
d
Figure 13: A counter-example of Tan’s characterization. Dark rectangles denote the inside of essential cuts. One might suspect that the mistake can be minor. But since the first theorem (claiming necessary conditions for the 1-searcher) is wrong, the succeeding theorems (that claim sufficiency and the extension to the searcher with 360◦ visibility) are all wrong. Moreover, from personal communication, we confirmed that Tan considered a different model of the 1-searcher from ours [12]. Unfortunately, his claim of a direct extension for the searcher with 360◦ visibility is incorrect.
21