Exploring Graphs with Time Constraints by Unreliable Collections of Mobile Robots
Jurek Czyzowicz, Maxime Godon, Evangelos Kranakis, Arnaud Labourel, Euripides Markou
EExploring Graphs with Time Constraints by UnreliableCollections of Mobile Robots
Jurek Czyzowicz (cid:63) , Maxime Godon , Evangelos Kranakis (cid:63)(cid:63) , Arnaud Labourel (cid:63) (cid:63) (cid:63) ,and Euripides Markou Universit´e du Qu´ebec en Outaouais, Gatineau, Canada School of Computer Science, Carleton University, Ottawa, Canada LIF, Aix-Marseille University & CNRS, France University of Thessaly, Lamia, Greece
Abstract.
A graph environment must be explored by a collection of mobilerobots. Some of the robots, a priori unknown, may turn out to be unreliable. Thegraph is weighted and each node is assigned a deadline. The exploration is suc-cessful if each node of the graph is visited before its deadline by a reliable robot.The edge weight corresponds to the time needed by a robot to traverse the edge.Given the number of robots which may crash, is it possible to design an algo-rithm, which will always guarantee the exploration, independently of the choiceof the subset of unreliable robots by the adversary? We find the optimal time,during which the graph may be explored. Our approach permits to find the maxi-mal number of robots, which may turn out to be unreliable, and the graph is stillguaranteed to be explored.We concentrate on line graphs and rings, for which we give positive results. Westart with the case of the collections involving only reliable robots. We give algo-rithms finding optimal times needed for exploration when the robots are assignedto fixed initial positions as well as when such starting positions may be deter-mined by the algorithm. We extend our consideration to the case when somenumber of robots may be unreliable. Our most surprising result is that solvingthe line exploration problem with robots at given positions, which may involvecrash-faulty ones, is NP-hard. The same problem has polynomial solutions for aring and for the case when the initial robots’ positions on the line are arbitrary.The exploration problem is shown to be NP-hard for star graphs, even when theteam consists of only two reliable robots.
Keywords:
Fault, Deadline, Exploration, Graph, Line, NP-hard, Ring, Robot, StarGraph
Alice and Bob is a busy Ottawa couple with three kids Chris, Donald and Elsa. One daythey need to pick up Elsa from the kindergarten, drive Donald to the wrestling practice (cid:63)
Research supported in part by NSERC Discovery grant. (cid:63)(cid:63)
Research supported in part by NSERC Discovery grant. (cid:63) (cid:63) (cid:63)
Research partially supported by the ANR project MACARON (anr-13-js02-0002). a r X i v : . [ c s . D S ] O c t nd get Chris to the train station. They also need to get groceries, pick up wine andflowers before each store closes for a dinner party in their house. How should Alice andBob share these tasks to minimize the e ff ort and complete each one before its deadline?An Ottawa School Bus Company needs to transport pupils to local schools beforethe start of their classes. Given the harsh Canadian climate, it is the norm rather thanexception that a number of buses fail to function on any given day and an adequate re-placement must be planned in advance. How should the buses allocate the tasks so as tosuccessfully conclude the distribution of students while respecting the time deadlines?Throughout this paper, the environment is modelled by a graph that must be ser-viced by a collection of mobile robots. The graph edges are weighted by numbers,representing the time it takes to traverse them. Each graph node is assigned a deadline,representing the maximal time moment to deliver a service to this node by some mo-bile robot. A number of robots may crash during their work. What is the minimal timeneeded to service a given graph by a collection of k robots? What is such a time if weassume that up to f unknown robots may crash during their work? We are given a weighted n -node graph G = ( V , E ) with V its set of vertices, E its set ofedges, and a set of k mobile robots initially placed at a subset of its nodes. The weight ofan edge { v i , v j } corresponds to the time it takes to be traversed by a robot. Each node v i ofthe graph is assigned a deadline ∆ i , which is a positive real number. Robots walk alongthe edges of the graph with unit speed. The robots collaborate attempting to explore theentire graph. However, a subset of up to f robots may turn out to be unreliable and failto collaborate. Unreliability refers to the robots which may be crash faulty in that theysu ff er from an (unspecified) passive, omission failure and then stop responding but areotherwise harmless. This subset of unreliable robots may be chosen by the adversary,which is assumed to know our algorithm beforehand. The exploration is successful ifeach graph node is visited before its deadline by at least one of the reliable robots.We assume that nodes already explored “do not block passage” and can still bevisited, even after their deadlines have expired, by robots on their way to reaching un-explored parts of the graph.We denote by t → r i ( t ) the trajectory of the i -th robot as a function of the time t ,where r i ( t ) denotes the position of the i -th robot in the graph at time t , for i = , , . . . , k .Note that at a given time t , a robot may be located in the interior of an edge.By a schedule we mean a set of functions r i ( t ) , i = , , . . . , k which define themotion of the robots respecting their maximum unit speed. We say that the schedule explores the graph if for each node v i there exists a robot r j such that r j ( t ∗ ) = v i , forsome time t ∗ ≤ ∆ i .Given a time ∆ , we study the decision problem whether the graph may be success-fully explored before time ∆ . We also look at the optimization problem , that is, theproblem of ensuring that the reliable robots visit every node before expiration of itsdeadline, and the last explored node is visited as fast as possible. If for any schedule,the adversary can find a subset of f unreliable robots, so that any of the remaining k − f robots fails to visit some node before its deadline, then the instance of the problem isdeemed unsolvable. .2 Related work Searching a graph with one or more searchers has been widely studied in the math-ematics literature (see, e.g. [14] for a survey). There is extensive literature on linearsearch (referring to searching a line in the continuous or discrete model), e.g., see [1]for optimal deterministic linear search and [11] for algorithms incorporating a turn cost when a robot changes direction during the search. Variants of search using collections of collaborating robots has also been investigated. The robots can employ either wireless communication (at any distance) or face-to-face communication, where communicationis only possible among co-located robots. For example, the problem of evacuation [9] isessentially a search problem where search is completed only when the target is reachedby the last robot. Linear group search in the face-to-face communication model has alsobeen studied with robots that either operate at the same speed or with a pair of robotshaving distinct maximal speeds [2,6]. Linear search with multiple robots where somefraction of the robots may exhibit either crash faults or Byzantine faults is studied in[10] and [8], respectively.The (Directed) Rural Postman Problem (DRPP) is a general case of the ChinesePostman Problem where a subset of the set of arcs of a given (directed) graph is ’re-quired’ to be traversed at minimum cost. [5] presents a branch and bound algorithm forthe exact solution of the DRPP based on bounds computed from Lagrangian Relaxation.[7] studies the polyhedron associated with the Rural Postman Problem and character-izes its facial structure. [12] gives a survey of the directed and undirected rural postmanproblem and also discusses applications.A scheduling problem considered by the research community concerns n jobs, eachto be processed by a single machine, subject to arbitrary given precedence constraints;associated with each job j is a known processing time a j and a monotone nondecreas-ing cost function c j ( t ), giving the cost that is incurred by the completion of that jobat time t . [20] gives an e ffi cient computational procedure for the problem of findinga sequence which will minimize the maximum of the incurred costs. Further, [20] alsostudies a class of time-constrained vehicle routing and scheduling problems that may beencountered in several transportation / distribution environments. In the single-vehiclescheduling problem with time window constraints, a vehicle has to visit a set of siteson a graph, and each site must be visited after its ready time but no later than its dead-line. [23] studies the problem of minimizing the total time taken to visit all sites. [15]considers the problem of determining whether there exists a schedule on two identi-cal processors that executes each task in the time interval between its start-time anddeadline and presents an O ( n ) algorithm that constructs such a schedule whenever oneexists.The author of [3] resolves the complexity status of the well-known Traveling Re-pairman Problem on a line (Line-TRP) with general processing times at the requestlocations and deadline restrictions by showing that it is strongly NP-complete. [21]considers the problem of finding a lower and an upper bound for the minimum num-ber of vehicles needed to serve all locations of the multiple traveling salesman problemwith time windows in two types of precedence graphs: the start-time precedence graphand the end-time precedence graph. [17] considers “the pinwheel”, a formalization of ascheduling problem arising in satellite transmissions whereby a piece of information isransmitted for a set duration, then the satellite proceeds with another piece of informa-tion while a ground station receiving from several such satellites and wishing to avoiddata loss faces a real-time scheduling problem on whether a “useful” representation ofthe corresponding schedule exists.The work of [22] is very related to our work in that jobs are located on a line.Each job has an associated processing time, and whose execution has to start within aprespecified time window. The paper considers the problems of minimizing (a) the timeby which all jobs are executed (traveling salesman problem), and (b) the sum of thewaiting times of the jobs (traveling repairman problem). Also related is the research onGraphs with dynamically evolving links (also known as time varying graphs) which hasbeen explored extensively in theoretical computer science (e.g., see [4,13,19]). We consider first the collections of robots which are all reliable. We start in Section2 with the case of a single robot on a line graph and we give an algorithm findingthe shortest exploration time when the robot’s starting position is given, is arbitrary,or it is arbitrary but restrained to some subset of line nodes. In Section 3 we studyline exploration by a collection of robots at fixed or arbitrary positions on the line.We observe, that these algorithms may be extended to the ring case, although theircomplexity is slightly compromised.In Section 4 we consider the case of unreliable robots. In one case, we show an unex-pected result. If k robots are at given fixed initial positions on the line and up to f out of k robots may turn out to be crash-faulty, the problem of finding the optimal explorationtime is NP-hard. This result holds even if the nodes’ deadlines may be ignored (e.g.they are infinite for all nodes). For all other settings we give algorithms finding optimalexploration times. In Section 5 we extend our approach to the ring environment. How-ever, the setting which was proven to be NP-hard for lines is polynomial-time decidablefor the ring. Finally, we show that outside the line and ring environment the problembecomes hard. For a graph as simple as a star, already for the case of two robots, theexploration problem turns out to be NP-complete.Because of the space constraints, all proofs and some illustrations are moved to theAppendix. In this section, we present algorithms that allow a single robot to solve the optimizationproblem on the line for two cases: when the robots’ initial positions are given by anadversary, and when we have the possibility of choosing them ourselves.We have a sequence of nodes v < v < · · · < v n − on the real line, and a robot r initially placed at initial position r (0). We denote by v s the starting node of the robot,i.e. r (0) = v s . Observation 1
Without loss of generality we may assume that ∆ s + < ∆ s + < · · · <∆ n − . Indeed, if ∆ k ≥ ∆ k + for some k > s we can drop node v k from consideration, sinceisiting v k + before its deadline implies that v k is also visited before its deadline. Forthe same reason, we can also assume that ∆ > ∆ > · · · > ∆ s − . Observation 2
Without loss of generality we may consider only the solutions whichconsist of sequences that are increasing and decreasing at alternate nodes, respectively,i.e., sequences r (0) , r ( t ) , r ( t ) , . . . , r ( t p ) such that ≤ r ( t i ) < r ( t i + ) , and ≥ r ( t i + ) > r ( t i + ) , for all i in the appropriate range. Moreover, each turning node r ( t i ) is locatedat some node v j , j = , , . . . , n − . With these observations in mind, we define the fundamental concept of a directed, lay-ered snapshot graph S which will form the basis of all subsequent algorithms.Every node of the snapshot graph S represents a situation when a new node of theline is visited by the robot for the first time. Consequently, each node of S is denotedby a pair ( i , ¯ j ) or (¯ i , j ), where i ≤ j , [ i , j ] is the interval of nodes already explored bythe robot and the node of the line marked with the bar (either ¯ i or ¯ j ) denotes the currentposition of the robot.Observe that the robot can advance its exploration in one of two ways: either byvisiting the next unexplored node to the left of the interval already explored, or by vis-iting the next unexplored node to its right. These two possibilities generate the directededges between the nodes of the snapshot graph. The weight of such an edge equals thetime needed by the robot to traverse the path between robot positions in both nodes.Consequently, the nodes ( i , ¯ j ) and (¯ i , j ) are placed at layer j − i and the adjacencies in S are only between nodes of consecutive layers. Notice the following properties of thesnapshot graph (see also Fig. 1 in the Appendix): – The graph S has n layers numbered from 0 to n − – There are n source nodes at the zeroth layer and 2( n − j ) nodes at the j -th layer foreach j = , , · · · , n −
1. Consequently, there are 2 target nodes (on the ( n − – The in-degree and the out-degree of each node is bounded by 2. Hence the com-plexity of the snapshot graph is O ( n ).Observe that, the solution to the optimization problem for the line corresponds tothe shortest path from the source node representing the initial position of the robot toone of its target nodes, which respects the time constraints of all the nodes of L . We first present an algorithm which produces the optimal exploration path, assuminga given starting position v s of the robot on the line. Consider the snapshot graph S de-scribed above. In order to obtain the optimal exploration path in the snapshot graph re-specting the time constraints of L , we generate an all-targets shortest-time tree T whoseroot coincides with the node ( v s , ¯ v s ) of the snapshot graph corresponding to the initialposition v s of the robot. This is done in the following way.e add a time counter time to every node of S . We set to zero the time counterof the initial node ( v s , ¯ v s ) and to ∞ the initial time counters of all other nodes of S .We then visit all nodes of S layer by layer. Consider a visit of any such node v , whichcorresponds to the first visit to node v j of L . For each predecessor of v in S we considerthe time equaling its time counter augmented by the weight of the edge joining it with v . Let Min denote the smaller of these values (we take an arbitrary one in the case ofequality). If
Min does not exceed the time constraint of v j (i.e. Min ≤ ∆ j ) we set the timeconstraint of v to Min and we add to T the edge from the corresponding predecessor of v . Otherwise, the time counter of v is set to ∞ and we leave v parentless.Observe that, T is a tree, as each node has at most one parent. One of the two targetnodes of the smaller time counter defines the optimal exploration time and the pathto it in T corresponds to an optimal exploration path of L . Otherwise, there exists noexploration path respecting the node deadlines of the line graph.For any node v of S we denote by new ( v ) the index of the node of the line G which isnewly explored when arriving at v . More exactly, new ( v ) = j , such that either v = ( i , ¯ j )or v = ( ¯ j , k ), for some i ≤ j ≤ k ≤ n − S before running the main body of the algorithm. For each node i of theline L , which may be a starting position of a robot, we put a node ( i , ¯ i ) of S to the set A .All nodes of A have their time counters initialized to 0. Procedure
InitStart( A , S ) with A a subset of nodes of S at zeroth layer; for every node v of V ( S ) \ A do time ( v ) = ∞ ; for every node v of A do time ( v ) = Algorithm 1 describes pseudo-code that formalizes the previously outlined con-struction of a shortest-time tree.
Algorithm 1:
Single Robot exploration on the line with given initial position v s ; Input:
A snapshot graph S and the starting position v s of the robot Output:
An exploration tree with optimal exploration times InitStart( { v s } , S ); for layer i = to n − do for each arc v → w starting at layer i do t = time( v ) + weight ( v , w ); if t < time ( w ) and t ≤ ∆ new ( w ) then time ( w ) = t ; v = parent ( w ); lease see the Appendix for an execution of Algorithm 1. Theorem 1.
Consider a line graph G and a robot placed at its starting position v s .Algorithm 1 correctly computes an optimal exploration path which satisfies the nodedeadlines in O ( n ) time. We now consider a variation of the problem when the choice of the starting positionof the robot is left to the user or it is restricted to be chosen from a subset of nodes ofthe line graph. We will show that Algorithm 1 also works in such a setting. We need,however, to modify the call to procedure InitStart in line 1 of Algorithm 1, so that itsfirst parameter equals the set of all nodes of the line at which the robot may start. Anexample of its execution is presented in the Appendix.Observe that, for any node w of the snapshot graph, the value of time ( w ), computedby the algorithm, represents now the shortest exploration time ending at w starting fromany node of the line graph. T is now a forest with the nodes of T , whose time counterremains at ∞ isolated in T (having no children or parent in T ). Corollary 1.
Let A be the subset of nodes of the line graph which we can choose for thestarting position of the robot. Suppose that the first parameter of the call to procedureInitStart in line 1 of Algorithm 1 ( A ) equals the set of all nodes from zeroth level of Swhich correspond to the nodes of A. Such version of Algorithm 1 correctly computesin O ( n ) time an optimal exploration path of the line graph, which satisfies the nodedeadlines. Moreover, for any sub-interval [ i , j ] of the line, the algorithm computes anoptimal robot starting position to explore [ i , j ] , the cost (time) of such exploration andthe trajectory of the robot. In this section we consider line exploration by a collection of k < n mobile robots.As before we study two variants of the time optimization problem. In the first setting,the distinct initial robot positions are given in advance. In the second setting, the initialpositions of the robots are arbitrary, i.e. the algorithm identifies the initial placement ofthe robots, which results in the shortest exploration time respecting the node deadlines.Both variants are solved using versions of dynamic programming. We start with thefollowing observation concerning the movement of the robots . Observation 3
There exists an optimal exploration solution in which the robots neverchange their initial order along the line. Moreover, the sub-intervals of the line exploredby di ff erent robots are mutually disjoint. We use the following notation. Suppose that we need to explore an interval [ i , j ] ofthe line respecting the deadlines of the nodes of [ i , j ]. For the setting when the robots are We remind the reader that all robots move with identical unit speed. laced at given initial positions, for any pair of indices i , j , such that 0 ≤ i ≤ j ≤ n − T i , j the optimal time of exploration of the interval [ i , j ] using the robotsplaced within [ i , j ]. When the initial placement of the robots is left to the algorithm, forany 1 ≤ r ≤ k , we denote by T ( r ) i , j the optimal time of exploration of the interval [ i , j ]using r robots which may be placed at arbitrary initial positions within [ i , j ]. We start with the following observation
Observation 4
Consider a line and a robot initially placed in its sub-interval [ i , j ] .Using Algorithm 1 the values T i , j for all ≤ i ≤ j ≤ n − , may be computed by theformula T i , j = min( time (( i , j )) , time (( i , j ))) (1)Let p i denote the initial position of robot i . We assume that we have 0 ≤ p < p < · · · < p k ≤ n −
1. By Observation 3 we need to partition the line into sub-intervals[ l i , r i ] for i = , , . . . , k (with l = r k = n ), each one explored by a di ff erentrobot. The interval [ l i , r i ], explored by robot i , contains its initial position p i , but not aninitial position of any other robot. Hence edges ( r i , l i + ) for i = , . . . , k −
1, that wecall idle edges , are never traversed by any robot. The following formula, is an obviousconsequence of Observation 3, T i , j = min p q < m ≤ p q + max( T i , m − , T m , j ) , (2)for any i ≤ p q , p q + < j . Indeed, the idle edge ( m − , m ), separating the sub-segmentsof operation of robots q and q +
1, is chosen so as to minimize the exploration time ofinterval [ i , j ].We give first an idea of our algorithm. We generate the snapshot graph, as describedin Subsection 2.2. Let’s use the notation p = − p k + = n . For m = , . . . , k let S m be the subgraph of S obtained by keeping the nodes (¯ i , j ) and ( i , ¯ j ) such that p m − < i , j < p m + . In the first part of our algorithm, for each robot m , we run Algorithm 1 withinputs p m and S m , obtaining the optimal exploration time T i , j of each line sub-interval[ i , j ], which contains exactly one starting position p i , for i = , , . . . , k .In the second part of the algorithm, we combine exploration times of individualrobots, in order to obtain the optimal exploration time T , j using robots initially placedwithin [0 , j ], subsequently for each j . Let r j denote the number of robots initially placedin interval [0 , j ] and suppose, that we computed the optimal exploration times of allintervals, which initially contain robots 1 , , . . . , r j −
1. When j exceeds p r j we use robot r j and we determine the idle edges preceding the intervals of operation of r j , resultingin the optimal exploration times of intervals, which initially contain robots 1 , , . . . , r j .The formal algorithm (Algorithm 2) can be found in the Appendix. Theorem 2.
Algorithm 2 in O ( n ) time computes the optimal exploration of the line byk robots initially placed at given initial positions ≤ p < p < · · · < p k ≤ n − . .2 Arbitrary initial positions This algorithm is also based on the dynamic programming approach for computing thetable T ( r ) i , j , for all 1 ≤ r ≤ k and 0 ≤ i < j ≤ n −
1. The values of T ( k )0 , n − representthe optimal exploration time of the line using k robots. We use the following formula,which works for any r , r , r , where r , r ≥ r = r + r and any 0 ≤ i < j ≤ n − T ( r ) i , j = min i ≤ k ≤ j max (cid:16) T ( r ) i , k , T ( r ) k + (cid:17) . (3)Using Formula (3), the values of T ( r ) i , j may be computed in a greedy manner for theincreasing values of r . As Formula (3) may be naturally computed in O ( n ) time, thetotal complexity of such a greedy approach is in O ( kn ).We give now a more e ffi cient algorithm computing T ( k )0 , n − . Observe first, that when[ i , j ] ⊆ [ i , j ], then T ( r ) i , j ≤ T ( r ) i , j . Consequently, when computing T ( r ) i , j , the valueof index k which minimizes max( T ( r − i , k , T (1) i , k + ) may be found by a binary search (cf.function OptTime in the Appendix).The following observation is easy. Observation 5
Consider two fixed numbers r , r of robots. If for any interval [ i , j ] ofthe line, T ( r ) i , j and T ( r ) i , j represent the optimal time of exploration of the interval by r and r robots, respectively, then function OptTime correctly computes in O (log n ) timethe optimal exploration time T ( r ) i , j of the interval [ i , j ] by r = r + r robots. The greedy approach would compute the values of table T ( r ) i , j for any given r . Ouralgorithm below computes the values of T ( r ) i , j when r is a power of 2 not exceeding k .Then, using formula 3, they are combined in (cid:100) log k (cid:101) steps, to compute the values of T ( k ) i , j .The formal algorithm (Algorithm 3) can be found in the Appendix.The following theorem proves the correctness and the complexity of Algorithm 3. Theorem 3.
Algorithm 3 computes in O ( n log n log k ) time the optimal time needed byk robots to explore the line. In this section we study the exploration problem when some of the robots may be faulty,i.e., when they fail to realize their exploration tasks. In this case, other robots need tohelp, so that eventually every node of the line is visited by some reliable robot before itsdeadline. Let there be given a weighted line L , containing n nodes with given deadlinesand a collection of k robots at most f of which may turn out to be faulty. Consider aschedule for k robots on the line L . We say that the schedule is f -reliable in time ∆ , iffor any choice of f faulty robots by an adversary, each node of the line is visited by atleast one non-faulty robot before its deadline and before time ∆ .Note that in the case of the presence of unreliable robots, it might be useful toinitially place more than one robot at the same position. Consequently, we will assumethat it is admissible for more than one robot to start from the same node of the line. bservation 6 If there can be f faulty robots, then to successfully explore a node vwith deadline ∆ ( v ) , node v must be visited by at least f + robots before time ∆ ( v ) . It is interesting to look at the decision problem as well as the optimization prob-lem related to faulty agents. In the decision problem we look for an algorithm, which,given f and ∆ , verifies whether there exists an f -reliable schedule in time ∆ . In the op-timization problem, we need an algorithm, which, for any given f , finds the minimaltime interval ∆ , which admits some f -reliable schedule in time ∆ . Clearly, solving theoptimization problem implies a solution to the decision problem and hardness of thedecision problem implies hardness of the optimization problem. We are interested inboth settings – for fixed and for arbitrary initial positions of the robots. As the case ofthe arbitrary starting positions is easier we discuss this variant first.We prove the following theorem. Theorem 4.
Let there be given a weighted line L, containing n nodes with given dead-lines and a collection of k robots, which may be put at arbitrary starting positions onL. For any < f < k the optimization problem involving up to f faulty robots may besolved in O (cid:16) n log n log (cid:106) kf + (cid:107)(cid:17) time. We now consider the more di ffi cult case of given starting positions. Contrary to thecase studied in the previous section, when the robots are assigned to fixed positions onthe line, the existence of faulty robots leads to a problem which turns out to be NP-hard.In fact, the decision problem is hard, even in the case when all individual deadlines maybe ignored (they are all larger than ∆ ), i.e. when the line does not have any node timeconstraints. Exploration of the Line with Crash Faults (ELCF) problem
Instance:
A line L , a multiset P of k starting positions of robots, a number of faults f and a time interval ∆ . Question:
Is there an exploration strategy for the collection of k robots, which mayinclude up to f faulty ones, such that each node of L is visited by at least one non-faultyrobot before time ∆ ?We construct a polynomial-time many to one reduction from the Numerical 3-Dimensional Matching problem (N3DM) which is a strongly NP-hard problem (ref-erenced as [SP16] in [18]). Theorem 5.
The ELCF decision problem is strongly NP-complete.
In this section we show that most of the results for the line environment may be adaptedto work on the ring. However, the
ELCF decision problem turns out to have a polynomial-time solution for the ring.Suppose that the ring R contains nodes 0 , , , . . . , n − R . Then every node i of the ring has a counterclockwise neighbour ( i +
1) mod n and a clockwise neighbour ( i −
1) mod n . Consequently, in this section,ll the ring node indices are implicitly taken modulo n . The approach used for thering also starts by creating the snapshot graph, however slightly di ff erent from the oneintroduced in Section 2.1. The nodes of the snapshot graph are of the form ( i , ¯ j ) and(¯ i , j ), where the node of the ring marked with the bar denotes the current position ofthe robot and [ i , j ] is the segment of the ring already explored by the robot taken in thecounterclockwise direction from i to j . Observe that, the terminal nodes of the snapshotgraph, i.e. those which correspond to the exploration of every node of the ring, arenow all nodes ( i , ¯ j ) and (¯ i , j ), such that ( j − i ) mod n =
1, i.e. i is the counterclockwiseneighbour of j . Such snapshot graph also has O ( n ) nodes of constant degree (see Fig. 5in the Appendix). Consequently, by using the argument from Theorem 2 we have thefollowing Observation. Observation 7
All values of T i , j for pairs ( i , j ) , such that each pair denotes a counter-clockwise segment around the ring containing an initial position of at most one robot,may be computed in amortized O ( n ) time. Observe that, there exists an optimal solution for the ring with idle edges betweeninitial positions of consecutive robots. By removing one such edge the ring becomes aline-segment. Consequently, most of our observations for lines may be applied for rings.In particular, for the case of robots which may be placed at arbitrary initial positions onthe ring, the following Corollary is obvious.
Corollary 2.
In O ( n log n log k ) time it is possible to compute the optimal time of ex-ploration of the ring of size n by a set of k robots, which may be placed at arbitraryinitial positions. Indeed, it is su ffi cient to apply Algorithm 3, in which in lines 5 and 12 we considerall pairs ( i , j ) (rather than pairs for which i < j ).In the case of robots at given initial positions, the adaptation of the line algorithmto the ring case is also relatively easy, with some compromise on its time complexity.We have the following Proposition. Proposition 1.
There exists an O (cid:16) n + n k log n (cid:17) algorithm for computing an optimalexploration of the ring R of size n using k mobile robots, initially placed at fixed posi-tions on R. We now consider unreliable robots. Similarly to the line exploration case, every nodeof the environment must be explored f + ff erent robots before its deadline.Consider first the case of robots which may be placed at arbitrary initial positionson the ring R . Suppose that we denote by R ( f + a ring obtained in the following way.We cut R at any node v , obtaining a line segment starting and ending by a copy of v .We merge f + n ( f +
1) nodes. Finally, we identify bothendpoints of such segment obtaining a ring R ( f + . Observe that, covering R by k robots’exploration trajectories, so that each node of R is visited f + R ( f + using k robots, so that each of its nodes is visited (once) before itsdeadline. As the size of R ( f + is in O ( n f ), from Corollary 2 we get orollary 3. Suppose that in an n-node ring we can place at arbitrary initial positionsk robots, which may include up to f faulty ones. In O ( n f log k (log n + log f )) time itis possible to compute the optimal time of exploration of the ring. If the initial positions of the robots on the ring are given in advance, contrary to thecase of the line segment, it is possible to decide in polynomial time whether there existsan f -reliable schedule in any given time ∆ . Proposition 2.
Consider a ring R of size n and k robots placed at given initial positionsat the nodes of S . For any given time ∆ it is possible to decide in polynomial timewhether ring R may be explored by its robots within time ∆ . We gave exploration algorithms for lines and rings with time constraints on the nodes.It is easy to see that the exploration problem is hard for graphs, even for the case of asingle robot and a graph with edges of unit length. Indeed, for a graph on n nodes, bysetting all its node deadlines to n −
1, an instance of exploration problem is equivalentto finding a Hamiltonian path. However, we show below that the exploration problemis hard for graphs as simple as stars and already for two mobile robots. We construct apolynomial-time reduction from the Partition Problem [16].
Proposition 3.
The exploration problem respecting node deadlines for given startingpositions of the robots is NP-hard. This problem is also NP-hard if the starting positionsare arbitrary.
We studied the question of exploring graphs with time constraints by collections ofunreliable robots. When all robots are reliable we used dynamic programming to givee ffi cient exploration algorithms for line graphs and rings. We showed, however, thatthe problem is NP-hard for graphs as simple as stars. We showed how to extend, inmost cases, our solutions to unreliable collections of robots. One of our results is quiteunexpected and important. Suppose that a collection of robots, placed on a line, maycontain an unknown subset of robots (of bounded size), which turn out to be crashfaulty. Verifying whether it is possible to explore the line within a given time bound isan NP-hard problem. The same problem on the ring has a polynomial-time solution.An interested reader may observe that our positive results imply the possibility tocompute the resilience of the configuration, i.e. given a time ∆ , to find the largest value f , such that there exists a schedule assuring exploration when any set of f robots turnsout to be unreliable.In our paper, we did not actually produce schedules for our robots, but we onlycomputed the optimal times when such schedules may be completed. However, fromour work it is implicitly clear how to generate such schedules. We proved the optimalityof the schedules but we did not prove the optimality of our algorithms. One of thepossible open problems is to attempt to design algorithms of better time complexity.everal other open problems remain, especially those related to feasibility ques-tions. The exploration of the star graph by a single robot may be done in polynomialtime. For example, an interested reader may observe, that it is su ffi cient to visit eachstar node v i of degree one in increasing order of the value ∆ i + w i , where ∆ i and w i are,the deadline of node v i and the weight of its incident edge, respectively. It is possible toshow that, either such schedule is feasible, or there does not exist any feasible schedule.Is it possible to extend the algorithm for single robot in a star for some larger class ofgraphs? How is a tree with node deadlines explored by a single robot? Or, conversely,what is the smallest (or simplest) class of graphs for which the exploration by a singlerobot is hard? eferences
1. R. Baeza Yates, J. Culberson, and G. Rawlins. Searching in the plane.
Information andComputation , 106(2):234–252, 1993.2. E. Bampas, J. Czyzowicz, L. Gasieniec, D. Ilcinkas, R. Klasing, T. Kociumaka, and D. Pajak.Linear search by a pair of distinct-speed robots. In
SIROCCO , pages 195–211. LNCS, 2016.3. S. Bock. Solving the traveling repairman problem on a line with general processing timesand deadlines.
European Journal of Operational Research , 244(3):690–703, 2015.4. A. Casteigts, P. Flocchini, W. Quattrociocchi, and N. Santoro. Time-varying graphs anddynamic networks. In
Ad-hoc, mobile, and wireless networks, LNCS , volume 6811, pages346–359. Springer, 2011.5. N. Christofides, V. Campos, A. Corber´an, and E. Mota. An algorithm for the rural postmanproblem on a directed graph.
Mathematical Programming Study , 26:155–166, 1986.6. M. Chrobak, L. Gasieniec, Gorry T., and R. Martin. Group search on the line. In
SOFSEM2015 . Springer, 2015.7. A. Corber´an and J. M. Sanchis. A polyhedral approach to the rural postman problem.
Euro-pean Journal of Operational Research , 79(1):95–114, 1994.8. J. Czyzowicz, K. Georgiou, E. Kranakis, D. Krizanc, L. Narayanan, J. Opatrny, andS. Shende. Search on a line with byzantine robots. In
ISAAC . LIPCS, 2016.9. J. Czyzowicz, K. Georgiou, E. Kranakis, L. Narayanan, J. Opatrny, and B. Vogtenhuber.Evacuating robots from a disc using face to face communication. In
CIAC 2015 . Springer,Paris, France, 2015.10. J. Czyzowicz, E. Kranakis, D. Krizanc, L. Narayanan, and Opatrny J. Search on a line withfaulty robots. In
PODC , pages 405–414, 2016.11. E. D. Demaine, S. P. Fekete, and S. Gal. Online searching with turn cost.
TheoreticalComputer Science , 361(2):342–355, 2006.12. H. A. Eiselt, M. Gendreau, and G. Laporte. Arc routing problems, part ii: The rural postmanproblem.
Operations research , 43(3):399–414, 1995.13. P. Flocchini. Time-varying graphs and dynamic networks. In , 2015.14. F. V. Fomin and D. M. Thilikos. An annotated bibliography on guaranteed graph searching.
Theoretical Computer Science , 399(3):236–245, 2008.15. M. R. Garey and D. S. Johnson. Two-processor scheduling with start-times and deadlines.
SIAM Journal on Computing , 6(3):416–426, 1977.16. M. R. Garey and D. S. Johnson.
Computers and intractability , volume 29. W. H. FreemanNew York, 2002.17. R. Holte, A. Mok, L. Rosier, I. Tulchinsky, and D. Varvel. The pinwheel: A real-time schedul-ing problem. In
System Sciences, 1989. Vol. II: Software Track, Proceedings of the Twenty-Second Annual Hawaii International Conference on , volume 2, pages 693–702. IEEE, 1989.Also, in Handbook of Scheduling Algorithms, Models, and Performance Analysis, CRCPress, 2004.18. D. S. Johnson. The NP-completeness column: an ongoing guide.
Journal of Algorithms ,6(3):434–451, 1985.19. F. Kuhn, N. Lynch, and R. Oshman. Distributed computation in dynamic networks. In
Proceedings of the forty-second ACM symposium on Theory of computing , pages 513–522.ACM, 2010.20. E. L. Lawler. Optimal sequencing of a single machine subject to precedence constraints.
Management science , 19(5):544–546, 1973.21. S. Mitrovic-Minic and R. Krishnamurti. The multiple traveling salesman problem with timewindows: Bounds for the minimum number of vehicles.
Simon Fraser University TR-2002-11 , 2002.2. J. N. Tsitsiklis. Special cases of traveling salesman and repairman problems with time win-dows.
Networks , 22(3):263–282, 1992.23. G. H. Young and C.-L. Chan. Single-vehicle scheduling with time window constraints.
Jour-nal of Scheduling , 2(4):175–187, 1999. ppendixA Illustration of a snapshot graph (0 , ¯1) (1 , ¯2) (¯1 ,
2) (2 , ¯3) (¯2 ,
3) (¯3 , ,
1) (3 , ¯4)(0 , ¯2) (¯0 ,
2) (1 , ¯3) (¯1 ,
3) (2 , ¯4) (¯2 , , ¯3) (¯0 ,
3) (1 , ¯4) (¯1 , , ¯4) (¯0 , , ¯0) (1 , ¯1) (4 , ¯4)(2 , ¯2) (3 , ¯3) Fig. 1.
A depiction of a snapshot graph for the case of line L consisting of five nodes. For clarity, we do not show the edge weights of the snapshot graph S in Fig. 1.Notice that, for any line graph L , the weights of the directed edges ( i , ¯ j ) → ( i , j + j , k ) → ( j + , k ) in its snapshot graph are equal to the weight of the edge ( j , j + L . Similarly, the weights of the directed edges ( i − , ¯ j ) → (¯ i , j ) and(¯ i , j − → ( i , ¯ j ) in the snapshot graph S are equal to the weight of the path i (cid:32) j inthe line graph L . B Illustration of the execution of Algorithm 1 for a given initialposition of the robot
Figure 2 illustrates the execution of Algorithm 1. The weighted line graph containingfive nodes denoted by integers from 0 to 4 is presented at the top of Fig. 2. The robot isinitially placed at node 1. The solid directed edges depict the shortest-time tree respect-ing the deadlines (the remaining edges of the snapshot graph which are not being usedare dashed). Each node has been assigned the time counter computed by Algorithm 1.The path of the shortest-time tree ending in the target node represents the optimal tra-jectory of the robot.
C Proof of Theorem 1
Proof.
We show that for every node v = (¯ i , j ) (resp. v = ( i , ¯ j )) of the snapshot graph thealgorithm computes the shortest time time ( v ) needed to explore the interval [ i , j ] of the , ¯1) (1 , ¯2) (¯1 ,
2) (2 , ¯3) (¯2 ,
3) (¯3 , ,
1) (3 , ¯4)(0 , ¯2) (¯0 ,
2) (1 , ¯3) (¯1 ,
3) (2 , ¯4) (¯2 , , ¯3) (¯0 ,
3) (1 , ¯4) (¯1 , , ¯4) (¯0 , , ¯0) (1 , ¯1) (4 , ¯4)(2 , ¯2) (3 , ¯3)3 1 2 2∆ = 7 ∆ = 5 ∆ = 6 ∆ = 11 ∆ = 133 3 1 12 2 2 21 4 4 31 23 2 1 4 24 ∞∞ ∞ ∞ ∞∞∞∞∞∞ ∞ ∞ ∞∞ ∞
82 13 ∞ Fig. 2.
Illustration of the execution of the line-exploration algorithm starting from node 1. line graph.which respects the deadlines of its nodes by the robot starting at v s , such that i ≤ s ≤ j , and ending its exploration at v i (resp. v j ). The proof goes by induction on thelayer. The claim is clearly true for any node ( i , ¯ i ) at layer 0. Suppose that the claim istrue for all nodes at layers at most (cid:96) −
1. Take any node at level (cid:96) , i.e., either v = (¯ i , i + (cid:96) )or v = ( i , i + (cid:96) ) . Consider the shortest time exploration path ending at v . The immediatepredecessors of v in this path is a node w from layer (cid:96) −
1, for which the shortest-timeexploration path is correctly computed by the inductive hypothesis. The time needed toreach v from w equals the time distance between new ( v ) and new ( w ) at the line graph.If time ( v ) + weight ( w → v ) ≤ ∆ new ( w ) then the deadline of node new ( w ) is respectedand time ( w ) is correctly computed lines 4-6 of Algorithm 1, otherwise the explorationtime of w remains at time ( w ) = ∞ as set in the InitStart procedure. The O ( n ) timecomplexity follows directly from the properties of the snapshot graph. (cid:117)(cid:116) D Illustration of the execution of the modified Algorithm 1 for anarbitrary starting position
An example of the execution of Algorithm 1 (modified as described in the subsection)for an arbitrary starting position is presented on Fig. 3, where a user may choose anynode of the line graph as the starting position of the robot.
E Proof of Corollary 1
The proof of Corollary 1 is almost identical to the case of Theorem 1. Observe that,in the inductive step, when the parent w of any node v in T is determined, the root of , ¯1) (1 , ¯2) (¯1 ,
2) (2 , ¯3) (¯2 ,
3) (¯3 , ,
1) (3 , ¯4)(0 , ¯2) (¯0 ,
2) (1 , ¯3) (¯1 ,
3) (2 , ¯4) (¯2 , , ¯3) (¯0 ,
3) (1 , ¯4) (¯1 , , ¯4) (¯0 , , ¯0) (1 , ¯1) (4 , ¯4)(2 , ¯2) (3 , ¯3)3 1 2 2∆ = 7 ∆ = 5 ∆ = 6 ∆ = 11 ∆ = 133 3 1 32 2 2 21 4 4 31 23 2 1 4 2403 0 22221 3 4 4534 14 32 6 6 2 3 5 5 1566 2 8 8 3 ∞ Fig. 3.
Illustration of the execution of the line-exploration algorithm in the case of arbitrary start-ing node. For any sub-interval [ i , j ] of the line, the optimal robot trajectory exploring [ i , j ] is givenby the cheaper among the solid directed paths incoming to nodes ( i , ¯ j ) and (¯ i , j ). the connected component of T containing v corresponds to the node of A o ff ering theshortest exploration path. F Proof of Theorem 2
Proof.
By Observation 3, we can assume that in an optimal solution, each robot m operates in an interval [ l m , r m ], which does not contain an initial position of any otherrobot. Hence we have p m − < l m ≤ p m and p m ≤ r m < p m + . All pairs of indices ( i , j ),which verify this property are considered in line 4 of Algorithm 2. By Theorem 1 andObservation 4 each such value T i , j is correctly computed in line 5 of Algorithm 2.We now prove that in line 7 the Algorithm 2 correctly computes values T , j for all j = , , . . . , n −
1. The proof goes by induction on j . For all 0 ≤ j < p the interval [0 , j ]contains a single robot, so the value T i , j is correctly computed in the first iteration of thefor-loop in lines 2-5. Consider any j ≥ p , i.e. when the interval [0 , j ] contains morethan one robot, and suppose, by the inductive hypothesis, that the values T , i correspondto optimal times of exploration of segments [0 , i ], for all i < j . Let T ∗ be the optimaltime of exploration of interval [0 , j ], which verifies the claim of Observation 3, i.e. suchthat there exists an idle edge ( m ∗ − , m ∗ ), and p r j − < m ∗ ≤ p r j . During such optimalexploration, robots 1 , , . . . , r j − , m ∗ −
1] (using some time T ∗ ),and robot r j explores interval [ m ∗ , j ] (using time T ∗ ). Clearly T ∗ = max( T ∗ , T ∗ ). By theinductive hypothesis, we have T , m ∗ ≤ T ∗ and T m ∗ + , j ≤ T ∗ . Consequently, we have inine 7 of Algorithm 2 T , j = min p rj − < m ≤ p rj max (cid:16) T , m − , T m , j (cid:17) ≤ max ( T , m ∗ − , T m ∗ , j ) = max( T ∗ , T ∗ ) = T ∗ , which concludes the inductive proof.We consider now the time complexity of Algorithm 2. The snapshot graph S in line1 is constructed in O ( n ) time. Observe that since each node of S can only be in twodi ff erent subgraphs S i and S j , we have (cid:80) ki = | V ( S i ) | ≤ | V ( S ) | = O ( n ). Hence, all theexecutions of line 3 of Algorithm 2 take O ( n ) amortized time. Similarly, in line 4 of thealgorithm, in all its executions, it considers O ( n ) nodes of graph S . Consequently thefor-loop of lines 2-5 is executed in O ( n ) amortized time. As each of O ( n ) executions ofthe for-loop in lines 6-7 takes O ( n ) time we conclude the O ( n ) overall time complexityof Algorithm 2. (cid:117)(cid:116) Algorithm 2:
Exploration algorithm on the line with k robots at fixed initial posi-tions Input:
Line L with starting robots’ positions p , p , . . . p k Construct the snapshot graph S from L ; for m = to k do Execute Algorithm 1 with inputs p m and S m ; for every ( i , j ) s.t. p m − < i ≤ j < p m + do T i , j : = min { t m ( i , ¯ j ) , t m (¯ i , j ) } ; for j = p to n − do T , j : = min p rj − < m ≤ p rj max ( T , m − , T m , j ); Function
OptTime( i , j , r , r ); if j − i + ≤ r + r then return 0 k low = i ; k high = j ; while k low < k high + do k = ( k low + k high ) / if T ( r ) i , k < T ( r ) k + , j then k low = k else k high = k return min(max( T ( r ) i , k low , T ( r ) k low , j ) , max( T ( r ) i , k high , T ( r ) k high , j )) ; lgorithm 3: ; Multiple robot line exploration with arbitrary starting positions Let r b , r b − , . . . , r be the consecutive bits of the binary representation of k ; Compute table T (1) i , j ; for m = to b do r = m ; for all pairs ( i , j ) such that ≤ i < j ≤ n − do T (2 r ) i , j = OptTime( i , j , r , r ); r = b ; for m = to b do if r b − m = then p = b − m ; for all pairs ( i , j ) such that ≤ i < j ≤ n − do T ( p + r ) i , j = OptTime( i , j , p , r ); r = p + r ; G Proof of Theorem 3
Proof.
By Corollary 1 and Formula (2) the usage of Algorithm 1 in line 2 of Algo-rithm 3 correctly computes a single robot optimal exploration time for any sub-intervalof a given line. By induction on r , using Observation 5, lines 3-6 of Algorithm 3 cor-rectly compute the optimal exploration time of any interval [ i , j ] using 2 m robots, forany m , such that 2 m < r .From line 1 we have k = r b b + r b − b − + · · · + r , where b is the position of thefirst 1-digit in the binary representation of k . We prove that, at the start of each iterationof the for loop from line 8, we have1. r = k − k mod 2 b + − m , and2. the table T ( r ) i , j has been already computed for all 0 ≤ i < j ≤ n − m . At the start of the first iteration of the loop when m =
1, we have r = b . Then indeed the inductive condition is verified as k − k mod 2 b + − = ( r b b + r b − b − + · · · + r ) − ( r b − b − + r b − b − + · · · + r ) = b = r and the value of T (2 b ) i , j was computed previously in line 6 of the algorithm.Suppose that the inductive condition was verified at the beginning of the m -th iter-ation. Suppose first that r b − m =
0. Then the i -th iteration of the loop is empty but as k mod 2 b + − m = k mod 2 b + − ( m + , so that at the beginning of the next iteration the valueof r remains unchanged, it follows that the inductive condition is verified.Consider now the case when r b − m =
1. Then, between the start of the m -th and the( m + r : = r + b − m . Consequently,by the inductive assumption, we have at the beginning of the ( m + = k − k mod 2 b + − m + b − m = ( r b b + r b − b − + · · · + r ) − ( r b − m b − m + · · · + r ) + b − m = ( r b b + r b − b − + · · · + r b − m b − m ) = k − k mod 2 b + − ( m + The value of the table T ( r ) i , j is then computed in line 12 of the algorithm, which completesthe induction proof.From the inductive proof it follows that at the end of the b -th iteration of the for loop from line 8 (i.e. at the beginning of the non-existing ( b + r = k − k mod 2 b + − ( b + = k , and the table T ( r ) i , j = T ( k ) i , j has been computed, whichcompletes the proof of the correctness of the algorithm.In line 2, the table T (1) i , j may be computed by Algorithm 1 in O ( n ) time (cf. Fig. 3).As r < b , both for loops starting at line 3 and 8 have O (log k ) iterations. Sinceeach internal for loop from line 5 and 11, respectively, has O ( n ) iterations callingfunction OptTime of complexity O (log n ) we conclude that Algorithm 3 finishes in O ( n log n log k ) time. (cid:117)(cid:116) H Proof of Theorem 4
Proof.
Let ∆ be the time interval satisfying the claim of the theorem, in the sense thatthere exists an f -reliable schedule in time ∆ , while for any ∆ (cid:48) < ∆ , there does notexist an f -reliable schedule in time ∆ (cid:48) . We show first that the necessary and su ffi cientcondition for the existence of such an f -reliable schedule is the following. Condition 1:
There must exist a schedule involving (cid:106) kf + (cid:107) robots (all reliable) at arbi-trary initial positions on L, which solves the exploration of L in time ∆ . Indeed, by Observation 6 each node of the line L must be explored by at least f + f + L . The least numerous of these groups can contain no more than (cid:106) kf + (cid:107) robots and this group must explore L . Conversely, if (cid:106) kf + (cid:107) robots can explore line L in time ∆ , we can form f + (cid:106) kf + (cid:107) robots each, executing the same scheduleand the line is explored by each of f + r = (cid:98) kf + (cid:99) robots exactly verifies Condition 1. ByTheorem 3, its time complexity is then as stated in the claim of the theorem. (cid:117)(cid:116) I Proof of Theorem 5
The proof of Theorem 5 is split into two lemmas. We first show that the
ELCF decisionproblem is strongly NP-hard, and then that the
ELCF decision problem is in NP.
Lemma 1.
The ELCF decision problem is strongly NP-hard.roof.
We construct a polynomial-time many to one reduction from the following stronglyNP-hard problem referenced as [SP16] in [18].
Numerical 3-Dimensional Matching (N3DM) problem
Instance:
Three multisets of positive integers A = { a , a , . . . , a q } , B = { b , b , . . . , b q } , C = { c , c , . . . , c q } , and an integer S . Question:
Does there exist two permutations π B , π C of [1 , q ] such that for every 1 ≤ i ≤ q , a i + b π B ( i ) + c π C ( i ) = S ?We construct an instance ( L , P , f , ∆ ) of the ELCF problem from an instance of N DM as follows. Let a = max i ∈ [1 , q ] ( a i ), b = max i ∈ [1 , q ] ( b i ) and c = max i ∈ [1 , q ] ( c i ).Let I = S + a + b + c and (cid:96) = I − S − L is the line of length (cid:96) (with (cid:96) + L has weight one. For the sake of simplicity we name i the nodeof L at distance i from the leftmost node. We have 3 q robots each corresponding to aninteger from one of the multisets A , B or C . For each i = , , . . . , q , we put three robots:one robot A i at node α i = a i , one robot B i at node β i = I + b i and one robot C i at node γ i = I + c i . The number of faults f is equal to q − ∆ is equalto I −
1. The construction can be done in polynomial time. We show that the answer tothe constructed instance of the
ELCF problem is the same as the answer to the originalinstance of N DM .First, assume that there exists a solution π B , π C to the instance of the N DM prob-lem. We show that the robots can solve the corresponding instance of the ELCF prob-lem as follows.Robot A i will first move to the left until reaching node 0 (moving distance a i ), andthen to the right until reaching node α ri = I − − a i (moving distance I − − a i ). Thiscan be done in time ∆ = I − A i has visited in time all nodes in theinterval [0 , α ri ].Robot B π B ( i ) will first move to the left until reaching node β l π B ( i ) = α ri + a i + b π B ( i ) ) and then to the right until reaching node β r π B ( i ) = I − − a i − b π B ( i ) (moving distance I − − a i − b π B ( i ) ). This can be done in time ∆ = I − β l π B ( i ) , β r π B ( i ) ].Robot C π C ( i ) will first move to the left until reaching node γ l π C ( i ) = β r π B ( i ) + a i + b π B ( i ) + c π C ( i ) ) and then to the right until reaching node γ r π C ( i ) = I − − a i − b π B ( i ) − c π C ( i ) (moving distance I − − a i − b π B ( i ) − c π C ( i ) ). This can be donein time ∆ = I − γ l π C ( i ) , γ r π C ( i ) ].Observe that we have :3 I − − a i − b π B ( i ) − c π C ( i ) = I − S − = (cid:96) Hence C π C ( i ) has visited in time all nodes in the interval [ δ l π C ( i ) , (cid:96) ].Since [0 , α ri ] ∪ [ β l π B ( i ) , β r π B ( i ) ] ∪ [ γ l π C ( i ) , (cid:96) ] = [0 , (cid:96) ], all nodes of the line have been visitedin time by either A i , B π B ( i ) or C π C ( i ) for i = , , . . . , f +
1. It follows that every node isvisited by at least one non-faulty robot and this is a solution to the
ELCF problem.Now assume there is a solution to the
ELCF problem. Let A = {A i | ≤ i ≤ q } , B = {B i | ≤ i ≤ q } and C = {C i | ≤ i ≤ q } . First, we show the following claim. ‘α i β π B ( i ) γ π C ( i ) I I ∆time γ rπ C ( i ) γ lπ C ( i ) β rπ B ( i ) β lπ B ( i ) α ri Fig. 4.
An illustration of robots A i , B π B ( i ) and C π C ( i ) visiting all nodes of the line. Claim.
The robots in A must visit node 0 and they are the only robots that can do it, therobots in B must visit node I and they are the only robots that can do it and the robotsin C must visit node (cid:96) and they are the only robots that can do it.For i = , , . . . , q , the robots in positions β i and γ i are to far (at distance at least I )to reach node 0 in time smaller than ∆ = I −
1. The robots in positions α i are the onlyones that can visit the node 0 and since this node must be visited by f + = q robots,they must all visit it. Hence, the robots in positions α i cannot visit in time node I whichis at distance I of node 0. Similarly, the robots in positions β i are the only ones that canvisit the node I and since this node must be visited by f + = q robots, they must allvisit it. Similarly, the robots in positions γ i are the only ones that can visit the node 2 I and so node (cid:96) (since (cid:96) > I ) and since this node must be visited by f + = q robots,they must all visit it. This ends the proof of the claim.For i = , , . . . , q , let [0 , α ri ] be the interval of nodes visited by robot A i , [ β li , β ri ] bethe interval of nodes visited by robot B i and [ γ li , γ ri ] be the interval of nodes visited byrobot C i . Claim.
There are two permutations π B ( i ) and π C ( i ) such that for i = , . . . , q , β l π B ( i ) = α ri + γ l π C ( i ) = β r π B ( i ) + f + = q robots, then it means that there are robots from two di ff erent sets (for example, robotsfrom sets A and B ). We can then cut the trajectory of some of the robots in order todecrease the number of robots visiting the same node. So we can assume without lossof generality that each node is visited by exactly q robots. This means that there is apartition of the robots into q subsets, such that every node of the line is visited in timeby exactly one robot of each subset. By the first claim, there is one robot of each set A , B and C in each of q subsets. Hence, for i = , , . . . , q , there is a subset of robots {A i , B π B ( i ) , C π C ( i ) } that must visit all the nodes of the line. Since two robots of the samesubset do not visit the same node, their intervals are disjoint. This ends the proof of theclaim.y the second claim, Robot A i can travel a distance ∆ to search its interval [0 , α ri ].Observe that A i starts at distance a i from node 0. Since ∆ > a ≥ a i , the optimalway for robot A i to search its interval is to first go to the left and then to the right.So, we have α ri = I − − a i . By Claim I, we have β l π B ( i ) = α ri + = I − a i . Robot B π B ( i ) starts at distance a i + b i from node β l π B ( i ) . Since ∆ > a + b ≥ a i + b i ),the optimal way for robot B i to search its interval is to first go to the left and thento the right. So, we have β r π B ( i ) = I − a i − b π B ( i ) −
1. By the last Claim, we have γ l π C ( i ) = β ri + = I − a i − b π B ( i ) . Robot C π C ( i ) starts at distance 2 a i + b π B ( i ) + c π C ( i ) from node γ l π C ( i ) . Since ∆ > a + b + c ≥ a i + b π B ( i ) + c π C ( i ) ), the optimal wayfor robot C i to search its interval is to first go to the left and then to the right. Observethat since robot C π C ( i ) must visit node (cid:96) , we have :3 I − a i − b π B ( i ) − c π C ( i ) − = I − S − ⇐⇒ a i + b π B ( i ) + c π C ( i ) = S Hence, π B , π C , π D is a solution for the instance of the N DM problem. (cid:117)(cid:116) Lemma 2.
The ELCF decision problem is in NP.Proof.
We consider the verifier-based definition of NP. A certificate for the instance ofthe
ELCF decision problem is simply the set of the trajectories of the k robots. Eachtrajectory is of length O ( n ) and hence this certificate is in O ( kn ) and so polynomial inthe size of the instance. We can check in polynomial time (by simulating the trajectoriesof the robots) that every node of the line is visited before time ∆ by at least f + (cid:117)(cid:116) J Illustration of the Snapshot Graph for a Ring (0 , ¯0) (1 , ¯1) (4 , ¯4)(2 , ¯2) (3 , ¯3) (4 , ¯0)(¯4 , , ¯1) (3 , ¯0) (¯3 , , , ¯1) (1 , ¯2) (¯1 ,
2) (2 , ¯3) (¯2 ,
3) (¯3 , ,
1) (3 , ¯4)(0 , ¯2) (¯0 ,
2) (1 , ¯3) (¯1 ,
3) (2 , ¯4) (¯2 , ,
0) (4 , ¯1)(3 , ¯2) (1 , ¯0) (¯1 , , ,
1) (¯2 , , ¯3) (¯4 ,
3) (0 , ¯4) (¯0 ,
4) (3 , ¯2)(¯2 , , ¯2) (2 , ¯0) (¯2 , , ,
1) (3 , ¯1)(0 , ¯3) (¯0 ,
3) (1 , ¯4) (¯1 , Fig. 5.
Snapshot graph for a case of ring R of five nodes. Grey nodes and edges are duplicates ofother nodes at the same level (for presentation clarity). All last level nodes correspond to the ringentirely explored. Proof of Proposition 1
Proof.
Take a pair i , i + R for which the distance oftheir initial positions is the smallest. In an optimal exploration on the segment [ p i , p i + ]of R , one of its edges is idle. Knowing, which such edge is idle, we might remove itfrom R converting the ring to a line segment. Then the line exploration Algorithm 2may be executed for such a segment. As the segment [ p i , p i + ] is of size O ( n / k ), onepossible approach is to try all the possibilities of making idle every edge of [ p i , p i + ],each time running Algorithm 2 for the ring segment thus obtained. This would result inoverall complexity O ( n / k ).Consider the following, more careful adaptation of Algorithm 2 for the ring. Itsfirst part (lines 1-5) may be run once, computing all values T i , j in O ( n ) time. Thenthe second part (lines 6-7) are repeated O ( n / k ) times, i.e. for all segments O ( n / k ) ob-tained from R by removal of each possible idle edge between p i and p i + . Moreover, themin computation from line 7, by Observation 5, may be computed in (log n ) time. Thisresults in an O ( n k log n ) complexity of lines 6-7 hence in O (cid:16) n + n k log n (cid:17) ring explo-ration algorithm. (cid:117)(cid:116) L Proof of Proposition 2
Proof.
Create ring R ( f + formed of f + R , thus obtaining k ( f +
1) possiblestarting positions for k robots. We need to find an exploration of ring R ( f + in time T using k robots, which may be placed at k ( f +
1) starting positions. If such explorationsare possible, then there exists one, for which each robot covers a disjoint segment of R ( f + , with idle edges separating them. Consider one such edge and remove it from R ( f + , obtaining a segment S of size n ( f + −
1. The set of k robots explore S in time T . As the chosen idle edge belongs to some copy of ring R , it is su ffi cient to consider n segments S , S , . . . , S n − of size n ( f + − T .From the corresponding snapshot graph, we compute first for any position i on thering R ( f + , the value P ( i ) denoting the largest position j , in the counterclockwise direc-tion around R ( f + , such that a robot placed at a permitted initial position can explorein time T the segment [ i , j ] of ring R ( f + . Consider now an algorithm deciding for anygiven segment S m , where m = , . . . , n −
1, whether S m may be explored in time T by some set of k robots, each of which may be placed at any of the given k ( f + S m , for all consecutive values of r = , , . . . , k , we compute the largest index i rS m , such that the initial sub-segment of S m ending at node i rS m may be explored by a set of r robots in time T . We can prove byinduction on r that i r + S m = P ( i rS m + i kS m reaches (or exceeds) the last node of segment S m , then S m is explorable by k robots in time T .e repeat the procedure for all segments S m . As ring R ( f + is possible to be ex-plored at time T if and only if one of the segments S m may be explored in time T thisconcludes the proof. (cid:117)(cid:116) M Proof of Proposition 3
Proof.
We accomplish the reduction from the Partition Problem [16].
Partition problem
Instance:
A sets of q of positive integers A = { a , a , . . . , a q } Question:
Does there exist a partition of set A into two subsets of equal sum.We construct a polynomial-time reduction from the Partition problem. Consider aninstance of the partition problem with the set A = { a , a , . . . , a q } . Let (cid:80) qi = a i = σ .We design the corresponding instance of the star exploration problem. Consider a starconsisting of q + e , e , . . . , e q + . Let the weight w of each edge be such that w ( e i ) = a i , for i = , , . . . , q , and w ( e q + ) = w ( e q + ) = w ( e q + ) = w ( e q + ) = σ . Taketwo mobile robots 1 and 2 and put them at the starting positions at the endpoints ofedges e q + and e q + , di ff erent from the centre of the star. Let the deadline of each nodeof the star be ∆ ( e i ) = σ , for i = , , . . . , q +
4. Note that the sum of the weights ofall edges of the star equals 18 σ . Further, observe that each robot has to end its route atone of the edges e q + and e q + . Indeed, otherwise one of the edges e q + or e q + wouldbe traversed twice (by the same robot in both directions) and the sum of the trajectoriesof both robots would exceed 22 σ . Hence one of the robots would arrive to its last nodeafter time 11 σ and its deadline would not be met.Consequently, robots must traverse once both edges e q + and e q + at the beginningof their respective routes and finish the routes by traversing edges e q + and e q + . Eachof the remaining edges e i , for i = , , . . . , q , must be traversed in both directions andthe sum of the robot route lengths is at least 4 · σ + (cid:80) qi = w ( e i ) = σ . In order for bothrobots to reach their last nodes within their deadline time of 10 σ , each of them musttraverse the subset of edges of total length σ . This requires solving the given instanceof the partition problem.It is easy to see that the above reduction works not only for the star exploration fromgiven starting positions, but also from arbitrary ones.. This requires solving the given instanceof the partition problem.It is easy to see that the above reduction works not only for the star exploration fromgiven starting positions, but also from arbitrary ones.