An Optimal Strategy for Searching in Unknown ... - Semantic Scholar

Report 2 Downloads 70 Views
An Optimal Strategy for Searching in Unknown Streets? Sven Schuierer and Ines Semrau Institut fur Informatik, Universitat Freiburg Am Flughafen 17, D-79110 Freiburg, Germany

fschuiere,[email protected]

Abstract. We consider the problem of a robot searching for an un-

known, yet visually recognizable target in a street. A street is a simple polygon with start and target on the boundary so that the two boundary chains between them are weakly mutually visible. We are interested in the ratio of the search path length to the shortest path length which is called the competitive ratio of the strategy. We present an optimal p strategy whose competitive ratio matches the known lower bound of 2, thereby closing the gap between the lower bound and the best known upper bound.

1 Introduction

A fundamental problem in robot motion planning is to search for a target in an unknown environment. We consider a robot with an on-board vision system that can identify the target on seeing it. The robot's information consists of the local visibility maps it has obtained so far. Thus the search strategy performs on-line, and the method of competitive analysis as introduced by Sleator and Tarjan [19] can be applied to measure its quality. A strategy is c-competitive or has a competitive ratio (or factor ) of c if its cost does not exceed the cost of an optimal solution times c. In our context, the distance traveled by the robot must not exceed c times the shortest path length. Competitive on-line searching has been investigated in various settings such as searching in special classes of simple polygons [2, 3, 5, 15{17] and among convex obstacles [8]. We restrict ourselves to searching in so-called streets which were introduced by Klein as the rst environment that allows searching with a constant competitive ratio [9]. Klein presents the strategy lad which is based on the idea of minimizing the l ocal a bsolute d etour. He gives an upper bound on its competitive ratio of  5:71. The upper bound on the competitive factor was later improved by Icking to  4:44 [4]. A number of other strategies have been presented since by Kleinberg [10], Lopez-Ortiz and Schuierer [12{14] and Semrau [18]. The currently best known competitive ratio is  p 1:514 [7]. In this paper, we present an optimal strategy with competitive ratio 2  1:41. The same strategy was independently discovered and analysed by Icking et al. [6]. In the next section, we give an outline of ?

This research is supported by the DFG-Project \Diskrete Probleme", No. Ot 64/8-2.

how to search in streets and point out the subproblem that must be solved. In section 3, an optimal strategy for this problem is presented. 2 Searching in a street

The robot, modeled as a point, is located at the start position s in a simple polygon P . It has to nd the target t. Both points, s and t, are vertices of P . Together with the polygon, they form a street subject to the following de nition. De nition 1. A simple polygon P in the plane with two distinguished vertices s and t on its boundary is called a street if the two boundary chains from s to t are weakly mutually visible. An example for a street is depicted in Figure 1(a). We brie y summarize some facts about searching in streets (see [9, 12, 18]). Due to the simple lower bound example pshown in Figure 1(b), there is no strategy with a competitive ratio less than 2 [9]. If a strategy moves to the left or right before seeing t, then tpcan be placed on the opposite side, thus forcing the robot to travel more than 2 times the diagonal. Crucial for search strategies is how they behave in funnels, shown as shaded areas in Figure 1(a). A funnel consists of two re ex chains induced by vertices of the street polygon. A re ex chain is a polygonal chain all of whose vertices have an interior angle larger than . Klein shows that if a strategy achieves a competitive factor c in funnels, then it can be embedded in a so-called high level strategy to provide a c-competitive strategy for searching in streets [9]. Outside of funnels, the high level strategy takes the shortest path as depicted in Figure 1(a). To examine the funnel situation, we introduce some notations. The two re ex chains start in a common point p1 and end in the vertices vn and wn , cf. Figure 2(a). A strategy to search in a funnel will know whether to go to vn or wn before reaching the line segment vn wn [9], where we assume that no three vertices of the street are collinear. For a path point pi in a funnel, we denote the most advanced visible point on the left chain by vi and the most advanced visible point on the right chain

{

s t

t

e 1

Ǹ2

s

(a)

(b)

Fig. 1. (a) An optimal search path in a street (b) A lower bound for searching in rectilinear streets

pn

vi + vi)1

vn + pn)1

bpi)1

