Efficient Algorithms for Optimal Perimeter Guarding

Efficient Algorithms for Optimal Perimeter Guarding

\authorblockNSi Wei Feng\authorrefmark1, Shuai D. Han\authorrefmark1, Kai Gao\authorrefmark2 and Jingjin Yu\authorrefmark1 \authorblockA\authorrefmark1Department of Computer Science, Rutgers University at New Brunswick, Piscataway, New Jersey, U.S.A. \authorblockA\authorrefmark2 School of Mathematics, University of Science and Technology of China, Hefei, Anhui, China
Abstract

We investigate the problem of optimally assigning a large number of robots (or other types of autonomous agents) to guard the perimeters of closed 2D regions, where the perimeter of each region to be guarded may contain multiple disjoint polygonal chains. Each robot is responsible for guarding a subset of a perimeter and any point on a perimeter must be guarded by some robot. In allocating the robots, the main objective is to minimize the maximum 1D distance to be covered by any robot along the boundary of the regions. For this optimization problem which we call optimal perimeter guarding (OPG), thorough structural analysis is performed, which is then exploited to develop fast exact algorithms that run in guaranteed low polynomial time. In addition to formal analysis and proofs, experimental evaluations and simulations are performed that further validate the correctness and effectiveness of our algorithmic results.

I Introduction

Consider the scenario from Fig. 1, which contains a closed region with its boundary or border demarcated by the red and dotted blue polygonal chains (p-chains for short). To secure the region, either from intrusions from the outside or unwanted escapes from within, it is desirable to deploy a number of autonomous robots to monitor or guard either the entire boundary or selected portions of it, e.g., the three red p-chains), with each robot responsible for a continuous section. Naturally, one might also want to have an even coverage by the robots, e.g., minimizing the maximum effort from any robot. In practice, such effort may correspond to sensing ranges or motion capabilities of robots, which are always limited. As an intuitive example, the figure may represent the top view of a castle with its entire boundary being a high wall on which robots may travel. The portion of the wall marked with the three red p-chains must be protected whereas the part marked by the dotted blue p-chains may not need active monitoring (e.g., the outside of which may be a cliff or a body of deep water). The green and orange p-chains show an optimal distribution of the workload by robots that covers all red p-chains but skips two of the three blue dotted p-chains.

More formally we study the problem of deploying a large number of robots to guard a set of 1D perimeters. Each perimeter is comprised of one or more 1D (p-chain) segments that are part of a circular boundary (e.g., the red p-chains in Fig. 1). Each robot is tasked to guard a continuous 1D p-chain that covers a portion of a perimeter. As the main objective, we seek an allocation of robots such that (i) the union of the robots’ coverage encloses all perimeters and (ii) the maximum coverage of any robot is minimized. We call this 1D deployment problem the Optimal Perimeter Guarding (OPG) problem.

{overpic}

[width=3.5in ,tics=5]./figures/example-eps-converted-to.pdf

Fig. 1: An illustrative scenario where a perimeter, in this case represented as the red polygonal chains (p-chains), must be guarded by robots, which are constrained to only travel along the perimeter boundary (the red p-chains plus the dotted blue ones, which are gaps that do not need to be guarded). An optimal set of locations for the robots and the coverage region for each robot are marked on the perimeter boundary in green and orange, which minimizes the maximum coverage required for any robot.

In this work, three main OPG variants are examined. The settings regarding the perimeter in these three variants are: (i) multiple perimeters with each having a single connected component; (ii) a single perimeter containing multiple connected components; and (iii) multiple perimeters with each containing multiple connected components (the most general case). For all three variants, we have developed exact algorithms for solving OPG that runs in low polynomial time. More specifically, let there be robots, perimeters, with perimeter () containing connected components. If , then let the only perimeter contains connected components. For the three variants, our algorithm computes an optimal solution in time , , and , respectively, which are roughly quadratic in the worst case. The modeling of the OPG problem and the development of the efficient algorithms for OPG constitute the main contribution of this paper.

