# On cooperative patrolling: optimal trajectories, complexity analysis, and approximation algorithms

## Abstract

The subject of this work is the patrolling of an environment with the aid of a team of autonomous agents. We consider both the design of open-loop trajectories with optimal properties, and of distributed control laws converging to optimal trajectories. As performance criteria, the *refresh time* and the *latency* are considered, i.e., respectively, time gap between any two visits of the same region, and the time necessary to inform every agent about an event occurred in the environment. We associate a graph with the environment, and we study separately the case of a chain, tree, and cyclic graph. For the case of chain graph, we first describe a minimum refresh time and latency team trajectory, and we propose a polynomial time algorithm for its computation. Then, we describe a distributed procedure that steers the robots toward an optimal trajectory. For the case of tree graph, a polynomial time algorithm is developed for the minimum refresh time problem, under the technical assumption of a constant number of robots involved in the patrolling task. Finally, we show that the design of a minimum refresh time trajectory for a cyclic graph is *NP-hard*, and we develop a constant factor approximation algorithm.

## 1Introduction

The recent development in the autonomy and the capabilities of mobile robots greatly increases the number of applications suitable for a team of autonomous agents. Particular interest has been received by those tasks requiring continual execution, such as the monitoring of oil spills [1], the detection of forest fires [2], the track of border changes [3], and the patrol (surveillance) of an environment [4]. The surveillance of an area of interest requires the robots to continuously and repeatedly travel the environment, and the challenging problem consists in scheduling the robots trajectories so as to optimize a certain performance criteria. The reader familiar with network location, multiple traveling salesman, or graph exploration problems may observe a close connection with the patrolling problem we address, e.g., see [5]. It is worth noting, however, that these classical optimization problems do not capture the repetitive, and hence dynamic, aspect of the patrolling problem, nor the synchronization issues that arise when a timing among the visits of certain zones is required.

A precise formulation of the patrolling problem requires the characterization of the robots capabilities, of the environment to be patrolled, and of the performance criteria. In this work, we assume the robots to be identical and capable of sensing and communicating within a certain spatial range, and of moving according to a first order integrator dynamics with bounded speed. We represent the environment as a graph, in which the vertices correspond to physical and strategically important locations, and in which the edges denote the possibility of moving and communicating between locations. We assume that, when a robot is placed at each of the graph vertices, the union of the sensor footprints provides complete sensor coverage of the environment. Regarding the performance criteria of a patrolling trajectory, we consider (i) the time gap between any two visits of the same region, called *refresh time*, and (ii) the time needed to inform the team of robots about an event occurred in the environment, called *latency*. Loosely speaking, refresh time and latency reflect the effectiveness of a patrolling team in detecting events in the environment and in organizing remedial actions. For both the refresh time and latency optimization problem, we focus on the worst case analysis, even though the average refresh time and the average latency cases are also of interest. Notice that for the latency to be finite, the motion of the robots needs to be synchronized. For instance, if two robots are allowed to communicate only when they simultaneously occupy two adjacent vertices of the graph, then they need to visit those vertices at the same time in a finite latency trajectory.

The patrolling problem is receiving increasing attention because of its fundamental importance in many security applications, e.g., see [8]. Although many solutions have been proposed, the problem of designing minimum refresh time and latency team trajectories for a general environment is, to date, an open problem. Almost all traditional approaches rely on space decomposition, and traveling salesperson tour computation [13]. In [14] an empirical evaluation of existing patrolling heuristics is performed. In [15] two classes of strategies are presented, namely the cyclic- and the partition-based strategy. In the cyclic-based strategy, the robots compute a closed route through the viewpoints, and travel repeatedly such route at maximum speed. Clearly, in the case of a single robot, if the tour is the shortest possible, then the cyclic-based strategy performs optimally with respect to the refresh time and latency criteria. In the partition-based strategy, the viewpoints are partitioned into subsets, being cardinality of the team, and each robot is responsible for a different set of viewpoints. To be more precise, each robot computes a closed tour visiting the viewpoints it is responsible for, and it repeatedly moves along such tour at maximum speed. Still in [15], the two classes of strategies are compared, and it is qualitatively shown that cyclic-based strategies are to be preferred whenever the ratio of the longest to the shortest edge of the graph describing the environment is small, while, otherwise, partition-based policies exhibit better performance. In [4] and [2], an efficient and distributed solution to the perimeter patrolling problem for robots with zero communication range is proposed. By means of some graph partitioning and graph routing techniques, we extend the results along these directions, e.g., by considering the case of a nonzero communication range for the perimeter patrolling, and by characterizing optimal strategies for different environment topologies. An important variant of the patrolling problem is known as persistent surveillance, e.g., see [16]. Differently to our setup, a dynamically changing environment is considered for the persistent surveillance problem, and performance guarantees are offered only under a certain assumption on the rate of change of the regions to be visited.

It is worth mentioning that a different approach to the design of patrolling trajectories relies on the use of pebbles or chemical traces to mark visited regions, e.g., see [17]. These techniques, although effective even without a global representation of the environment, and with severe communication constraints, do not explicitly deal with the optimality of the patrolling trajectories, and they represent therefore a complementary area of research with respect to this work.