2gi)1 api)1 2gi

pi)1 pi

opening angle

wn

wi)1

wi aq

bq

2gq

vi

wi

q 2gi gl

v0 + p1 + w0

(a)

pi

gr

(b)

Fig. 2. A funnel and its notations by wi . The last path point in the funnel is denoted by pn+1 which equals vn or wn . The path point before going straight to pn+1 is denoted by pn . We de ne the visibility angle of a point pi to be the angle between the line segments from pi to vi and to wi having a value of 2 i which is always < . The visibility angle of p1 is called the opening angle of the funnel. For a point q in the triangle vi pi wi , we denote the angle between vi pi and vi q by q and the angle between wi pi and wi q by q ; cf. Figure 2(b). Note that the value of the visibility angle of q is 2 q = 2 i + q + q . Furthermore, we de ne i := i ? =4, n+1 := n , and v0 := w0 := p1 . The length of a line segment between two points a and b is denoted by ab and its length by jabj. As proved by Lopez-Ortiz and Schuierer, a c-competitive strategy for funnels with opening angle  =2 can be extended by their strategy clad (c ontinuous lad) to a c-competitive strategy for arbitrary funnels [14]. Thus, we only consider funnels with opening angle  =2. 3 The Strategy glad

We shall de ne a strategy to traverse funnels by specifying a condition which must be ful lled by two path points pi and pi+1 . In the following, these two points are always chosen such that on the path between them (without end-points) no new vertex becomes visible.

3.1 Outline and Correctness of the Strategy

The strategy, glad (g eneralized clad), can be regarded as a generalization of the strategy clad proposed by Lopez-Ortiz and Schuierer [14] where every two path points pi and pi+1 , i < n, ful ll the condition jpi vi j?jpi+1 vi j = jpi wi j?jpi+1 wi j. For a path point pi and a point q with visibility angle 2 q in the triangle vi pi wi we de ne lp ;q := jpi vi jg( i ) ? jqvi jg( q ) Dpl ;q := jpi qj=lp ;q rp ;q := jpi wi jg( i ) ? jqwi jg( q ) Dpr ;q := jpi qj=rp ;q where g is the glad function g : [=4; =2] ! [0; 1], g( ) = cos ( ? =4). i

i

i

i

i

i

The condition for the strategy glad is an extension of the clad condition to lp ;p +1 = rp ;p +1, i < n, or Dpl ;p +1 = Dpr ;p +1 (glad condition) . Two segments of length lp ;p +1 = rp ;p +1 are depicted in Figure 3. i

i

i

i

i

i

i

i

i

i

i

i

wi + wi)1 2gi)1

vi + vi)1

2g lpi, pi)1 i

1) |gā(āgi) 1wi p i) | ) |gā(āgi |piwi

pi)1 pi

rpi, pi)1

Fig. 3. The points pi and pi+1 ful ll the glad condition It is possible to obtain an outline of the glad path if only a few point pairs have to ful ll the glad condition; cf. Figure 4. Every point pair with no new visible vertex on the connecting path ful lls the glad condition, e. g. point pairs (p1 , p2 ) and (p1 , p3 ). Note that if (pi , pi+1 ) and (pi+1 , pi+2 ) ful ll the glad condition, then (pi , pi+2 ) also does. p4

rp5, p6

p5 +pn rp4, p5

p3

rp3, p4 w1 + w2

p2

w3 + w4 + w5 + p6

rp2, p3 rp1, p2 p1

Fig. 4. A polygonal path passing through a nite number of path points Before stating Lemma 1, we give the domains (if not restricted further in the text) of some frequently used variables:   <  0  i = i ? 4 < 4 q + q   ? 2 i . i i+1 < 2 4

Lemma 1. Let q be a point in the triangle vi pi wi . The segment pi q divides the visibility angle of pi into l and r as in Figure 2(b). Then sin q  Dpl ;q = l sin ( + q ) cos i ? sin l cos i + +2 sin q  Dpr ;q = sin ( r + q ) cos i ? sin r cos i + +2 i

i

q

q

q

q

 

.