With an emphasis on the deployment of a large number of robots, within multi-robot systems research [1, 2, 3, 4], our study is closely related to formation control, e.g., [5, 6, 7, 8, 9, 10, 11], where the goal is to achieve certain distributions through continuous (often, local sensing based) interactions among the agents or robots. Depending on the particular setting, the distribution in question may be spatial, e.g., rendezvous [5, 11], or maybe an agreement in agent velocity is sought [6, 8]. In these studies, the resulting formation often has some degree-of-freedoms left unspecified. For example, rendezvous results [5, 11] often come with exponential convergence guarantee, but the location of rendezvous is generally unknown a priori.

On the other hand, in multi-robot task and motion planning problems (e.g., [12, 13, 14, 15, 16, 17, 18, 19]), especially ones with a task allocation element [12, 14, 15, 16, 17, 19], the (permutation-invariant) target configuration is often mostly known. The goal here is finding a one-to-one mapping between individual robots and the target locations (e.g., deciding a matching) and then plan (possibly collision-free) trajectories for the robots to reach their respective assigned targets [16, 17, 19]. In contrast to formation control and multi-robot motion planning research, our study of OPG seeks to determine an exact, optimal distribution pattern of robots (in this case, over a fairly arbitrary, bounded 1D topological domain). Thus, solutions to OPG may serve as the target distributions for multi-robot task and motion planning, which is the main motivation behind our work. The generated distribution pattern is also potentially useful in multi-robot persistent monitoring [20] and coverage [21, 22] applications, where robots are asked to carry out sensing tasks in some optimal manner.

As a multi-robot coverage problem, OPG is intimately connected to Art Gallery problems [23, 24], with origins traceable to half a century ago [25]. Art Gallery problems assume a visibility-based [26] sensing model; in a typical setup [23], the interior of a polygon must be visible to at least one of the guards, which may be placed on the boundaries, corners, or the interior of the polygon. Finding the optimal number of guards are often NP-hard [27]. Alternatively, disc-based sensing model may be used, which leads to the classical packing problem [28, 29], where no overlap is allowed between the sensors’ coverage area, the coverage problem [30, 31, 32, 33, 34], where all workspace must be covered with overlaps allowed, or the tiling problem [35], where the goal is to have the union of sensing ranges span the entire workspace without overlap. For a more complete account on Art Gallery, packing, and covering, see Chapters 2, 3, and 33 of [36]. Despite the existence of a large body of literature performing extensive studies on these intriguing computational geometry problems, these types of research mostly address domains that are 2D and higher. To our knowledge, OPG, as an optimal coverage problem over a non-trivial 1D topological space, represents a practical and novel formulation yet to be fully investigated.

The rest of the paper is organized as follows. The OPG problem and some of its most basic properties are described in Section II. In Section III, a thorough structural analysis of OPG with single and multiple perimeters is performed, paving the way for introducing the full algorithmic solutions in Section IV. Then, in Section V, comprehensive numerical evaluations of the multiple polynomial-time algorithms are carried out. In addition, two realistic application scenarios are demonstrated. In Section VI, we conclude with additional discussions.

Ii The Optimal Perimeter Guarding Problem

Let be a compact (i.e., closed and bounded) two-dimensional workspace. There are pairwise disjoint regions where each region is homeomorphic to the closed unit disc, i.e., there exists a continuous bijection for all . For a given region , let be its (closed) boundary (therefore, maps to the unit circle ). With a slight abuse of notation, define . For each , is called the perimeter of which is either a single closed curve or formed by a finite number of possibly curved line segments. In this paper, we assume a perimeter is given as a single p-chain (possibly a polygon) or multiple disjoint p-chains. Let , which must be guarded. More formally, each is homeomorphic to a compact subset of the unit circle. For a given , each of its maximal connected component (a p-chain) is called a perimeter segment or segment, whereas each maximal connected component of is called a perimeter gap or gap. An example is illustrated in Fig. 2 with two regions.

{overpic}

[width=3.5in ,tics=5] ./figures/example-boundaries-eps-converted-to.pdf

Fig. 2: An example of a workspace with two regions . Due to three gaps on , marked as dotted lines within long rectangles, has three segments (or maximal connected components); has a single segment with no gap.