The main contributions of this work are as follows. We introduce and mathematically formalize the concept of refresh time and latency of a team trajectory, and we formally state the patrolling optimization problem. We propose a procedure to build a graph (roadmap) to represent the topological structure of the area to be patrolled, and we study separately the case of a chain, tree, and cyclic (not acyclic) graph. We exhaustively discuss the case of a chain roadmap. First, we characterize a family of minimum refresh time and latency team trajectories, which can be computed by optimally partitioning the chain graph among the robots. Second, we derive a centralized polynomial time algorithm to compute an optimal partition, and, ultimately, to design an optimal team trajectory. Our partitioning procedure is based upon a bisection method, and it is also amenable to distributed implementation. Third, we develop a distributed procedure for the robots to converge and synchronize along an optimal trajectory, so as to minimize the refresh time and latency criteria. Fourth and finally, we test the robustness of our methods through a simulation study. When the roadmap has a tree or cyclic structure, we focus on the refresh time optimization problem, and we do not consider the latency optimization nor the design of distributed algorithms. For the case of a tree roadmap, we reduce the minimum refresh time patrolling problem to a known graph optimization problem. We show that the computational complexity of the minimum refresh time patrolling problem is polynomial in the number of vertices of the roadmap, and, under the assumption of a fixed and finite number of robots, we identify a polynomial time centralized algorithm to compute a minimum refresh time team trajectory. For the case of a cyclic roadmap, we show that the patrolling problem is an *NP-hard* optimization problem. We propose two approximation algorithms, and we characterize their performance. The first approximate solution is extremely easy to compute, but its performance depends upon the ratio between the longest and the shortest edge in the graph representing the environment. The second approximation algorithm is based on a polynomial time path-covering procedure, and it allows us to compute a team trajectory whose refresh time is within a factor of from the minimum refresh time for the given environment (cf. Figure 9 for an example). To the best of our knowledge, this algorithm is the first constant factor approximation algorithm for the *NP-hard* minimum refresh time patrolling problem.

A preliminary version of this work appeared in [21]. With respect to the latter manuscripts, in this current work we introduce and solve the latency optimization problem, we perform a numerical study to analyze the robustness of our algorithmic procedures, and we improve the presentation of the results on the refresh time optimization problem.

The rest of the paper is organized as follows. The notation and the problem under consideration are in Section 2, where we also show that the patrolling problem is, generally, computationally hard. Section 3, Section 4, and Section 5 contain our results for the patrolling of a chain environment. We characterize a minimum refresh time and latency team trajectory, and we derive a centralized and a decentralized algorithm for its computation. In Section 6 we perform a simulation study to show some robustness and reconfigurability properties of our distributed procedure. Section Section 7.1 contains our results for the patrolling of a tree environment. We describe a minimum refresh time team trajectory on a tree roadmap, and we characterize the complexity of computing an optimal solution. Section 7.2 deals with the general case of cyclic environment, and it contains our approximation procedures. Our conclusion and final remarks are in Section Section 8.

## 2Robotic model and preliminary concepts

### 2.1Robots on roadmaps with sensor coverage and communication connectivity

We will be using the standard motion planning notation, and we refer the reader to [22] for a comprehensive treatment of the subject. We are given a team of identical robots, capable of sensing, communicating, and moving in a connected environment. We make the following combined assumptions on the robot capabilities and on the environment to be patrolled.

Regarding sensing, we assume that the environment can be completely covered by simultaneously placing a robot at each of a set of *viewpoints* in the configuration space. In other words, if robots were available and placed at the viewpoints, then the union of the sensors footprint of the robots would provide complete sensor coverage of the environment. We assume that each viewpoint is required for complete sensor coverage. Finally, we assume so that at least one robot needs to visit more viewpoints for the entire environment to be monitored over time.

Regarding communication, we associate an undirected graph with the environment, whose vertices are the viewpoints, and in which there is an edge between two vertices if two robots placed at those viewpoints are able to communicate to each other. We assume that is connected. In what follows we design cooperative patrolling algorithms with sporadic communication, in the sense that two robots are required to communicate only when they occupy adjacent vertices. The occurrence of additional communication links can be easily incorporated into the algorithms and cannot decrease their performance.

Regarding motion, we assume that the robots are holonomic, i.e., they are modeled as first order integrators and move at most at unit speed. Additionally, we turn the graph into a robotic roadmap [22] and a metric weighted graph as follows: to each pair of viewpoints that are neighbors in , we associate a unique path connecting them. We select these paths so that the set of path lengths, adopted as edge weights, verify the triangle inequality. (For example, the shortest paths between viewpoints constitute a suitable choice.) We assume that each robot remains always on the roadmap.

In summary, the combined assumptions on the robot capabilities and on the environment are that: the vertices of provide complete sensor coverage of the environment and each edge of corresponds to both a communication edge and a motion path. Hence, we refer to as a roadmap with sensor coverage and communication connectivity.

### 2.2On suitable roadmaps and robots capabilities

The problem of constructing a roadmap from an environment is here discussed.

The following remarks are in order. First, a roadmap representing the environment is in general not unique, and the patrolling performance depends upon the particular choice. In this work, we do not address the problem of choosing the roadmap that yields optimal performance. Instead, we present efficient algorithms for the patrolling problem, which can also be used to compare different roadmaps on the basis of the corresponding patrolling performance. Second, for the implementation of our algorithms, a robot does not need to travel exactly along the roadmap. Indeed, a robot only needs to arrive sufficiently close to a viewpoint, or to be able to circle around it to provide sensor coverage. A related example is in Section 6, where the arrival delay of a robot can be interpreted as the uncertainty in the motion of the robots. Third, the global knowledge of the roadmap may not be required for the execution of a patrolling trajectory. Indeed, in general, each robot only visits a subpart of the roadmap. Fourth and finally, collisions are prevented by letting two robots exchange their roles every time they are about to collide. Indeed, since no robot is assigned to a specific viewpoint, if robot is about to collide with robot at time , then, without affecting the performance of the team trajectory, collision is avoided by redefining the -th and -th trajectory as and for ; see the notion of order invariant trajectory below. Communication or sensing devices can be used to detect and prevent possible collisions.