Proof. Let the value of the visibility angle of q be 2 q . Dividing numerator and denominator of Dpl ;q by jpi qj and applying the law of sines in the triangle vi pi wi yields sin q   Dpl ;q = jp v jg( j)p?i qjjqv jg( ) = i i i i q sin ( ? l ? q ) g( i ) ? sin l g i + +2 sin q  . = l sin ( + q ) cos i ? sin l cos i + +2 The proof for Dpr ;q is analogous. ut Before analyzing the strategy, we show that the glad path approaches a point on vn wn . Therefore, we examine the path in one triangle vi pi wi . In the remaining paper we assume that the points pi , vi , and wi always satisfy the condition jpi vi j  jpi wi j. Of course, the analysis is analogous if jpi vi j > jpi wi j. Lemma 2. The glad path approaches viwi in a triangle vipi wi as long as no new vertex becomes visible. Every path point pk lies in the interior of the triangle vi pi wi to the left of or on the bisector of pi 's visibility angle (that is, l  r), and lp ;p = rp ;p > 0. The proof is omitted due to space limitations. Lemma 2 implies that the glad path approaches a point on vn wn since if a new vertex becomes visible on the path in the triangle vi pi wi , then the continuing path approaches vi+1 wi+1 of the next triangle. Two paths are exemplarily shown in Figure 5. i

i

q

q

q

q

i

i

k

i

k

vi

vi

vi*1

Fig. 5. Two glad paths

3.2 Analysis of the Strategy

We analyze the competitive ratio of the strategy glad by approximating the path with polygonal paths. This idea (Lemma 3 and Theorem 1) is taken from Lopez-Ortiz and Schuierer [14]; Lemma 3 is only extended by the glad function. With this lemma, the ratio of the length of a polygonal path (connecting a nite number of points pi ) to the shortest path length can be estimated by regarding every segment pi pi+1 and a corresponding portion of the shortest path. An example is depicted in Figure 4. We denote the shortest path in the funnel from a to b by S (a; b), the glad path by G(a; b), and the length of a path X by jX j.

Lemma 3. Let pi , 1  i  n, be path points in a funnel with opening angle  =2 and let g be the glad function. If pn = vn and Dpl ;p +1  c or pn = wn and Dpr ;p +1  c, for all 1  i  n, then the length of the polygonal path through the points pi , 1  i  n + 1, is at most c jS (p ; pn )j. Proof. Let  denote the polygonal path. We have to estimate j j=jS (p ; pn )j and assume pn = wn . The case for pn = vn is symmetric. If no new vertex is visible in pi , then jwi wi j = 0, else jwi wi j > 0. In either case, jwi wi j = jpi wi j ? jpi wi j, 0  i < n; cf. Figure 2(a). This equation together with jp w j = 0 and jpn wn j = 0 yields +1

i

i

+1

i

i

1

+1

1

+1

+1

+1

1

+1

+1

+1

+1

+1

+1

+1

0

+1

Pn

i=1 rpi;pi+1

Pn 



= i=1 jpi wi jg( i ) ? jpi+1 wi jg( i+1 ) ? jp1 w0 jg( 1 ) + jpn+1 wn jg( n+1 )  P ?1 ? ?1 jw w j = jS (p ; p )j . = in=0 jpi+1 wi+1 j ? jpi+1 wi j g( i+1 )  Pin=0 i i+1 1 n+1 By the inequality (a1 + a2 )=(b1 + b2 )  max fa1=b1 ; a2 =b2g, which holds for b1 , b2 > 0, and the above lower bound on jS (p1 ; pn+1 )j it follows that

Pn jpi pi j  max jpi pi j = max Dr = c ; j j Pin  in rp ;p +1 in p ;p +1 jS (p ; pn )j i rp ;p +1 here, rp ;p +1 > 0 is required in the second inequality, for 1  i  n, which is ensured by Lemma 2. ut +1

=1

1

i

+1

=1

i

i

+1

1

i

i

1

i

i

i

If we approximate the glad path by polygonal paths and estimate their lengths by Lemma 3, then the optimality of the strategy glad can be proved as follows.

p Theorem 1. The strategy glad is 2-competitive in funnels with opening angle  =2.