There are indistinguishable point robots residing in . These robots are to be deployed to cover the perimeters such that each robot is assigned a continuous closed subset of some . All of must be covered by , i.e., , which implies that elements of need not intersect on their interiors. Hence, it is assumed that any two elements of may share at most their endpoints. Such a is called a cover of .

Given a cover , for a , , let denote its length (more formally, measure). It is desirable to minimize the maximum , i.e., the goal is to find a cover such that the value is minimized. This corresponds to minimizing the maximum workload for each robot or agent. The formal definition of the Optimal Perimeter Guarding (OPG) problem is provided as follows.

Problem 1 (Optimal Perimeter Guarding (Opg)).

Given the perimeter of a set of 2D regions , find a set of polygonal chains such that covers , i.e.,

(1)

with the maximum of minimized, i.e., among all covers satisfying (1),

(2)

Here, we introduce the technical assumption that the ratio between the length of and the length of is polynomial in the input parameters. That is, the length of is not much larger than the length of . The assumption makes intuitive sense as any gap should not be much larger than the perimeter in practice. We note that the assumption is not strictly necessary but helps simplify the correctness proof of some algorithms.

Henceforth, in general, is used when an optimal cover is meant whereas is used when a cover is meant. We further define the optimal single robot coverage length as

(3)

Fig. 1 shows an example of an optimal cover by robots of a perimeter with three components. Note that one of the three gaps (the one on the top area as part of the hexagon) is fully covered by a robot, which leads to a smaller as compared to other feasible solutions. This interesting phenomenon, which is actually a main source of the difficulty in solving OPG, is explored more formally in Section III (Proposition 3).

Given the OPG formulation, additional details on must be specified to allow the precise characterization of the computational complexity (of any algorithm developed for OPG). For this purpose, it is assumed that each , , is a simple (i.e., non-intersecting and without holes) polygon with an input complexity , i.e., has about vertices or edges. If an OPG has a single region , then let have an input complexity of . Note that the algorithms developed in this work apply to curved boundaries equally well, provided that the curves have similar input complexity and are given in a format that allow the computation of their lengths with the same complexity. Alternatively, curved boundaries may be approximated to arbitrary precision with polygons.

For deploying a robot to guard a , one natural choice is to send the robot to a target location such that is the centroid of . Since is one dimensional, is the center (or midpoint) of . After solving an OPG, there is the remaining problem of assigning the robots to the centers of and actually moving the robots to these assigned locations. As a secondary objective, it may also be desirable to provide guarantees on the execution time required for deploying the robots to reach target guarding locations. We note that, the task assignment (after determining target locations) and motion planning component for handling robot deployment, essential for applications but not a key part of this work’s contribution, is briefly addressed in Section V.

With some satisfying (1) and (2), we may further require that is minimized for all . This means that a gap will never be partially covered by some . In the example from Fig. 2, may be one of the gaps on ; clearly, it is not beneficial to have some partially cover (i.e., intersect the interior of) one of these. This rather useful condition (note that this is not an assumption but a solution property) yields the following lemma.

Lemma 1.

For a set of perimeters where for , there exists an optimal cover such that, for any gap (or maximal connected component) and any , or .

Remark. Our definition of coverage is but one of the possible models of coverage. The definition restricts a robot deployed to , to essentially live on . The definition models scenarios where a guarding robot must travel along , which is one-dimensional. Nevertheless, the algorithms developed for OPG have broader applications. For example, subroutines in our algorithms readily solve the problem of finding the minimum number of guards needed if each guard has a predetermined maximum coverage.

Iii Structural Analysis

In designing efficient algorithms, the solution structure of OPG induced by the problem formulation is first explored, starting from the case where there is a single region.

Iii-a Guarding a Single Region

Perimeter with a single connected component. For guarding a single region , i.e., there is a single boundary to be guarded, all robots can be directly allocated to . If the single perimeter further has a single connected component that is either homeomorphic to or , then each robot can be assigned a piece such that and . Clearly, such a cover is also an optimal cover.

Perimeter with multiple maximal connected components. When there are multiple maximal connected components (or segments) in a single perimeter , things become more complex. To facilitate the discussion, assume here has segments arranged in the clockwise direction (i.e., ), which leaves gaps with immediately following . Fig. 3 shows a perimeter with five segments and five gaps.