### 2.3Refresh time of team trajectories: definitions and a preliminary complexity result

For a team of robots with specific capabilities, let be a robotic roadmap with sensor coverage and communication connectivity. A *team trajectory* is an array of continuous and piecewise-differentiable trajectories defined by the motion of the robots on the roadmap , i.e., , for , where is a time horizon of interest, much larger than the time required by a single robot to visit all viewpoints. We say that a viewpoint is visited at time by robot if . We define the *refresh time* of a team trajectory , in short , as the longest time interval between any two consecutive visits of any viewpoint, i.e.,

where .

In Section 4 we present a different optimization problem, which deals with the possibility for a robot to communicate, possibly with multiple hops, with every other robot in the team. We now conclude this section with our first result on the computational complexity of the Team refresh time problem. For a detailed discussion of the main aspects of the computational complexity theory, we refer the interested reader to [27]. Recall that an optimization problem is said to be *NP-hard* if it is, informally, as hard as the hardest problem in the class *NP*, for which no polynomial time algorithm is known to compute an optimal solution.

This statement can be shown by reduction from the Traveling Salesman problem [27]. In fact, if , since the speed of the robots is bounded, then a minimum refresh time trajectory consists of moving the robot at maximum speed along a shortest closed tour visiting the viewpoints. The problem of finding a shortest tour through a set of points in the plane, also known as Traveling salesman problem, is an *NP-hard* problem [27]. Hence, by restriction, the Team refresh time problem is also *NP-hard*.

Following Theorem ?, the minimum refresh time optimization problem is generally computationally hard. In this work, we first identify two roadmap structures for which there exists an efficient solution to the Team refresh time problem, and then we describe two approximation algorithms to deal with the general case.

## 3Minimum refresh time team trajectory on a chain roadmap

We characterize in this section an optimal refresh time team trajectory when the roadmap associated with the environment has a chain structure.

### 3.1Open loop team trajectory characterization

Let denote the neighbor set of the vertex , and let denote the degree of , i.e., the cardinality of the set . A chain roadmap is an undirected, connected, and acyclic roadmap, in which every vertex has degree two, except for two vertices which have degree one. Without losing generality, we assume that the vertices are ordered in a way that , , and for each . We define a relative order of the robots according to their position on the roadmap. A team trajectory is *order invariant* if the order of the robots does not change with time, i.e., if for each and for every instant , where denotes the distance at time on the roadmap from the first vertex of the chain to the position of the -th robot.

Let be a team trajectory, and consider the permutation matrix , that keeps track of the order of the robots at time , i.e., such that the -th entry of is if, at time , the -th robot occupies the -th position in the chain of robots, and it is otherwise. Since is continuous, anytime the function is discontinuous, the positions of the robots directly involved in the permutation overlap. Therefore, the order invariant team trajectory is a feasible team trajectory, and it holds .

Let be the set of viewpoints visited over time by the agent with the trajectory , and let the *image* of the team trajectory be the set . Notice that different team trajectories may have the same image. Throughout the paper, let , , and . Finally, let . A team trajectory is *non-overlapping* if for all .

Let be a minimum refresh time team trajectory, and let be the order invariant team trajectory obtained from as in Proposition ?. Clearly . Let be the image of , and note that . Consider the partition of defined as

For every nonempty , let , , and . Note that, by construction, the viewpoint is visited by the robot and, possibly, by the robots . Also, because is order invariant, we have . It follows that . Consider now the team trajectory with image , and assume that the robots sweep periodically at maximum speed their segment. Then , so that is an order invariant and non-overlapping team trajectory with minimum refresh time.

Given a chain graph on the viewpoints , let be an *-partition* of , i.e., is a collection of subsets of such that whenever , and . Additionally, let the dimension of the partition equal the longest distance between any two viewpoints in the same cluster, i.e., , where if . Following Proposition ?, there exists a minimum refresh time team trajectory whose image coincide with an -partition of . We now show that the minimum refresh time equals twice the dimension of an optimal -partition.

As a consequence of Propositions ? and ?, there exists a minimum refresh time team trajectory whose image coincides with an -partition . Since each robot is assigned a different cluster, and the speed of the robots is bounded by , we have . Consider a team trajectory in which each robot continuously sweeps at maximum speed the cluster it is assigned to. Clearly, .

We have shown that a minimum refresh time trajectory consists of letting the robot sweep at maximum speed a part of the chain graph. Such a trajectory is more formally described for the -th robot in Trajectory ?, where we only characterize the instants of time at which robot changes its velocity vector, and we assume that it moves at maximum speed otherwise.

### 3.2Optimal -partition centralized computation

In the remaining part of the section we describe an algorithm to compute an optimal -partition. For a set of viewpoints , we call *left-induced* partition of length the partition defined recursively as (cf. Fig. ?)

where

The cardinality corresponds to the integer such that . Observe that the function is monotone, non-increasing, and right-continuous (cf. Fig. ?). Let be the discontinuity points of the function , then, for ,

Note that two or more discontinuity points of may coincide, so that the function may not assume all the values in the set , e.g., in Fig. ? the value is never equal to .

Let be an -partition, and let be the left induced partition of length of a chain roadmap . Let . We want to show that is one of the discontinuity points of the function , i.e., that verifies the conditions .

By contradiction, if and , then an -partition with dimension smaller than the optimal would exists. Therefore we have if .

Suppose now that , and let be an -partition with minimum dimension. Notice that , because the cluster contains all the viewpoints within distance from , and hence also within distance . It follows that , and also that . By repeating the same procedure to the remaining clusters, we obtain that , so that, if and , then .

