Randolphs Robot Game is NP-hard!

Randolphs Robot Game is NP-hard!

Electronic Notes in Discrete Mathematics 25 (2006) 49–53 www.elsevier.com/locate/endm Randolphs Robot Game is NP-hard! Birgit Engels Zentrum f¨ ur an...

169KB Sizes 0 Downloads 34 Views

Electronic Notes in Discrete Mathematics 25 (2006) 49–53 www.elsevier.com/locate/endm

Randolphs Robot Game is NP-hard! Birgit Engels Zentrum f¨ ur angewandte Informatik, University of Cologne, Germany

Tom Kamphans Institut f¨ ur Informatik I, University of Bonn, Germany Abstract We introduce a new type of movement constraints for a swarm of robots in a grid environment inspired by Alex Randolphs board game Ricochet Robots. We assume that once a robot starts to drive in a certain direction, it does not stop its movement until it hits an obstacle wall or another robot. (This property can be used to model robots with very limited abilities for self-localization.) We show that the question whether a given cell can be reached is NP-hard for arbitrary environments. A Java applet for simulating robot swarms moving with these constraints can be found in http://www.geometrylab.de/RacingRobots/. Keywords: Robot navigation, robot swarms, NP-hardness

1

Introduction

Robot motion planning has received a lot of attention both in computational geometry and in robotics; see, for example, [1,5,4,2]. For a more detailed overview on related work in different settings, please refer to our technical report [3]. Here we consider a quite simple robot model in an unknown grid environment, a cellular surrounding which is subdivided by a rectangular integer grid similar to a chessboard. The robots—called Randolph Robots after the inspirating board game—are regarded as ”short sighted” in the following way: A robot can move in one of the four directions (north, east, south, or west), but once it has chosen a direction it continues to move in this direction until it hits an obstacle, or another robot which is assumed to be necessary to locate 1571-0653/$ – see front matter © 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.endm.2006.06.062

50

B. Engels, T. Kamphans / Electronic Notes in Discrete Mathematics 25 (2006) 49–53

its position. This gives the cracking point to Randolph’s game (as it is often necessary to move robots that serve as guides to stop the movement of another robot on an appropriate cell) and, moreover, introduces an approach to the problem of self-localization with very restricted sensors to our robot model. Assuming that the Randolph robots in a common environment are able to communicate with each other, or all of them are controlled by the same computer, we regard them as a swarm or system R of N robots r1 , . . . , rN which start either from a common start cell s or from a given start configuration S = (s1 , . . . , sN ) inside a (grid) polygon. The polygon is formed by cells, which can be determined by each robot’s sensors to be free (so the robot can move in or through from a neighboring cell), to belong to an obstacle, or to be occupied by another robot. The robots’ sensors are restricted to the four neighboring cells to its current cell, but the system R provides at least enough memory to store current and former positions of all robots belonging to R. We show that the reachability problem for a given target cell in this setting (or the solution to Randolph’s game) in arbitrary environments is NP-hard.

2

Reachability in Arbitrary Polygons

Let the Reachability Problem be defined as follows: Given an arbitrary grid polygon P , a system R of N Randolph robots r1 , . . . , rN , a start configuration S = (s1 , . . . , sN ), and a target cell t. Is one of the robots able to reach t ? We show that the Reachability Problem is NP-hard by reducing the 3SATProblem: Given a boolean expression, α, consisting of m clauses C1 , . . . , Cm over n variables X1 , . . . , Xn , where each clause consists of three literals. Is there a truth assignment for X1 , . . . , Xn such that α is fulfilled? Given an expression α, we construct a polygon, P (α). In the following, we give a brief description of the construction. 1 The robot system R consists of n + 1 robots, r0 , r1 , . . . , rn , where n is the number of variables in the 3SAT instance. The robot r0 starts on a special start cell s0 and its purpose is to reach t. Note, that r0 is the only robot that may reach t, if t is reachable at all. Each of the other robots rk , 1 ≤ k ≤ n, represents a variable Xk and its truth assignment. Thus, we call these robots literal robots. We assign Xk := 1 if the robot enters the left-hand vertical passage (Xk passage) of the corresponding fork polygon, and Xk := 0 otherwise. Moving south into cpi , a robot rk stops on a cell dij marked with an arrow in 1

For more details and proofs see our technical report [3], where we discuss also lower bounds on the number of robots needed to reach every cell.

B. Engels, T. Kamphans / Electronic Notes in Discrete Mathematics 25 (2006) 49–53

sk

OU TXk OU T¬Xk

Fig. 1. A fork polygon

51