{overpic}

[width=3in ,tics=5] ./figures/single-perimeter-eps-converted-to.pdf

Fig. 3: A perimeter with five segments and five gaps .

Suppose an optimal set of assignments for the robots guarding and satisfying (1) and (2) is . Let be a largest gap, i.e., . Via small perturbations to the lengths of , we may also assume that is unique. On one hand, it must hold that , as a solution where robots evenly cover all of with the gap excluded, satisfies the condition. On the other hand, always holds because the coverage condition requires . These yield a pair of basic upper and lower bounds for the optimal single robot coverage length , summarized as follows.

Proposition 2.

Define

it holds that

(4)

Though some gap, if there at least one, must be skipped by the optimal solution, it is not always the case that a largest gap , even if unique, will be skipped by . That is, an optimal cover may enclose the largest gap.

Proposition 3.

Given a region and perimeter , let be the unique longest connected component of . Let be an optimal cover of . Then, there exist OPG instances in which for some .

Proof.

The claim may be proved via contradiction with the example illustrated in Fig. 4 which readily generalizes. In the figure, there are four gaps , in which three gaps (, , and ) have the same length (i.e., ) and are evenly spaced (i.e., ). Here, , which is times the length of other gaps, i.e., .

{overpic}

[width=3in ,tics=5] ./figures/max-not-skipped-eps-converted-to.pdf

Fig. 4: A case where the perimeter has four segments or maximal connected components. Three of the gaps, , , and are of the same length and are evenly spaced, is times longer.

For robots, the optimal cover must allocate each robot to guard each of , , and . Without loss of generality, let , , and . This means that is covered by and not skipped by . In this case, .

To see that this must be the case, suppose on the contrary that is skipped and let be an alternative cover. By Lemma 1, an optimal cover must skip entirely. In this case, some , say , must have its left endpoint111In this paper, for a non-circular segment or gap, its left endpoint is defined as the limit point along the counterclockwise direction along the perimeter and its right endpoint is defined as the limit point in the clockwise direction along the perimeter. So, in Fig. 4, for , its left endpoint touches and its right endpoint touches . coincide with the right endpoint of of (the point where meets ). Then must cover and ; otherwise, and must cover , which makes and a worse cover than . By symmetry, similarly, some , say , must have its right endpoint coincide with the left endpoint of and cover and . However, this means that both and are covered by . Even if is skipped, this makes , again making sub-optimal. By the pigeonhole principle, at least one of the , , or must be longer than . Therefore, skipping in this case leads to a sub-optimal cover. The optimal cover with is to have . ∎

Proposition 3 implies that in allocating robots to guard a perimeter , an algorithm cannot simply start by excluding the longest component from and then the next largest, and so on. This makes solving OPG more challenging. Referring back to Fig. 1, if the top gap is skipped by the cover, then the three robots on the right side of the perimeter (two orange and one green) need to cover the part of the perimeter between the two hexagons. This will cause to increase.

On the other hand, for an optimal cover of , some must have at least one of its endpoint aligned with an endpoint of a component of (assuming that ).

Proposition 4.

For an optimal cover of a perimeter , for some and , their right (or left) endpoints must coincide.

Proof.

By Lemma 1, for any , and , or . Since at least one , , must be skipped by , some , must have its right endpoint aligned with the right endpoint of , which is on the left of . Following the same argument, some and must have the same left endpoints. ∎

Proposition 4 suggests that we may attempt to cover a perimeter starting from an endpoint of , , and so on. Indeed, as we will show in Section IV, an efficient algorithm can be designed exploiting this important fact.

Iii-B Guarding Multiple Regions

In a multiple region setup, there is one additional level of complexity: the number of robots that will be assigned to an individual region is no longer fixed. This introduces another set of variables with , and , being the number of robots allocated to guard . For a fixed , the results derived for a single region, i.e., Propositions 24 continue to hold.

Iv Efficient Algorithms for Perimeter Guarding

In presenting algorithms for OPG, we begin with the case where each perimeter has a single connected component (i.e., is homeomorphic to or ). Then, we work on the general single region case where the only perimeter is composed of connected components, before moving to the most general multiple regions case.