Following Theorem ?, an optimal left-induced partition of cardinality (at most) is also an optimal -partition. Notice that for the computation of an optimal left-induced partition only the lengths corresponding to the discontinuity points of need to be considered. Since each discontinuity point coincides with the distance between a pair of vertices, only values need to be tested. Therefore, an optimal left-induced partition can be computed with complexity . In what follows we describe an -approximation algorithm with linear complexity for any . Notice that -approximation algorithms with linear complexity are often more convenient for a practical implementation than exact algorithms with higher complexity [7].

We now present our algorithm for the computation of an optimal -partition. Since the function is monotone and continuous, a bisection method is effective for finding its discontinuity points, and, therefore, for determining the shortest length of a left-induced partition of cardinality . A bisection based procedure to compute an optimal left-induced partition is in Algorithm ?, where the function *left-induced(,)* returns the left-induced partition defined in equation . We next characterize the convergence properties of Algorithm ?.

Algorithm ? searches for the minimum length that generates a left-induced partition of cardinality at most . Because of Theorem ?, the length coincides with one of the discontinuity points of the function , and it holds . Indeed, because , and , because . Recall from that for every , and that the function is monotone. Note that the interval , as updated in Algorithm ?, contains the value at every iteration. The length of the interval is divided by 2 at each iteration, so that, after , the value is computed with precision . Since the computation of can be performed in operations, the time complexity of Algorithm ? is .

As a consequence of Proposition ? and Theorem ?, in what follows we only consider team trajectories whose image coincide with an -partition. Therefore, for ease of notation, we use the set to denote both the image set of a team trajectory and an -partition of the chain graph. We conclude this section with a summary of the presented results.

## 4Minimum refresh time and latency team trajectory on a chain roadmap

The previous section considers the problem of designing team trajectories with optimal refresh time on a chain graph. In a patrolling mission it may be important for the robots to communicate with each other in order to gather information about the status of the entire environment. For instance, messages could be sent by a unit to ask for reinforcement, or to spread an alarm. Informally, we call *latency* of a team trajectory , in short , the shortest time interval necessary for a message generated by any robot to reach all the other robots. In other words, given our communication model, the latency of a team trajectory is a measure of how fast a message spreads to all robots. In this section we describe team trajectories with minimum refresh time and latency.

We now give a more formal definition of . Recall that, by assumption, two robots are allowed to communicate when they lie on two adjacent viewpoints. In a chain roadmap, for a message to reach every robot in the chain, every pair of adjacent robots needs to communicate. For , let denote the union of the set of times at which the robots and communicate and . The *up-latency* of , in short , is the longest time interval between any two consecutive communications between the robots and . Precisely,

where . Analogously, we call *down-latency* the quantity

where . Finally, we define the latency of a team trajectory as

Notice that our definitions of latency hold for , and that, if , then we have for every team trajectory . We envision that the up- and down-latency performance criteria should be adopted when it is of interest to report the status of the monitored area to a base station located at one end of the chain environment. The latency minimization problem is more appropriate for fully distributed scenarios. In this section we design synchronized team trajectories with the following two features. First, since a minimum refresh time trajectory is determined by an optimal partition of the chain graph, we aim at finding team trajectories associated with the same optimal partition.^{1}

### 4.1Lower bound and optimal team trajectory for up-latency

We start by showing a lower bound for and . Recall that, for a partition , we have , , , and .

The proposition follows from the fact that the robots speed is bounded by , and that the robots need to travel their segment to communicate with the neighboring robots.

For the up-latency of a team trajectory to equal the lower bound in Lemma ?, each robot needs to transfer a message from robot to robot in time . In order to do so, each robot needs to communicate with its neighbor as soon as .

The theorem follows by observing that the trajectory is -periodic, and that no robot waits at to communicate with the neighboring robot . The up-latency equals the lower bound in Lemma ?, and it is therefore minimum. Regarding the computational complexity, notice that it is determined by the computation of the optimal -partition , and hence, by Lemma ?, it equals .

An example of a team trajectory with minimum refresh time and minimum up-latency is in Figure 2. Finally, observe that the minimization of the down-latency can be achieved in an analogous way.

### 4.2Lower bound for latency

We now consider the minimization of the latency criterion, and we restrict our attention to periodic team trajectories. To be more precise, let be an optimal -partition of the environment, and let denote the longest length of the clusters. We aim at finding a -periodic team trajectory with image and minimum latency. Notice that, by imposing a periodicity of , the refresh time of the trajectory, if finite, is also minimized.

We start by considering the pedagogical situation in which for all . In the next Lemma, we show that the frequency of message exchange among the robots is limited by the periodicity of the trajectory.

Since , it follows . Let . By contradiction, if two distinct sequences and exist, with , , and , then the -th robot travels its cluster four times. Since the speed of the robots is bounded by one, robot cannot travel its cluster four times in a period of (cf. Figure 3). The second part of the theorem follows from an analogous reasoning.

Notice that in the above Lemma the index belongs to the set (resp. ) because we consider consecutive communication instants, and because denotes the sequence of times at which robots and communicate. Because of Lemma ?, in a -periodic team trajectory with only one message can be passed from robot to robot in a period of time of . This limitation determines a lower bound on the latency of a periodic trajectory. Notice that eventual communication instants , with , do not influence the latency, since all information can be transmitted at time without affecting the latency performance.

Because of Lemma ?, a message can be transfered from robot to robot in at most instants of time, by traveling the clusters and . Without losing generality, we let be the time to pass a message form to , and from to . Notice that the same reasoning holds also for the time to transfer a message from to . Therefore, the latency is lower bounded by .