A literal robot rk starts at a cell sk in a subpolygon called fork polygon f pk , see Figure 1. As soon as rk leaves f pk , it is impossible for rk to return to sk and to enter the other vertical passage. This property ensures the consistency of the following truth assignment: INXi1 INXi2 INXi3 OU TXi1 OU TXi2 OU TXi3

I Nclause

di3

di1

di2

OU Tclause

Fig. 2. A clause polygon

For every clause Ci in α we construct a clause polygon cpi , see Figure 2. The robot r0 may pass a clause polygon if and only if the clause polygon is visited by at least one of the literal robots corresponding to the literals in Ci . This, in turn, is only possible, if the clause Ci in α is fulfilled.

Figure 2. Now, imagine that the robot r0 moves from INclause to the horizontal passage marked with ◦ where rk is positioned. The robot r0 stops in front of rk and can change its direction to enter the vertical passage marked with × in Figure 2 leading to OU Tclause . We now combine the clause and fork polygons to one polygon P (α): We arrange the clause polygons on the left-hand side of P (α) and the fork polygons on top of P (α), each of them with sufficient space for the connections, see the example in Figure 3. Then we consecutively connect all clause polygons by a passage. Further, we connect INclause of cp1 to the start cell s0 of r0 and OU Tclause of cpm to the target cell t. Thus, r0 has to pass consecutively all clause polygons. but no literal robot rk is able to leave its Xk - or ¬Xk -passages through them. Further, r0 cannot reach one of these passages. Now, if t is reachable by r0 , r0 must pass every clause polygon with the property motivated above: Lemma 2.1 The robot r0 may pass a clause polygon from INclause to OU Tclause if and only if the corresponding clause in α can be fulfilled. At the same time r0 reaches a clause polygon cpi , at least one literal robot rk must enter cpi . This corresponds to the conditions to fulfill α: The consistent truth assignment derived from the literal robots that enter the clause polygons ensures that there is at least one literal fulfilled in every clause. On the other hand, any given truth assignment that satisfies α fulfills at least one literal for every clause of α; thus, for every clause polygon in P (α) there is at

52

B. Engels, T. Kamphans / Electronic Notes in Discrete Mathematics 25 (2006) 49–53

Now we connect the fork polygons to the clause polygons: First, we extend the Xk -passages and their ¬Xk -analogues of the fork polygons to the south until they reach the last clause polygon. Each of these corridors ends in a blind alley. Then we add connections from this bus structure to the clause polygons: If Xk is the jth literal in the clause Ci of α, we divert rk from the Xk -passage via INXij through cpi and via OU TXij back to the Xk -passage. Analogously for ¬Xk . Note that the passages are mostly separated by obstacles— the only exceptions are crossings of passages,

f pk

s

s1

s2

s3

s4

C1 = x1 ∨ x2 ∨ x3

cpi

Fig. 3. Construction example for Gα corresponding to α = C1 ∧C2 = (x1 ∨x2 ∨x3 )∧(¬x1 ∨x2 ∨¬x4 )

least one literal robot able to enter it. Further, all clauses are connected in a serial way, which corresponds to the conjunction of clauses in α. Thus, we can state: Lemma 2.2 There is a truth assignment that fulfills α, if and only if t is reachable by R in P (α) . It is easy to see that we need a construction time in O(mn), which is still polynomial in the size of α. Altogether, we have: Proposition 2.3 The Reachability Problem is NP-hard. Interesting open problems are of course, whether Randolph’s Robot Game is in fact NP-complete or even PSPACE-complete. And furthermore if there is a constant lower bound on the number of robots for polygons without holes and without corridors of width 1, which play a special role (see [3]), and whether there is an efficient algorithm for the Reachability Problem in this type of polygons or other special environments.

References [1] P. Berman. On-line searching and navigation. In A. Fiat and G. Woeginger, editors, Competitive Analysis of Algorithms. Springer-Verlag, 1998.

B. Engels, T. Kamphans / Electronic Notes in Discrete Mathematics 25 (2006) 49–53

53

[2] H. Choset, K. M. Lynch, S. Hutchinson, G. A. Kantor, W. Burgard, L. E. Kavraki, and S. Thrun. Principles of Robot Motion: Theory, Algorithms, and Implementations. MIT Press, Boston, 2005. [3] B. Engels and T. Kamphans. Randolphs robot game is NP-complete! Technical Report 005, Department of Computer Science I, University of Bonn, 2005. http://web.informatik.uni-bonn.de/I/publications/ek-rrgin-05.pdf. [4] J.-C. Latombe. Robot Motion Planning. Kluwer Academic Publishers, Boston, 1991. [5] J. S. B. Mitchell. Geometric shortest paths and network optimization. In J.R. Sack and J. Urrutia, editors, Handbook of Computational Geometry, pages 633–701. Elsevier Science Publishers B.V. North-Holland, Amsterdam, 2000.