Iv-a Perimeters Containing Single Components

When there is a single perimeter , the solution is straightforward with . With determined, is also readily computed.

In the case where there are regions, let the optimal distribution of the robots among the regions be given by . For a given region , the robots must each guard a length . At this point, we observe that for at least one region, say , the corresponding must be maximal, i.e., . The observation directly leads to a naive strategy for finding : for each , one may simply try all possible and find the maximum that is feasible, i.e., robots can cover all other , , with each robot covering no more than . Denoting this candidate cover length as and the corresponding as , the smallest overall is then .

The basic strategy mentioned above works and runs in polynomial time. It is possible to carry out the computation much more efficiently if the longest is examined first. Without loss of generality, assume that is the longest perimeter, i.e., for all . Recall that is the number of robots allocated to that yields , it must hold that

(5)

For an arbitrary , simple manipulating of (5) yields

(6)

This means that we only need to consider Moreover, since is the longest perimeter, . Therefore, the difference between the two denominators of (6) is no more than , i.e.,

When , and there are two possibilities. One of these is which leaves a single possible candidate for . The other possibility is in which case there is actually no valid candidate for . That is, after computing and , if then no computation is needed for . If then we only need to check at most one candidate for .

Additional heuristics can be applied to reduce the required computation. First, in finding , we may use bisection (binary search) over since if a given is infeasible, any cannot be feasible either because . Second, let , it holds that . This means that for each , it is not necessary to try any . Third, if a candidate is at any time larger than the current candidate for , that does not need to be checked further. We only use the first and the third in our implementation since the second does not help much once the bisection step is applied. The pseudo code is outlined in Algorithm 1. Note that we assume the problem instance is feasible (), which is easy to check.

It is straightforward to verify that Algorithm 1 runs in time . The comes from the loop, which calls the function IsFeasible(, , ) times. The function checks whether the current is feasible for perimeters other than (note that it is assumed that IsFeasible() has access to the input to Algorithm 1 as well). This is done by computing for , and checking whether . The term comes from the loop. The running time of Algorithm 1 may be further reduced by noting that the loop examines candidate . These can be first computed and sorted, on which bisection can be applied. This drops the main running time to . This second bisection is not reflected in Algorithm 1 to keep the logic and notation more straightforward. If we also consider input complexity, an additional is needed to compute from the raw polygonal input and an additional time is needed for generating the actual locations for the robots. The total complexity is then .

Input : : each a polygon or p-chain; assume that is a longest perimeter
: the number of robots
Output : : the optimal coverage and the realizing it
; ; %Compute and initial .
1 ; ; ; while  do
2        ; ; if IsFeasible(, , ) then
3               ; ; ;
4        else
5               ;
6        end if
7       
8 end while
%Optimize over all .
9 for   do
10        ; ; ; if  and IsFeasible(, , ) and  then
11               ; ;
12        end if
13       
14 end for
return ,
Algorithm 1 MultiRegionSingleComp

Iv-B Single Perimeter Containing Multiple Components

Additional structural analysis. In computing for a single perimeter with multiple connected components, assume that is composed of maximal connected components (e.g., Fig. 3), leaving as the gaps on . Given an optimal cover , by Proposition 4, we may assume that the left endpoint of some , coincides with the left endpoint of some , . We then look at the right endpoint of . If it does not coincide with the right endpoint of some ( and may or may not be the same), it must coincide with the left endpoint of . Continuing like this, eventually we will hit some where the right endpoint of coincides with the right endpoint of some . Within a partitioned subset , the maximal coverage of each robot is minimized when . Because for some , at least one of the subsets must have all robots cover exactly a length of . These two key structural observations are summarized as follows.

Theorem 5.

Let be a solution to an OPG instance with a single perimeter and gaps . Then, may be partitioned into disjoint subsets with the following properties

  1. the union of the individual elements from any subset forms a continuous p-chain,

  2. the left endpoint of such a union coincides with the left endpoint of some , ,

  3. the right endpoint of such a union coincides with the right endpoint of some , , and

  4. the respective unions of elements from any two subsets are disjoint, i.e., they are separated by at least one gap.