We now consider the situation in which an optimal -partition does not verify the constraint for all . Intuitively, for what concerns the latency, two consecutive clusters with length and may be regarded as one single cluster of length . Therefore, in order to use Lemma ? and Lemma ?, we partition the clusters into groups such that the sum of the length of the clusters of two consecutive groups is greater than . In other words, let be the set of *right-extreme* viewpoints of the partition defined recursively as

where such that . Let be the set of *left-extreme* viewpoints defined recursively as

Additionally, define the set of aggregated clusters , where contains all the clusters within and , and let be the sum of the length of the clusters in .

Consider the clusters defined by the right extreme viewpoints, and notice that they verify . Then, the Theorem follows from Lemma ?, and from the fact that the minimum latency on the image equals the minimum latency on the image . The terms and are due to the fact that we are interested in delivering a message from robot to robot in the original configuration, and not on the aggregated chain.

### 4.3Optimal team trajectory for latency

A team Trajectory with minimum refresh time and minimum latency is formally presented in Trajectory ?, where we specify the instants of time at which a robot changes its velocity, and we assume that it moves at maximum speed otherwise. An example is reported in Figure 4, and here we give an informal description. Let be an optimal -partition of a chain graph, and let be the set of aggregated clusters. Recall that is a subset of , and that the sum of the length of two consecutive elements is larger than . The procedure in Trajectory ? (lines and ) is such that the robots in the same group behave as a single robot assigned to the whole set of viewpoints. In other words, the motion of the robots in the same group is determined by a token passing mechanism, in which robot moves towards only when and , and, analogously, robot moves towards only when and . Instead, lines and in Trajectory ? guarantee the transfer of one message in a period of between three consecutive groups, and, consequently, the minimization of the latency. Indeed, since the sum of the length of two consecutive groups is larger than , because of Lemma ?, no more than one message can be transferred between three consecutive groups in a period of .

By inspection, the team Trajectory described in Trajectory ? is -periodic, and therefore it has minimum refresh time. Moreover, by construction, the communications at the extreme viewpoints happen every instants of time, so that the latency is equal to , and hence, by Lemma ?, minimum. Regarding the computational complexity, notice that it is determined by the computation of the optimal -partition , and hence, by Lemma ?, it equals .

## 5Distributed synchronization algorithm on a chain roadmap

In the previous sections we have shown that, for the computation of a minimum refresh time and latency team trajectory, first an optimal -partition of the roadmap needs to be found, and, then, a synchronization of the motion of the robots needs to be achieved to ensure communication between neighboring robots. The distributed computation of an optimal -partition follows directly from Algorithm ?, by letting the robots compute the left-induced partition of length in a distributed way. A simple solution consists of the following three operation:

the robots gather at the leftmost viewpoint, and

determine the cardinality of the team and elect a leader;

the leader computes an optimal left-induced partition, and assigns a different cluster to each robot.

Notice that, by only assuming the capability of detecting the viewpoints in the roadmap (in particular the leftmost and rightmost viewpoint) the robots can distributively compute an optimal partition. Indeed, the leader can simply travel the roadmap, and evaluate if, for a given length , the cardinality of the corresponding left-induced partition is greater, equal, or smaller than the cardinality of the team. We believe that, by simple programming operations, the above procedure can be improved, so as to handle reconfigurations due to addition or removal of robots in the team. In this section we focus instead on the design of a distributed feedback law to synchronize the motion of the robots so as to guarantee the minimization of the latency of the trajectory.

Recall that denotes the position on the chain of the robot at time . Moreover, let the -th cluster of an optimal -partition be delimited by and . Let denote the direction of motion of robot . Let *c-time* denote the current time of simulation, let *a-time* be the time at which a robot arrives at his right extreme. Let *n-meet(i,j)* be a function that returns the number of times that the robots and have communicated. Let *Timer()* be a function that returns after a time interval of length . An algorithm for the robots to distributively converge to a minimum refresh time and latency team trajectory is in Algorithm ?. It should be noticed that the algorithm assumes the knowledge of an optimal partitioning of the chain graph, and of the left- and right-extreme sets.

Algorithm ? is informally described as follows. First, the velocity of a robot changes only when its position coincides with the leftmost or the rightmost of the assigned viewpoints. When a robot reaches an extreme viewpoint, it waits until a communication with the neighboring robot happens (lines ). This mechanism determines the feedback behavior of our procedure. The behavior of a robot after a communication is determined by the lines , which reproduce the optimal behavior described in Trajectory ?. To be more precise, the function *Token()* coordinates the motion of the robots in the same group (see Section 4.3), so that they move as if there was a single robot sweeping the viewpoints in the same group. The function *Timer()*, instead, ensures the maximum frequency of messages exchange between consecutive groups, so as to minimize the latency of the resulting trajectory.

Let be an optimal -partition, let be the set of right-extreme viewpoints, and let be the set of left-extreme viewpoints. Let denote the set of robots patrolling a viewpoint between and , where and are as previously defined. First, notice that robot (resp. ) sets (resp. ) as soon as (resp. ). Second, the function guarantees that, when communicate, exactly one robot among maintains a zero velocity and in an alternate way. Therefore, after a finite time , independent of the initial robots motion direction, the velocities of the robots in are such that, upon communication, and . In other words, after , the robots in behave as a single robot sweeping the segments between and . Finally, the function and the parameter guarantee that the communications at the extreme viewpoints happen every instants of time. We conclude that the trajectory generated by Algorithm ? converges in finite time to a team trajectory with minimum refresh time and latency.

It should be observed that, differently from the team trajectories presented in the previous sections, Algorithm ? contains a feedback procedure to synchronize the motion of the robots. Our algorithm is independent of the initial configuration, and, as it is shown in the next section, it is robust to a certain class of robot failures.