Proof. We connect a nite number of points pi of the glad path G(p1 ; pn ) and the point pn+1 to a polygonal path. The length of the glad path G(p1 ; pn+1 ) is the supremum of the lengths of all such polygonal paths. Let M be the set of all polygonal paths  for which , 2 (0; =2), is an upper bound on p +1. For the supremum, it suces to consider the polygonal paths from a single set M since every polygonal path outside this set can be extended to one contained in it by inserting additional points. To estimate the length ofpa polygonal path  2 M by Lemma 3, we rst show the upper bound c := 2=(1 ? sin( )) for all values Dpl ;p +1 and Dpr ;p +1, 1  i  n. For i < n, the points pi and pi+1 satisfy the glad condition. We prove in Lemma 5 that for two such points the values Dpl ;p +1 and Dpr ;p +1 are at most p 2=(1 ? sin p +1) implying an upper bound of c on them as p +1  < =2. For i = n, we obtain (cf. Figure 4) i

i

i

i

i

i

i

i

i

i

p Dpr ;p +1 = jp wjpnjgp(n +1)j ? 0 = jp jwpn wjgn( j ) < g(1) = 2 < c . n n n n n n n

n

i

Analogously, Dpl ;p +1 < c. By Lemma 3, every polygonal path from the set M has a length of at most c jS (p1 ; pn+1 )j. Since every set M , 2 (0; =2), yields an upper bound on the length of the glad path, we obtain p 2  jS (p ; p )j = p2 jS (p ; p )j . jG(p1 ; pn+1 )j  2(0inf;=2) 1 ? sin( 1 n+1 1 n+1 ) ut n

n

p

It remains to prove the bound 2=(1 ? sin p +1) for Dpl ;p +1 (= Dpr ;p +1) if pi and pi+1 satisfy the glad condition. From now on, we only deal with the path point pi+1 and write p +1 and p +1 without indices. Since pi+1 lies in the interior of the triangle vi pi wi by Lemma 2, i. e. and are positive, we de ne z := = , and z > 0 holds. We need the following function de nitions and the properties thereafter which hold for the path point pi+1 . i

i

i

i

i

i

i

De nition 2. Let i := i ? =4, x 2 (0; =2), i 2 [=4; =2), z > 0. The

functions T , A, A , B , B  , and D , whose (additional) arguments z , i , and (if depending on) are omitted for the sake of readability, are de ned as follows. +z +z T (x) := cos x ? cos 2 sin+x tan i sin 2 (z ) and A := 1 ? tan i A := 1 ? Ttan