Moreover, for at least one such subset, , it holds that .

In the example from Fig. 1, is partitioned into two subsets satisfying the conditions stated in Theorem 5.

A baseline algorithm. The theorem provides a way for computing . For fixed , denote the part of between and following a clockwise direction (with and included) as . Theorem 5 says that for some , for some integer . We may find , and , by exhaustively going through all possible , and (as a candidate of ). For each combination of and , we can compute a

(7)

and check ’s feasibility. The largest feasible is .

Partial feasibility check: For checking feasibility of a particular , i.e., whether is long enough for the rest of the robots to cover the rest of the perimeter, we simply tile copies over the rest of the perimeter, starting from . As an example, see Fig. 5 where robots are to cover the perimeter (in red, with five components ). Suppose that the algorithm is currently working with (i.e., and ). If , then . Each of the five green line segments in the figure has this length. As visualized in the figure, it is possible to cover with three more robots, which is no more than . Therefore, this is feasible; note that it is not necessary to exhaust all robots. In the figure, covers the entire and , as well as part of . The rest of is covered by . As is tiled, it ends in the middle of , so starts at the beginning of . On the other hand, if , the resulting (each of the orange line segments has this length) is infeasible as is now left uncovered.

{overpic}

[width=3in ,tics=5]./figures/tiling-eps-converted-to.pdf

Fig. 5: An illustration of the feasibility check of . The single rectangular region and the perimeter (five red segments ) are shown at the bottom. The orange and green line segments show two potential covers.

The tiling-based feasibility check takes time as there are at most segments to tile; it takes constant time to tile each using a given length. Let us denote this feasibility check IsTilingFeasiblePartial(, , ), we have obtained an algorithm that runs in times since it needs to go through all , , and . For each combination of , and , it makes a call to IsTilingFeasiblePartial(). While a running time is not bad, we can do significantly better.

A much faster algorithm. In the baseline algorithm, for each combination, up to candidate may be attempted. To gain speedups, the first phase of the improved algorithm reduces the range of to limit the choice of . For the faster algorithm, a new feasibility checking routine is needed.

Full feasibility check: We introduce a feasibility check given only a length . That is, a check is done to see whether robots are sufficient for covering without any covering more than length . This feasibility check is performed in a way similar to IsTilingFeasiblePartial() but now and are not specified. We instead try all , as the possible starting segment for the tiling. Let us denote this procedure IsTilingFeasibleFull(), which runs in .

Using bisection to limit the search range for : Starting from the initial bounds for given in Proposition 2 and with IsTilingFeasibleFull(), we can narrow the bound to be arbitrarily small, using bisection, since is the minimum feasible . To do this, we start with as the middle point of initial lower bound and upper bound , and run IsTilingFeasibleFull(). If is feasible, the upper bound is lowered to . Otherwise, the lower bound is raised to . In doing this, our goal in the first phase of the faster algorithm is to reduce the range for so that there is at most a single choice for , regardless of the values of and . The stopping criteria for the bisection is given as follows.

Proposition 6.

Assume that the bisection search stops with lower and upper bound being and . If

(8)

then there is at most a single choice for for all .

Proof.

Assume that when the bisection ends, the lower and upper bounds are and . Then, for some (see (7)), it holds that

Rearranging the above yields

To reduce the number of possible to at most , we want

which is the same as requiring

(9)

Noting that and , Equation (9) is ensured by

(10)

Finding : Equation (8) gives the stopping criteria used for refining the bounds for . After completing the first phase, the algorithm moves to the second phase of actually pinning down . In this phase, instead of checking one by one, we collect for all possible combinations of . Because the first phase already ensures for each combination there is at most one pair of and , there are at most total candidates. After all candidates are collected, they are sorted and another bisection is performed over these sorted candidates. Feasibility check is done using IsTilingFeasiblePartial(). The complete algorithm is given in Algorithm 2. Note that and , which change as the algorithm runs, are not the same as the fixed and from Proposition 2.

In terms of running time, the first loop starts with and stops when . Therefore, the bisection is executed times, which by the assumption that is a polynomial factor over , is . Since each feasibility check takes time, the first loop takes