## 6A case study

Given the theoretical nature of this work, in this section we propose a simulation study to show the effectiveness of our procedures. For our simulations, we use the Matlabsimulation environment, and we model the robots as holonomic vehicles of zero dimension. The communication edges and the motion paths are described by a given roadmap.

Consider the chain roadmap with viewpoints in Figure 5. Suppose that robots are assigned to the patrolling task. In order to obtain a team trajectory with minimum refresh time, an optimal -partition of the roadmap is computed (cf. Figure 5). Additionally, to obtain a minimum latency team trajectory, each robot is assigned to a different cluster, its initial position is chosen randomly inside its cluster, and its velocity is initialized randomly. The motion of each robot is then determined by Algorithm ?. The resulting team trajectory is in Figure 6, where the team of robots synchronize on a minimum refresh time and latency team trajectory after a finite transient.

We now test the robustness of our synchronization procedure. As first case study, we consider a temporary stopping failure, in which a robot stops for a certain time interval. For instance, suppose that robot stops from time up to time (cf. Figure 6). Notice that, after the failure, each robot , with , gathers at , and each robot , with , gathers at waiting for a communication with the corresponding neighboring robot. As soon as robot resumes its functionalities, the team of robots recover the desired synchronization. Notice that the transient failure of robot can be easily detected by its neighbors by means of a timer mechanism with a predefined threshold.

As a second case study, we let the robots actuation be affected by noise, so that the speed of the robots becomes a random variable with a certain distribution.^{2}

As third and final case study, we consider the situation in which a robot definitively stops.^{3}

## 7Approximation algorithms and heuristics for general roadmaps

The problem of designing minimum refresh time and latency team trajectories on a chain roadmap has been discussed. In this section we consider the more general cases of tree and cyclic roadmap, we characterize the computational complexity of determining optimal trajectories, and we describe two approximation methods with performance guarantees. The results we are going to present are intended for a team of more than one robot. Indeed, if only one robot is assigned to the patrolling task, then a minimum refresh time trajectory follows from the computation of the shortest tour through the viewpoints, for which efficient approximation algorithms already exist [28].

### 7.1Minimum refresh time team trajectory on a tree roadmap

Let denote an undirected, connected, and acyclic roadmap (tree). Recall that a vertex path is a sequence of vertices such that any pair of consecutive vertices in the sequence are adjacent. A tour is a vertex path in which the start and end vertices coincide, and in which every vertex of appears at least once in the sequence. A depth-first tour of is a tour that visits the vertices in a depth-first order [29]. Let DFT denote the length of a depth first tour of . Notice that the length of a depth-first tour of a connected tree equals twice the sum of the length of the edges of the tree, and that any depth-first tour is a shortest tour visiting all the vertices. We now show that, for the case of tree roadmap, the set of cyclic-based and partition-based trajectories described in [15] does not contain, in general, a minimum refresh time trajectory. Recall that in a cyclic-based strategy the robots travel at maximum speed and equally spaced along a minimum length tour visiting all the viewpoints. Consider the tree roadmap of Fig. ?, and suppose that two robots are assigned to the patrolling task. Clearly, the minimum refresh time is , while the refresh time of a cyclic strategy equals . Consider now the tree roadmap in Fig. ?, where the edges have unit length, and assume that two robots are in charge of the patrolling task. Observe that any partition of cardinality contains a chain of length , so that, since only one robot is assigned to each cluster, the minimum refresh time that can be obtained is . Suppose, instead, that the robots visit the vertices of the roadmap as specified in Table ?, where denotes the position of a robot at time . Since the refresh time of the proposed trajectory is , we conclude that neither the cyclic-based nor the partition-based strategy may lead to a minimum refresh time team trajectory on a tree roadmap.

Robot | ||||||||
---|---|---|---|---|---|---|---|---|

1 | ||||||||

2 | ||||||||

We now introduce some definitions. Let be a team trajectory on the tree roadmap . We say that the edge is *used* by if there exists and such that and , and it is *unused* otherwise. Note that, because in a tree there exists only one path connecting two vertices, the above condition ensures that the edge is traveled by the robot . Let denote the set of unused edges, and let be the forest obtained from by removing the edges from , i.e., the collection of vertex-disjoint subtrees , with , such that and , for each . Let be the number of robots that visit at least one vertex of in the interval , and note that in a finite refresh time trajectory. Let . Notice that the same subtree collection can be associated with different team trajectories. We say that a team trajectory is *efficient* if its refresh time is the smallest among all the team trajectories associated with the same subtree collection.

Let , and let be the number of robots assigned to . Notice that the robots in travel, in total, at least to visit all the vertices. Since the speed of the robots is bounded by , the smallest refresh time for the vertices of is .

An efficient team trajectory, can be computed with the following procedure. See Table ? for an example.

Since every vertex of appears at least once in a depth first tour of , and the robots move with maximum speed and equally spaced along , every vertex is visited at most every . The statement follows.

Let be the partition set of , i.e., the set of all the sequences of integers whose sum is . The following problem is useful to characterize the complexity of designing minimum refresh time trajectories on a tree roadmap.

As a consequence of Theorem ?, the minimum refresh time on a tree roadmap can be written as , where is a subtree collection of , and . It follows that a solution to Problem ? can be derived in polynomial time from a solution to Problem ? by using the procedure described in Lemma ?. Suppose now we have a solution to Problem ?. Then an optimal subtree collection follows from the identification of the unused edges. We conclude that the two optimization problems are equivalent.

We now state our main result on the design of minimum refresh time team trajectory on a tree roadmap.

Recall from [30] that an optimal subtree collection can be computed in . Then, by using Lemma ? and Lemma ?, the claimed statement follows.