i tan i ) ? T ( ) and B  := 2 1 ? z tan i B := T (z sin(2 i ) 1 + z sin(2 i ) p 2 l

D := cos  + 11++ztan l sin i . tan

i 2

The functions A and B  are closely related to their corresponding limit functions A0 := lim !0 A and B0 := lim !0 B . In particular, A = A0 + (1 ? z )=(2z )  tan i = tan i and B  = B0  4z=(1 + z )2 . (1) The function D results from transforming Dpl ;p +1 by ?    sin(y + x) cos i ? sin y cos i + +2z = sin x cos i cos y + T (x) sin y p to 2 l 1

l Dp ;p +1 = cos  (cos l+ T ( ) sin l) = cos  (11++Ttan ( ) tan l) i

i

i

i

i

(2)

i

and replacing T ( ) by its limit function

z

1+ 2

tan i for ! 0.

Lemma 4. Let pi and pi be two path points with i > i, and let i :=

i ? =4. The segment pi pi divides the visibility angle of pi into l and r. +1

+1

Then, with the functions from De nition 2, (a) z 2 (0; 1] (b) tan l = A tan i =(A + B )

+1

(c) A + B > 0 and A > 0 (d) A  A and B  B  (e) Dpl ;p +1  D =(1 ? sin ) . Proof. (a): We have already stated z > 0. The proof for the upper bound, z  1, is by contradiction. Assume z > 1. We show that this implies Dpr ;p +1 6= Dpl ;p +1, hence z must be  1. The assumption z > 1 is equivalent to > and yields for the expressions from Lemma 1 1=Dpl ;p +1 > cos( l ? i ) and 1=Dpr ;p +1 < cos( r ? i ) . By Lemma 2 we have 0 < l  i and i  r < 2 i , for which the inequality cos( l ? i )  cos( r ? i ) easily can be shown. Hence, 1=Dpl ;p +1 > 1=Dpr ;p +1. (b): Starting with Dpl ;p +1 = Dpr ;p +1 and solving for tan l yields the claim by using r = 2 i ? l and (2). The proofs of (c){(e) are based on T ( )  lim !0 T ( ) = 1+2 z tan i and T (z )  lim !0 T (z ) = 1+2zz tan i which can easily be shown. From this follows that A + B  1 ? T (z ) + T (z ) ? T ( ) > 0, A  A0 , and B  B0  0, where A0 and B0 again denote the limit functions of A and B for ! 0. A0  A and B0  B  follows from (1) and B0  0 and proves (d). From A + B > 0, tan l > 0, and Lemma 4(b), we obtain A > 0. The proof of (e) is omitted due to space limitations. ut i

i

i

i

i

i

i

i

i

i

i

i

i

i

i

i

i

i

Now we prove an upper bound for Dpl ;p +1 (= Dpr ;p +1), pi and pi+1 being two points satisfying the glad condition. Replacing the occurrences of l in Dpl ;p +1 via Lemma 4(b) yields Dpl ;p +1 as a function of , z and i . A numerical analysis of this function (with respect to the conditions A > 0 and z p 2 (0; 1] from Lemma 4) suggests that the function achieves its maximal value p 2 for z = 1. In the following analysis of the function, we show the upper bound 2=(1 ? sin ) which is sucient for our purpose. i

i

i

i

i

i

i

i

Lemma 5.p For two points pi and pi satisfying the glad condition, Dpl ;p +1 = Dpr ;p +1  2=(1 ? sin ). p Proof. Because of Lemma 4(e), it suces to show that D  2. Let f and f denote the numerator and denominator? of D , respectively. We use A + B > 0   0 which implies 2  f =f , from Lemma 4(c) and prove ( A + B ) 2 f ? f p  hence 2  f =f = D . In addition to the functions f and f , we de ne the +1

i

i

i

i

1

2

two functions

1

2 2

2 1

2 1

2

1

?

2

2 2

2



Q( i ; z ) := (1 ? z ) 1 ? tan i ?  R( i ; z ) := 2 sin(2 i ) ? 1 + z cos(2 i ) tan i Since ?cos(2 i )=sin(2 i ) = (tan2 i ? 1)=(2 tan i ) and z  1,  ? ?  B   R( i ; z )  1 ? z tan i 1 + tan2 i .

(3)

Furthermore, since tan i = (tan i ? 1)=(1 + tan i ), ?  A tan i (1 ? tan i ) = tan i ?tan2 i ? 1 .

p

(4)

p

Now, using cos i = (cos i + sin i ) = 2, sin i = (sin i? ? cos i )= 2 and replacing tan l via Lemma 4(b), we obtain that (A + B )2 2f22 ? f12 equals ?



?



(A + B )2 cos i + sin i 2 + 2(A + B ) sin2 i ? cos2 i (1 + z )=2  A tan i +  ? (1 + z )2 =4  A2 tan2 i sin i ? cos i 2 ? (A + B )2 ? A2 tan2 i . If we subtract 2B 2 sin i cos i , use (1 + z )2 =4  z , and simplify the resulting expression, we obtain  ? (A + B )2 2f22 ? f12  A2  tan i Q( i ; z ) + AB  R( i ; z ) ; since Q( i ; z )  0 and R( i ; z )  0 because of z  1, tan i  1 and cos(2 i )  0, we obtain by Lemma 4(c) and (d) ?

 A A tan i  Q( i ; z ) + B   R( i ; z )



and use (3) and (4) to nally get ?



 A(1 ? z ) A tan i (1 ? tan i ) + tan i (1 + tan i ) = 0 . ut Theorem 1 completes the proof of p Lemma 5, the optimality of the strategy glad. 2

Together with the lower bound 2, we have the following result. Theorem 2. For robots with vision system, the strategy glad, pcombined with the strategy clad and embedded into the high level strategy, is a 2-competitive strategy for target searching in streets, and this is optimal.

4 Conclusions We have solved the target searching problem for streets by presenting an optimal strategy for funnels. The strategy consists of two parts and changes from clad to glad upon reaching the visibility angle =2. Regarding the strategy and the path, two questions arise. Is it possible to traverse a funnel optimally without changing the strategy? And is it possible to traverse a funnel with a path consisting only of line segments? Concerning the second question, the strategy clad can be replaced without losing optimality by following the bisector of the rst visibility angle until a new vertex becomes visible and repeating this until the visibility angle =2 is reached [11, 18]. For the remaining part of the funnel, Lopez-Ortiz already shows that an optimal path of line segments cannot be obtained if the robot changes its direction only on seeing a new vertex [11]. It is questionable if optimality can be achieved here with a nite number of additional direction changes.

References 1. A. Blum, P. Raghavan, and B. Schieber. Navigating in unfamiliar geometric terrain. In Proc. 23rd ACM Symp. on Theory of Computing, pages 494{503, 1991. 2. A. Datta, Ch. Hipke, and S. Schuierer. Competitive searching in polygons| beyond generalized streets. In Proc. Sixth International Symposium on Algorithms and Computation, pages 32{41. LNCS 1004, 1995. 3. A. Datta and Ch. Icking. Competitive searching in a generalized street. In Proc. 10th ACM Symp. on Computational Geometry, pages 175{182, 1994. 4. Ch. Icking. Motion and Visibility in Simple Polygons. PhD thesis, FernUniversitat Hagen, 1994. 5. Ch. Icking and R. Klein. Searching for the kernel of a polygon: A competitive strategy. In Proc. 11th ACM Symp. on Computational Geometry, pages 258{266, 1995. 6. Ch. Icking, R. Klein and E. Langetepe. An Optimal Competitive Strategy for Walking in Streets. This Proceedings. 7. Ch. Icking, A. Lopez-Ortiz, S. Schuierer, and I. Semrau. Going home through an unknown street. Manuscript, 1998. Submitted to Comptutational Geometry: Theory and Applications. 8. B. Kalyanasundaram and K. Pruhs. A competitive analysis of algorithms for searching unknown scenes. Computational Geometry: Theory and Applications, 3:139{155, 1993. 9. R. Klein. Walking an unknown street with bounded detour. Computationl Geometry: Theory and Applications, 1:325{351, 1992. 10. J. M. Kleinberg. On-line search in a simple polygon. In Proc. 5th ACM-SIAM Symp. on Discrete Algorithms, pages 8{15, 1994. 11. A. Lopez-Ortiz. On-line Target Searching in Bounded and Unbounded Domains. PhD thesis, Department of Computer Science, University of Waterloo, 1996. 12. A. Lopez-Ortiz and S. Schuierer. Going home through an unknown street. S. G. Akl, F. Dehne, and J.-R. Sack, editors, In Proc. of 4th Workshop on Data Structures and Algorithms, LNCS 955, pages 135{146, 1995. 13. A. Lopez-Ortiz and S. Schuierer. Simple, ecient and robust strategies to traverse streets. In Ch. Gold and J.-M. Robert, editors, Proc. Seventh Canadian Conference on Computational Geometry, pages 217{222. Universite Laval, 1995. 14. A. Lopez-Ortiz and S. Schuierer. Walking streets faster. In Proc. 5th Scandinavian Workshop on Algorithm Theory, pages 345{356. LNCS 1097, 1996 15. A. Lopez-Ortiz and S. Schuierer. Generalized streets revisited. In M. Serna J. Diaz, editor, Proc. 4th European Symposium on Algorithms, pages 546{558. LNCS 1136, 1996. 16. A. Lopez-Ortiz and S. Schuierer. Position-independent near optimal searching and on-line recognition in star polygons. In Proc. 5th Workshop on Algorithms and Data Structures, pages 284{296. LNCS 1272, 1997. 17. A. Lopez-Ortiz and S. Schuierer. The Exact Cost of Exploring Streets with a CAB. In Proc. 10th Canadian Conf. on Computational Geometry, 1998. 18. I. Semrau. Analyse und experimentelle Untersuchung von Strategien zum Finden eines Ziels in Straenpolygonen. Masters thesis (Diplomarbeit), FernUniversitat Hagen, 1996. 19. D. D. Sleator and R. E. Tarjan. Amortized eciency of list update and paging rules. Communications of the ACM, 28:202{208, 1985.