As a consequence of Theorem ?, the problem of designing minimum refresh time team trajectories on a tree roadmap is computationally *easy* for any finite number of robots. In our design procedure, we first compute an optimal subtree collection of the given tree, and then we schedule the robots trajectory according to Lemma ?.

### 7.2Minimum refresh time team trajectory on a cyclic roadmap

In this section we propose two approximation methods for the Team refresh time problem in the case of a cyclic, i.e., not acyclic, roadmap. These solutions are obtained from a transformation of the cyclic roadmap into an acyclic roadmap.

Let , with , be an undirected and connected roadmap. Note that there exists an open tour with at most edges that visits all the vertices.^{4}

We construct a chain roadmap from by doubling its repeated vertices and edges, so that has at most vertices and at most edges, and such that the length of the -th edge of equals the length of the -th edge of (cf. Figure 7). Our first approximation method consists of applying Algorithm ? to an optimal -partition of .

Let be the shortest length of the edges of , and note that the length of is upper bounded by . It follows that . Since by assumption, some robots need to move along for all the viewpoints to be visited. Because each robot can visit only a vertex at a time, at least steps are needed to visit all the vertices of , and therefore . By taking the ratio of the two quantities the statement follows.

It should be noticed that, when grows, the performance of our procedure might degrade. For instance, suppose that the roadmap is as in Figure 8, and suppose that robots are assigned to the patrolling task. As long as , a minimum refresh time strategy requires one robot to patrol the viewpoints , while the second, third, and fourth robot stay on the viewpoints , , and respectively. It follows that . On the other hand, an optimal -partition of any chain graph associated with a tour that visits all the viewpoints has dimension at least . Consequently, the refresh time of the team trajectory obtained with Algorithm ? equals , and the ratio grows proportionally to .

We next describe a polynomial time constant factor approximation algorithm for the minimum refresh time problem. Given a roadmap and a positive integer , we define a path cover of cardinality as the collection of paths such that . Let the cost of a path equal the sum of the lengths of its edges. The min-max path cover problem asks for a minimum cost path cover for the input graph, where the cost of a cover equals the maximum cost of a path in the cover. The following result is known.

Following Theorem ?, given a graph , there exists a polynomial time algorithm that computes a path cover of with cost at most times greater than the cost of any path cover of . We now state our approximation result for the *NP-hard* Team refresh time problem.

Let be a -approximation path cover of the graph . Note that the length of each path is within . Indeed, in a minimum refresh time team trajectory starting at time and with unitary velocity, every vertex is visited within time . Let be a team trajectory obtained by letting robot sweep at maximum speed the path . Clearly, . Because of Theorem ?, the team trajectory can be computed in polynomial time.

Following Lemma ?, for any given roadmap and any number of robots, a team trajectory with refresh time within a factor of of the optimal refresh time can be constructed by computing a path covering of the roadmap, and by assigning a different path to each robot. An example is in Figure 9, a movie of which is included in the multimedia material.

## 8Conclusion and future work

The design of team trajectories to cooperatively patrol an environment has been discussed. After defining the problem and the performance criteria, we analyze the computational complexity of the design problem as a function of the shape of the environment to be patrolled. For the case of a chain environment, we describe a polynomial algorithm to compute minimum refresh time and latency team trajectories. For the case of a tree environment, under the technical assumption of a constant number of robots, we identify a polynomial time algorithm to compute minimum refresh time team trajectories. Finally, the general case of cyclic environment is shown to be *NP-hard*, and two approximation algorithms with performance guarantees have been proposed.

Interesting aspects requiring further investigation include a throughout study of the latency optimization problem for cyclic roadmaps, the development of more efficient approximation algorithms, and the introduction of a more general communication framework, in which the robots are allowed to communicate while traveling the edges of the roadmap. The study of average performance criteria and the extension to dynamically changing environments are also of interest. Finally, an hardware implementation of our algorithms would further strengthen our theoretical findings.

### Footnotes

- We focus on this family of trajectories, and we leave the more general optimization problem as the subject of future research. However, this family of trajectories is believed to contain an (unconstrained) optimal solution.
- The case in which a robot fails at seeing a neighboring robot for a certain interval of time can be modeled analogously.
- The case of additional robots joining the team is handled in a similar way.
- An open tour with at most edges that visits all the vertices can be constructed starting from a leaf of a spanning tree of .

### References

- J. Clark and R. Fierro, “Mobile robotic sensors for perimeter detection and tracking,”
*ISA Transactions*, vol. 46, no. 1, pp. 3–13, 2007. - D. B. Kingston, R. W. Beard, and R. S. Holt, “Decentralized perimeter surveillance using a team of UAVs,”
*IEEE Transactions on Robotics*, vol. 24, no. 6, pp. 1394–1404, 2008. - S. Susca, S. Martínez, and F. Bullo, “Monitoring environmental boundaries with a robotic sensor network,”
*IEEE Transactions on Control Systems Technology*, vol. 16, no. 2, pp. 288–296, 2008. - Y. Elmaliach, A. Shiloni, and G. A. Kaminka, “A realistic model of frequency-based multi-robot polyline patrolling,” in
*International Conference on Autonomous Agents*, Estoril, Portugal, May 2008, pp. 63–70. - B. C. Tansel, R. L. Francis, and T. J. Lowe, “Location on networks: a survey. Part I: the p-center and p-median problems,”
*Management Science*, vol. 29, no. 4, pp. 482–497, 1983. - T. Bektas, “The multiple traveling salesman problem: an overview of formulations and solution procedures,”
*Omega*, vol. 34, no. 3, pp. 209–219, 2006. - E. M. Arkin, R. Hassin, and A. Levin, “Approximations for minimum and min-max vehicle routing problems,”
*Journal of Algorithms*, vol. 59, no. 1, pp. 1–18, 2006. - M. Batalin and G. S. Sukhatme, “The design and analysis of an efficient local algorithm for coverage and exploration based on sensor network deployment,”
*IEEE Transactions on Robotics*, vol. 23, no. 4, pp. 661–675, 2007. - N. Agmon, S. Kraus, and G. A. Kaminka, “Multi-robot perimeter patrol in adversarial settings,” in
*IEEE Int. Conf. on Robotics and Automation*, Pasadena, CA, May 2008, pp. 2339–2345. - F. Amigoni, N. Basilico, and N. Gatti, “Finding the optimal strategies for robotic patrolling with adversaries in topologically-represented environments,” in
*IEEE Int. Conf. on Robotics and Automation*, Kobe, Japan, May 2009, pp. 2005–2010. - A. Marino, L. Parker, G. Antonelli, and F. Caccavale, “Behavioral control for multi-robot perimeter patrol: A finite state automata approach,” in
*IEEE Int. Conf. on Robotics and Automation*, Kobe, Japan, May 2009, pp. 3350–3355. - D. A. Anisi, P. Ögren, and X. Hu, “Cooperative minimum time surveillance with multiple ground vehicles,”
*IEEE Transactions on Automatic Control*, no. 99, 2010, to appear. - A. Almeida, G. Ramalho, H. Santana, P. Tedesco, T. Menezes, V. Corruble, and Y. Chevaleyre, “Recent advances on multi-agent patrolling,” in
*Advances in Artificial Intelligence - SBIA 2004*.1em plus 0.5em minus 0.4emSpringer, 2004, vol. 3171, pp. 474–483. - A. Machado, G. Ramalho, J. D. Zucker, and A. Drogoul, “Multi-agent patrolling: An empirical analysis of alternative architectures,” in
*Multi-Agent-Based Simulation II*, ser. Lecture Notes in Computer Science.1em plus 0.5em minus 0.4emSpringer, 2003, pp. 155–170. - Y. Chevaleyre, “Theoretical analysis of the multi-agent patrolling problem,” in
*IEEE/WIC/ACM Int. Conf. on Intelligent Agent Technology*, Beijing, China, Sep. 2004, pp. 302–308. - S. L. Smith and D. Rus, “Multi-robot monitoring in dynamic environments with guaranteed currency of observations,” in
*IEEE Conf. on Decision and Control*, Atlanta, GA, USA, Dec. 2010, pp. 514–521. - R. E. Korf, “Real-time heuristic search: New results,” in
*National Conf. on Artificial Intelligence*, San Paul, MN, Aug. 1988, pp. 139–144. - G. Dudek, M. Jenkin, E. Milios, and D. Wilkes, “Robotic exploration as graph construction,”
*IEEE Transactions on Robotics and Automation*, vol. 7, no. 6, pp. 859–865, 1991. - M. A. Bender, A. Fernández, D. Ron, A. Sahai, and S. Vadhan, “The power of a pebble: Exploring and mapping directed graphs,”
*Information and Computation*, vol. 176, no. 1, pp. 1–21, 2002. - I. A. Wagner, M. Lindenbaum, and A. M. Bruckstein, “Efficiently searching a graph by a smell-oriented vertex process,”
*Annals of Mathematics and Artificial Intelligence*, vol. 24, no. 1, pp. 211–223, 1998. - F. Pasqualetti, A. Franchi, and F. Bullo, “On optimal cooperative patrolling,” in
*IEEE Conf. on Decision and Control*, Atlanta, GA, USA, Dec. 2010, pp. 7153–7158. - S. M. LaValle,
*Planning Algorithms*.1em plus 0.5em minus 0.4emCambridge University Press, 2006, available at`http://planning.cs.uiuc.edu`

. - J. O’Rourke,
*Art Gallery Theorems and Algorithms*.1em plus 0.5em minus 0.4emOxford University Press, 1987. - K. J. Obermeyer, A. Ganguli, and F. Bullo, “Multi-agent deployment for visibility coverage in polygonal environments with holes,”
*International Journal on Robust and Nonlinear Control*, Sep. 2010, to appear. - I. A. Wagner, M. Lindenbaum, and A. M. Bruckstein, “MAC vs. PC: Determinism and randomness as complementary approaches to robotic exploration of continuous unknown domains,”
*International Journal of Robotics Research*, vol. 19, no. 1, pp. 12–31, 2000. - A. Franchi, L. Freda, G. Oriolo, and M. Vendittelli, “The sensor-based random graph method for cooperative robot exploration,”
*IEEE/ASME Transactions on Mechatronics*, vol. 14, no. 2, pp. 163–175, 2009. - M. R. Garey and D. S. Johnson,
*Computers and Intractability*.1em plus 0.5em minus 0.4emSpringer, 1979. - S. Arora, “Polynomial-time approximation schemes for the Euclidean TSP and other geometric problems,”
*Journal of the ACM*, vol. 45, no. 5, pp. 753–782, 1998. - D. Peleg,
*Distributed Computing. A Locality-Sensitive Approach*, ser. Monographs on Discrete Mathematics and Applications.1em plus 0.5em minus 0.4emSIAM, 2000. - H. Nagamochi and K. Okada, “A faster 2-approximation algorithm for the minmax p-traveling salesmen problem on a tree,”
*Discrete Applied Mathematics*, vol. 140, no. 1-3, pp. 103–114, 2004. - V. V. Vazirani,
*Approximation Algorithms*.1em plus 0.5em minus 0.4emSpringer, 2001.