Abstract
We consider the distributed setting of N autonomous mobile robots that operate in Look-Compute-Move (LCM) cycles and use colored lights (the robots with lights model). We assume obstructed visibility where a robot cannot see another robot if a third robot is positioned between them on the straight line segment connecting them. In this paper, we consider the problem of positioning N autonomous robots on a plane so that every robot is visible to all others (this is called the Complete Visibility problem). This problem is fundamental, as it provides a basis to solve many other problems under obstructed visibility. In this paper, we provide the first, asymptotically optimal, time, color algorithm for Complete Visibility in the asynchronous setting. This significantly improves on an -time translation of the existing time, color semi-synchronous algorithm to the asynchronous setting. The proposed algorithm is collision-free, i.e., robots do not share positions, and their paths do not cross. We also introduce a new technique for moving robots in an asynchronous setting that may be of independent interest, called Beacon-Directed Curve Positioning.
1. Introduction
The classical model of distributed computing by mobile robots models each robot as a point in the plane that is equipped with a local coordinate system and sensory capabilities to determine the positions of other robots []. The local coordinate system of a robot may not be consistent with that of other robots. The sensory capability of a robot, generally called vision, allows a robot to determine the positions of other robots in its own coordinate system. The robots are autonomous (no external control), anonymous (no unique identifiers), indistinguishable (no external identifiers), and disoriented (no agreement on local coordinate systems or units of distance measures).
They execute the same algorithm. Typically, robots have unobstructed visibility, that is, robots are transparent such that three collinear robots can see each other. Each robot proceeds in Look-Compute-Move (LCM) cycles: When a robot becomes active, it first gets a snapshot of its surroundings (Look), then computes a destination based on the snapshot (Compute), and finally moves towards the destination (Move). Moreover, the robots are oblivious, i.e., in each cycle, each robot has no memory of its past LCM cycles []. Furthermore, the robots are silent because they do not communicate directly, and only vision and mobility enable them to coordinate their actions.
While silence has advantages, many other situations, e.g., hostile environments, assume direct communication. The robots with lights model [,,] incorporates direct communication, where each robot has an externally visible light that can assume colors from a constant-sized set; robots explicitly communicate with each other using these colors. The colors are persistent, i.e., the color is not erased at the end of a cycle. Except for the lights, the robots are oblivious as in the classical model. In addition, robots have obstructed visibility such that robot b in line between robots a and c blocks the views of a from c and vice versa.
The following fundamental problem, Complete Visibility on the robots with lights model is the main focus of this paper. Given an arbitrary initial configuration of N robots located at distinct points on a real plane, they autonomously arrange themselves in a configuration in which each robot is in a distinct position and from which it can see all other robots. In the initial configuration, some robots may be obstructed from the view of others and the robots themselves do not know the total number of robots, N. Solving Complete Visibility enables solutions to many other robot problems under obstructed visibility, including gathering, pattern formation, and leader election. For example, we recently solved the problem of pattern formation in Reference [], which uses the solution to Complete Visibility presented in this paper in the first step of its four-step algorithm. Indeed, after the robots reach a configuration of complete visibility, they know the value of N and each robot can see all the robots in the system as in robots model with unobstructed visibility, i.e., any solution to Complete Visibility recovers unobstructed visibility configuration starting from an obstructed visibility configuration.
Di Luna et al. [] gave the first algorithm for robots with lights to solve Complete Visibility on a real plane. They arranged robots on the corners of a N-corner convex hull, which immediately solves Complete Visibility since each robot positioned on a corner of a convex hull sees all other robots positioned on other corners. In the real-world setting, the convex hull based Complete Visibility solution might also help to make a barrier around the site of interest so that the intruders entering the site from one point may be monitored and reported to all the points of interests (provided by robots). Di Luna et al. [] focused mostly on correctness proving that the problem can be solved in finite time. The question of minimizing the number of colors and the precise bound on runtime was left open. References [,] provided solutions minimizing number of colors with finite runtime. References [,] provided solutions with provable runtime bounds keeping the number of colors constant. For example, Reference [] showed that Complete Visibility can be solved in time using colors in the semi-synchronous setting. There is no existing work that provides a runtime bound for Complete Visibility in the asynchronous setting, which is the main goal of this paper.
A straightforward algorithm can be designed to solve Complete Visibility in the asynchronous setting with runtime using colors, combining the semi-synchronous algorithm of Reference [] for Complete Visibility with the result of Das et al. []. The result of Das et al. [] is as follows: Any algorithm (for any problem) in the robots with lights model that uses colors in the semi-synchronous setting can be simulated in the asynchronous setting with, at most, colors. Since the semi-synchronous Complete Visibility algorithm of Reference [] uses 12 colors, the total number of colors in the new algorithm becomes . However, Das et al. [] does not say anything about the runtime of their simulation and it can be shown that, for N robots, this combination increases the runtime by a -factor, meaning that runtime for Complete Visibility in the semi-synchronous setting becomes time for Complete Visibility in the asynchronous setting. In this paper, we present an algorithm for Complete Visibility that runs in time using colors even in the asynchronous setting. Note that runtime is optimal for Complete Visibility, irrespective of the number of colors.
1.1. Contributions
The robot model used in this paper is the same one as in Di Luna et al. []; namely, robots are oblivious except for a persistent light that can assume a constant number of colors. The robots considered here are points. If robots have mass and occupy an area (and volume), then the algorithm we present will not work, and a different algorithm needs to be designed that works respecting the mass of the robots. There is a line of work that solves Complete Visibility for the robots with mass; please refer to References [,,] for some of the most recent works in that line of work. Robots’ visibility can be obstructed by other robots in the line of sight, robots are unaware of the number, N, of robots in the swarm, and the robots may be disoriented. Further, we assume that the robot setting is asynchronous, i.e., there is no notion of common time and robots perform their Look-Compute-Move cycles at arbitrary time. Robot moves robots are rigid, i.e., a robot in motion cannot be stopped (by an adversary) before it reaches its destination point. Our algorithms are collision-free; that is, two robots do not head to the same destination, and their paths of motion do not cross.
In Section 3, we develop a framework called Beacon-Directed Curve Positioning that moves a set of robots onto a (k-point) curve in time using three colors in the asynchronous setting, under the condition that robots (called beacons) are already properly laid out on the curve. Furthermore, robots move need to be collision-free, and their paths cannot intersect the curve at more than one point (Definition 2).
Using this framework, we prove the following result (comparison is in Table 1), which, to our knowledge, is the first algorithm for Complete Visibility that achieves sub-linear runtime for robots with lights in the asynchronous setting. In fact, this runtime is asymptotically optimal as is a trivial lower bound for the problem.
Table 1.
Comparison of Complete Visibility results for the robots with lights model with monotonic movements on a 2-dimensional Euclidean plane.
Theorem 1.
For any initial configuration of robots with lights in distinct positions on a real plane, there is an algorithm that solvesComplete Visibilityin the asynchronous setting in time with colors and without collisions.
Our algorithm is deterministic and has three stages, Stages 0–2, that execute one after another. Stage 0 is needed only if the initial configuration has robots on a straight line; it breaks this initial linear arrangement and places all robots within or on a convex polygon (convex hull of points) in time. After that, Stage 1 places all robots on the corners and sides of a convex polygon . ( is first transformed to , which is completely contained inside , and then is transformed to . All this happens during Stage 1, which operates in five sub-stages, Stage 1.1–1.5.) Finally, Stage 2 moves each robot on a side of polygon to a corner of a new convex polygon (the points that are positioned on the corners of do not move at this stage). (The precise definitions of all these convex polygons are given later in Section 2). Keys to Stage 1 are corner moving, internal moving, and the beacon-directed curve positioning procedures that permit all interior robots of to move to the sides of executing each stage in time, even in the asynchronous setting. An important part of Stage 2 is a corner insertion procedure that moves side robots of to corners of in time while retaining convexity.
This paper is a combination of the ideas presented in IPDPS’17 [] and SSS’17 []. We proved all the properties of Theorem 1 in Reference [] (IPDPS’17), except that the runtime is . Moreover, there were three stages, Stages 0–2, with Stage 1 having 5 sub-stages, Stage 1.1–1.5. Stages 0 and 2 run in time, and Stages 1.1 and 1.4 also run in time. The time was due to the run time of Stages 1.2, 1.3, and 1.5, each of them taking time. The Beacon-Directed Curve Positioning framework developed in Reference [] (SSS’17) allows to run Stages 1.2, 1.3, and 1.5 in time each, giving overall time complexity . Therefore, the combination of the ideas of [,] makes the runtime of claimed in this paper possible.
1.2. Related Work
The problem of Complete Visibility has been getting much attention recently, after it was proposed for the very first time by Di Luna et al. [] in 2014. They proposed the problem on a 2-dimesional real plane and we also consider the problem on the real plane. The most closely related works on a plane are listed in Table 1. Di Luna et al. [] designed the first algorithm for robots with lights to solve Complete Visibility. Their algorithm uses 6 colors in the semi-synchronous setting and 10 colors in the asynchronous setting. Their algorithm arranged robots on corners of a convex polygon, which naturally solves this problem. Although other ways exist to solve Complete Visibility without forming a convex hull, such a convex hull solution provides additional advantages [,] in solving some other problems. One example is our recent work on pattern formation [], where we use the convex hull based Complete Visibility result of this paper in the first step of the four-step algorithm for pattern formation in the asynchronous setting presented in that paper. In this paper, we, too, form a convex hull as a solution to Complete Visibility. Di Luna et al. [] established the correctness of their algorithm, including a proof of (finite-time) termination; however, the work does not include a runtime analysis. Subsequent work [,] reduced the number of colors used for the algorithm. The minimum number of colors is 2, and Sharma et al. provided 2-color algorithm for the semi-synchronous and asynchronous settings of monotonic robot movements (defined later) and 3-color algorithm in the asynchronous setting with non-monotonic robot movements. Therefore, with respect to optimizing the number of colors, there is not much work left except designing a 2-color algorithm for the asynchronous setting of non-monotonic robot movements.
Therefore, the recent focus is mostly on runtime [,], keeping the number of colors constant, i.e., . Runtime is a critical factor when robots have to arrange themselves in a target configuration, frequently while working in real-time after being deployed in their work environments. In this direction, Vaidyanathan et al. [] designed the first algorithm with runtime, and with the use of colors in the fully synchronous setting. Sharma et al. [] improved on this result with runtime using colors in the semi-synchronous setting. Whether this runtime, colors result extends to the asynchronous setting, is an important open question left from these existing works, which we address in this paper by designing such an algorithm that works in time using colors. Of the three models typically considered, fully synchronous, semi-synchronous, and asynchronous, the asynchronous setting is the weakest, and full synchronous is the strongest; asynchronous algorithms present significant challenges in their design and analysis. Therefore, our work considers the problem in the most difficult setting, and, since the algorithm we present works in this most difficult setting, it subsumes all the existing works designed for the relatively simpler fully synchronous and semi-synchronous settings.
It is interesting to consider whether Complete Visibility can be solved when robots may experience faults. Di Luna et al. [] observed that their Complete Visibility algorithm for non-faulty robots can solve Complete Visibility tolerating a faulty robot if the faulty robot is in the perimeter of the convex hull formed by the initial configuration of the robots. Aljohani and Sharma [] provided an algorithm that tolerates one faulty robot (irrespective of whether the faulty robot is in the interior or not) when robots have both-axis agreement in the semi-synchronous setting under rigid movements. The idea was to position all the robots on the corners of a convex hull except the faulty robot that may still be in the interior of the hull in the final configuration. Aljohani and Sharma [] also showed that Complete Visibility can be solved tolerating, at most, 2 faulty robots under certain assumptions on initial configurations. Recently, Poudel et al. [] assumed a weaker one-axis agreement and presented an algorithm for Complete Visibility in the asynchronous setting that can tolerate any number of faulty robots. An interesting property of their algorithm is that it solves Complete Visibility without arranging (non-faulty) robots on the corners of a convex hull.
Complete Visibility was also studied in the classical oblivious robots model (no lights) []. Di Luna et al. [] provided the first algorithm in this model considering the semi-synchronous setting. Sharma et al. [] then provided an algorithm with runtime in this model under the fully synchronous setting. They also showed that the algorithm of Di Luna et al. [] has runtime . Bhagat et al. [] solved Complete Visibility under one-axis agreement in the asynchronous setting.
Recently, Complete Visibility was also studied in the so-called fat robots model (with or without lights) [,] in which robots are not points, but non-transparent unit discs with mass occupiying certain area. In the fat robots with lights model, Sharma et al. [] provided an runtime Complete Visibility algorithm using 9 colors in the fully synchronous setting under rigid (monotonic) movements. In the fat robots (without lights) model, Sharma et al. [] provided an runtime Complete Visibility algorithm in the semi-synchronous setting under rigid movements, with some assumptions on the initial configurations.
Additionally, there is a recent interest in solving Complete Visibility in the grid setting, which discretizes the Euclidean real plane. The grid setting is interesting from the aspect of real applications of robots. Adhikary et al. [] provided a solution to Complete Visibility using 11 colors in the grid setting and no runtime analysis. We provided an algorithm with a provable runtime bound keeping the number of colors constant []. These solutions do not arrange robots on the corners of a convex hull, in contrast to what we do in this paper. Finally, Hector et al. [] provided matching lower and upper bounds on arranging robots on a convex hull in the grid setting, analogous to what we do in this paper.
Beyond Complete Visibility, the computational power of the robots with lights compared to classical oblivious robots was studied in Reference [], while the robots are working on the Euclidean plane, and in Reference [], while the robots are working on graphs.
The obstructed visibility, in general, was also considered in the different problems in different settings. One problem that considers obstructed visibility is the problem of uniform spreading of robots on a line []. The robots considered there are classical robots [] (without lights). The fat robots model, in which an individual robot is a unit disc (rather than a point), also assumes obstructed visibility [,,,,]. However, this body of work do not analyze runtime. Pagli et al. [] study the problem of collision-free Gathering classical robots to a small area; however, they do not provide a runtime analysis. Similarly, much work on the classical robot model [,,,] for Gathering does not have runtime analysis, except in a few cases [,,,,]. Furthermore, Izumi et al. [] considered the robot scattering problem (opposite of Gathering) in the semi-synchronous setting and provided a solution with an expected runtime of ; here, D is the diameter of the initial configuration. Our paper focuses on runtime analysis and provides an optimal runtime algorithm for Complete Visibility on a plane for point robots in the lights model in the asynchronous setting keeping the number of colors constant. It will be interesting to see where our runtime approach can help to provide runtime bounds for some/all problems that we discussed above in the paragraph.
1.3. Roadmap
In Section 2, we detail the robot model and discuss some preliminaries. We define the beacon directed framework for positioning a set of robots on a curve in Section 3. Section 4, Section 5, Section 6 and Section 7 are devoted to proving Theorem 1 using the framework of Section 3. In Section 8, we provide some concluding remarks.
2. Model and Preliminaries
- Robots
Let be a set of N robots (agents) in a distributed system. Each robot is represented as a (dimensionless) point that moves in , the infinite 2-dimensional real plane. In this paper, a point will denote a robot, as well as its position. A robot can see, and be visible to, another robot iff there is no third robot in the line segment joining and . Each robot has a light that can assume one color at a time; this color comes from a set with a constant number of colors.
- Look-Compute-Move
At any given time, a robot can be active or inactive. When robot becomes active, it performs the “Look-Compute-Move” (LCM) cycle described below.
- Look: For each robot that is visible to , robot observes the position of and the color of its light. It is assumed that is visible to itself.Each robot observes position of other robots accurately, but within its own local frame of reference. That is, two different robots observing the position of the same point may produce different coordinates.
- Compute: After observing the position and light color of visible robots, robot may perform an arbitrary computation using only the positions and colors observed during the “look” portion of the current LCM cycle. This computation includes determination of a (possibly) new position to move to and light color for robot for the start of next cycle.
- Move: At the end of the LCM cycle, robot changes its light to the new color (determined during the compute phase) and moves to its new position.Robot maintains this new light color from the current LCM cycle until it is possibly changed in the move phase of the next LCM cycle.
- Robot Activation and Synchronization
In the fully synchronous setting (), every robot is active in every LCM cycle. In the semi-synchronous setting (), at least one robot is active, and over an infinite number of LCM cycles, every robot is active infinitely often. In the asynchronous setting (), robots have no common notion of time. No limit exists on the number and frequency of LCM cycles in which a robot can be active except that every robot is active infinitely often. Complying with the setting, we assume that a robot “wakes up” and performs its Look phase at an instant of time. An arbitrary amount of time may elapse between the Look and Compute phases and between the Compute and Move phases. We also assume that during the Move phase it moves in a straight line at some (not necessarily constant) speed, but without stopping or changing direction. We will call such robot moves monotonic movements.
- Runtime
For the setting, time is measured in rounds. Since a robot in the and settings could stay inactive for an indeterminate number of rounds, we introduce the idea of an epoch to measure runtime. An epoch is the smallest number of rounds within which each robot is active at least once []. Let denote the start time of the algorithm. Epoch i () is the time interval from to where is the first time instance after when each robot has completed at least one complete LCM cycle. Therefore, for the setting, a round is an epoch. We will use the term “time” generically to mean rounds for the setting and epochs for the and settings.
- Convex Polygon
For , represent a convex polygon as a sequence of corner points in a plane that enumerates the polygon vertices in clockwise order. Figure 1 shows a 5-corner convex polygon . A point s on the plane is a side point of iff there exists such that are collinear. Figure 1 shows nine side points –. A side is a sequence of collinear points in which its beginning and end are adjacent corner points and in which its remaining points are side points. For any pair of points , we denote the line segment connecting them by and the length of this segment by . Moreover, we denote the infinite line passing through by .
Figure 1.
A convex polygon with five corner points and nine side points . The figure also illustrates the interior and exterior of side .
A given polygon divides the plane into interior and exterior parts. Figure 1 shows the interior of the polygon (the rest of the plane is the exterior). For a given side S of , the infinite line obtained by extending side S divides the plane into the interior and exterior parts of the side. The interior part of S contains the interior of the polygon. Figure 1 shows the interior and exterior of side . The corridor of S is the infinite subregion on its exterior that is bounded by S and perpendicular lines through points of S. The corridors of the sides of are disjoint except for the corner points.
- Configuration and Local Convex Polygon
A configuration defines the positions of the robots in and their colors for any time . A configuration for a robot , , defines the positions of the robots in that are visible to (including ) and their colors, i.e., , at time t. The convex polygon formed by , , is local to since depends on the points that are visible to at time t. We sometimes write to denote , respectively.
- Corner Triangle, Corner Line Segment, Triangle Line Segment, and Corner Polygon
Let be a corner of a convex polygon . Let and be the neighboring corners of on the boundary of . Let be the points on sides and at distance and , respectively, from . We pick distance 1/8-th for our convenience; in fact, any factor less than or equal to works for our algorithm. We say that triangle is the corner triangle for , denoted as , and line segment is the triangle line segment for , denoted as . We say that the interior of except the corner triangles is the special polygon of , denoted . Let r be any robot inside and be the line segment parallel to passing through r. Let be the portion of between and . We say that is the corner line segment for , denoted as , if there is no robot inside . Let be the lines perpendicular to and , respectively, passing through their midpoints. We say the interior of divided by towards is the corner polygon of , denoted as . Figure 2 shows , , , , and a 5-corner convex polygon with corners .
Figure 2.
Example of corner triangle, corner line segment, triangle line segment, and corner polygon.
- Eligible Area and Eligible Line
Let be a corner of and let be the neighbors (sides or corners) of in the perimeter of , and let u, w be the midpoints of , , respectively. The eligible area for , denoted as , is a polygonal subregion inside within triangle , omitting the lines from each robot to []. The eligible areas for any two corners of are disjoint. is computed based on and the corresponding polygon . Figure 3 depicts eligible area for where the shaded area is . To make sure that all the robots in the interior of see when it moves to a point in , the points inside the outer boundary of that are part of the lines , connecting with all the robots in are not considered as the points of . When moves to any point inside , two prominent properties of the eligible area hold: (i) all the points in the sides and interior of can see (and vice versa), and (ii) remains as a corner of .
Figure 3.
Eligible area computation; the shaded area depicts .
Lemma 1
(Reference []). The eligible area for each corner of is bounded by a non-empty convex polygon. Moreover, when moves to a point inside , then remains as a corner of and all internal and side robots of are visible to (and vice versa).
It is easy to see that edges and are always in the perimeter of the polygonal subregion . Let be two points in and , respectively, that are also in the perimeter of . Points can be any point in and between and e and and f, respectively, where are the neighbor corners of in . We say line is the eligible line for and denote it by (Figure 3 illustrates these ideas).
Lemma 2.
The eligible line for each corner of contains no point outside of , except for the points intersecting lines from internal robots to .
Proof.
This lemma is immediate since the eligible area for each corner of is a non-empty convex polygon (Lemma 1); hence, any line connecting any two points on the perimeter of visits only the points that are in the interior of , except for intersections with lines from internal robots to . □
- Convex Polygons , , , and
is the convex polygon of the points in . is the convex polygon connecting the corners of after all of them moved to their eligible areas, . is the convex polygon with the corners of and the side robots of from those sides with at least two robots.
is the convex polygon after all side points in become corner points moving to the exterior of the side of to which they belong. Observe that contains and , but not . The left part of Figure 4 depicts , , , and the right part depicts formed from .
Figure 4.
Example of convex polygons , , , and .
3. Beacon-Directed Curve Positioning
The Beacon-Directed Curve Positioning framework uses robots that we call as beacons to define a curve and to guide other robots from their initial positions to final positions on the curve. The beacons start at their final positions on the curve, and all robots are robots with lights. Section 4 will use the Beacon-Directed Curve Positioning framework as a tool in constructing an time Complete Visibility algorithm.
The destination curve is a “k-point curve” (Definition 1) that the positions of the k points can specify, so the positions of the k beacons in the framework determine.
Definition 1.
Let be a finite interval in the real line. Let be a (single-valued) function in which its equation defines a curve on the plane. A k-point curve is a function f such that a set of k points suffices to determine the constants in the equation .
For example, the curve can be a straight line that function describes. Two points on this curve (line) enable one to determine constants a and c and so the line. As another example, the curve can be a semicircle that equation describes. Three points on this curve enable one to determine the constants and the curve. As another example, points can determine a th order polynomial. Note that this section uses a global coordinate system to describe the framework, but the framework works with robots that each have only a local coordinate system.
In most robot algorithms, the movement of a robot in the move portion of an LCM cycle is along a straight line. The Beacon-Directed Curve Positioning framework assumes monotonic movement but does not require straight-line movement. So, for this section, we define a path in an LCM cycle of robot as a finite curve from initial point to final point .
Let denote a k-point curve. Let denote a set of m robots with lights. The “curve positioning” goal of Beacon-Directed Curve Positioning for each at distinct initial point is to move to distinct final point on the k-point curve. We refer to robots in as “waiting robots” as they are waiting to move to the curve. The left beacons are robots , for , are initially on the curve at points with x-coordinates smaller than the x-coordinates of the final positions of all waiting robots. Similarly, right beacons are robots , for , are initially on the curve at points with x-coordinates larger than the x-coordinates of the final positions of all waiting robots. Figure 5 depicts these concepts.
Figure 5.
An illustration of Beacon-Directed Curve Positioning (BDCP). Red (resp., white) circles denote the initial (resp., final) positions of robots. Blue circles denote the beacons.
Definition 2.
Let be a k-point curve, and let be a set of waiting robots with paths from initial position to final position . Let , and be the sets of left and right beacons placed on f to the left and right of the robot set . Then, the triplet is admissible iff the following conditions hold. (a) For distinct , paths and do not intersect. (b) For distinct , any line through the initial position of intersects at, at most, one point. (c) For any i, a line through the initial position of intersects curve f (within its domain ) at exactly one point. (d) With all robots in at their initial positions, all beacons in are visible to each .
Definition 3.
The Beacon-Directed Curve Positioning Problem is defined as follows: Let be a k-point curve, let , and let be a set of k left and k right beacons on f such that is admissible. Let the initial color of each robot bewait, and let the beacons in be coloredbeacon. The objective is to move each robot to its final position on f and then change its color tobeacon.
The three condition-action pairs below present robot actions to solve the Beacon-Directed Curve Positioning Problem.
Condition 1:
Robot r has color wait, and it can see at least k robots with color beacon.
Action 1:
Robot r changes its color to not-waiting, determines the equation for the k-point curve, f, and moves monotonically on its path p to position itself on curve f.
Condition 2:
Robot r has color not-waiting.
Action 2:
Robot r changes its color to beacon.
Condition 3:
Robot r has color beacon, and it cannot see any robot colored wait.
Action 3:
Terminate.
Call as a transient robot any robot that is in motion along its path (between its initial and final positions); clearly, a transient robot was a waiting robot at the start of its cycle and is on its way to becoming a beacon at the end of its next cycle. Observe that, if a waiting robot cannot see some beacon, then there must be a transient robot that blocks its view.
We now establish conditions on the number of transient robots and the look times of waiting robots required to block the view of beacons from the waiting robots (Lemmas 3–6). Then, we will lower bound the increase in the number of beacons from one epoch to the next (Lemma 7) toward establishing an epoch run time for the Beacon-Directed Curve Positioning algorithm. In the remainder of this section, we will implicitly assume in all lemmas that admissibility is satisfied; we also consider any robot with color beacon or not-waiting as a beacon. Recall that all robot movements are monotonic.
For any robot , define the projection of on a k-point curve (denoted by ) as the x-coordinate, , of the final position of . For a beacon b, its projection on f is , the x-coordinate of its position. When applied to a set of robots, refers to the smallest interval within in which the projections of all elements of lie.
Lemma 3.
For left (resp., right) beacon b and waiting robot , if a transient robot u blocks b from , then (resp., .
Proof.
Recall that admissibility requires that paths not cross. Suppose b is a left beacon, then . If , then the paths of u and must cross (see Figure 6b), providing the necessary contradiction. The proof for a right beacon is analogous. □
Figure 6.
An illustration of the proofs of Lemmas 3 and 4: (a) illustrates no path crossing for the robots even when the transient robot u blocks the beacon b from and/or when they move, and (b,c) illustrate a path crossing scenario.
Lemma 4.
Let be a set of m waiting robots and let b be a left beacon with . For , let denote the time when performs its look operation. Let u be a transient robot that blocks the view of b from every waiting robot in the set . Then, for any distinct , if , then .
Proof.
Without loss of generality, let the x-axis be a horizontal line and let the projection of b be to the left of the projections of all elements of (see Figure 6a). Since u blocks b from all robots of , we must have , for all (Lemma 3). Suppose that and . Then, again, the paths of and will have to cross (see Figure 6c), providing the necessary contradiction. □
Remark 1.
An analogous version of the lemma applies to a right beacon, as well.
Lemma 5.
Let be a right beacon and let be a set of m waiting robots. For , let denote the time when performs its look operation. For any distinct , let and let . Then, a transient robot u can block the view of from at most one waiting robot from .
Proof.
Suppose there exist distinct such that a single transient robot u blocks right beacon from the view of both waiting robots . Then, must lie between and . Without loss of generality, let ; this implies that (from the lemma statement). By a result analogous to that of Lemma 4 applied to a right beacon , we have ; this provides the necessary contradiction so that u cannot block from the view of more than one waiting robot. □
Lemma 4 orders the “look-times” of waiting robots that are blocked from viewing a left beacon by a single transient robot. Given this order, Lemma 5 shows that each right beacon will have to be blocked by a different transient robot, for the same set of waiting robots. For left and right beacons and waiting robots , in order from left to right, observe that, at the time instant at which looks and transient robot u blocks b from , some transient w blocks from , and w cannot block the view of from when they look. The following result captures this observation.
Lemma 6.
Let be left and right beacons and let be a set of m waiting robots. Let u be a transient robot that blocks the view of b from every waiting robot in . Then, at least m transient robots are needed to block from the view of all waiting robots of .
Proof.
By Lemma 3, , for every . Without loss of generality, let , for any . Therefore, by Lemma 4, ; again, is the time when looks. For the right beacon , we have with . By Lemma 5, each transient robot v can block from at most one element of . Consequently, at least transient robots are needed to block from the view of all waiting robots of . □
Next, we lower bound the increase in the number of beacons in each epoch.
Lemma 7.
If the first epoch of the algorithm started with m waiting robots and an epoch starts with beacons, then epoch starts with at least beacons.
Proof.
The is only to capture the idea that we cannot have more robots on f than we start out with. Blocking two different beacons, from the view of a given waiting robot w requires at least two transient robots. Therefore, blocking at least beacons from any given waiting robot (so that it sees, at most, beacons and fails to move during the epoch) needs at least transient robots, so the next epoch begins with at least more beacons. Observe that this is independent of the location of the beacons on f.
Thus, the number of beacons at the start of epoch is at least for . □
Observe that . Therefore, from Lemma 7, in epochs, all initial waiting robots have been converted to beacons. This gives the following main result of this section. We use this result in Section 4 with and . For these cases, the number of epochs needed is, at most, 5 and 7, respectively.
Theorem 2.
The algorithm for the Beacon-Directed Curve Positioning Problem using a k-point curve runs on the robots with lights model in epochs, using 3 colors in the setting.
4. -Time Complete Visibility Algorithm
Our algorithm consists of three stages, Stages 0–2. In each stage, the robots make progress on converging toward a configuration where all the robots are in a convex hull (see Figure 7).
Figure 7.
The three stages (or phases) of the algorithm: (a) shows an initial linear configuration in Stage 0; (b) shows either the initial non-linear configuration or when the initial linear configuration in (a) is transformed to a non-linear configuration; (c) shows the configuration of robots at the end of Stage 1, in which all the robots are on the perimeter of a convex polygon; (d) shows how the sides robots of the convex polygon moving towards the exterior of the polygon in Stage 2 to become corners of a polygon; and finally (e) shows the final configuration in Stage 2 in which all robots are on the corners of a convex polygon solving Complete Visibility.
- Stage 0 (initialization) handles the case of a collinear initial configuration. The endpoint robots move a small distance perpendicular to the line, which ensures that, in the resulting configuration, not all robots are collinear. Figure 7a and Figure 8 depict a worst case scenario, where all robots are initially collinear. In an setting, this stage runs for one round []. In an setting, we show later that this stage runs in epochs.
Figure 8. Examples of initially linear configurations. - Stage 1 (interior depletion) moves all interior robots of to the sides of (Figure 7c). Stage 1 achieves this in five sub-stages, Stages 1.1–1.5, that work as follows.
- –
- Stage 1.1 starts as soon as the robots in reach a non-collinear configuration (Figure 9a). Stage 1 moves the corner robots of (Figure 9a) to make them corners of (Figure 9b).
Figure 9. The five sub-stages, Stages 1.1–1.5, of Stage 1: (a) starting configuration for Stage 1, and (b–f) after Stages 1.1–1.5, respectively. - –
- Stage 1.2 first computes the eligible lines for the corners of and then moves (at least) 4 interior robots of (all these robots have color start) to those eligible lines. Figure 9c illustrates this stage.
- –
- –
- Stage 1.4 moves the robots on the eligible lines to the sides of .
- –
Stage 1 starts as soon as the robots in reach to a non-collinear configuration (Figure 7b).In an setting, this stage runs for four rounds []. In an setting, we show later that each sub-stage runs on epochs and Stage 1 finishes in epochs.
At the initial configuration , all robots in have color start. Each robot works autonomously having only the information about . If is a line segment and , Stage 0 to a non-collinear . Stage 1 proceeds autonomously until all robots are colored either corner or side. This acts as the starting configuration for Stage 2, which proceeds autonomously until all robots have color corner for their lights. The algorithm then terminates.
The robots execute the stages sequentially one after another. One could use (only for brevity of this discussion) a different palette of colors for each stage (while keeping the number of colors used a constant). Thus, the algorithm can explicitly synchronize at the end of each stage, and our analysis can consider each stage separately. We will indicate on high level (for brevity) how robots collectively and consistently detect the end of each stage. Table 2 gives the transition of colors of the corner, side, and interior robots during the execution of the algorithm. Though robots are oblivious, the colors and configurations that the robots in assume synchronize execution of the stages (Table 3) so that robots execute stages (and sub-stages) sequentially one after another.
Table 2.
Color transitions of the robots during the execution of the algorithm. A color inside indicates that not all corners (sides or internals) may assume that color during the execution.
Table 3.
An illustration of how the colors of robots synchronize execution of the stages.
The algorithm uses 47 colors and runs for a total of epochs.
We showed in Sharma et al. [] that Stages 0, 1.1, 1.4, and 2 run for time and Stages 1.2, 1.3, and 1.5 run for time. We showed in Sharma et al. [] that Stages 1.2, 1.3, and 1.5 can be made to run in time. This improvement was achieved by satisfying the conditions of the Beacon-Directed Curve Positioning framework (Section 3) to run Stages 1.2, 1.3, 1.5, and 2 in time; Stage 2 does not require the Beacon-Directed Curve Positioning framework as it already runs in time without it, but the use of the Beacon-Directed Curve Positioning framework helps to streamline the presentation of the ideas. This provides the overall run time for the algorithm. For Stages 1.2, 1.3, and 1.5 that use the Beacon-Directed Curve Positioning framework to run in time, we first describe the run time ideas which are simpler to understand. The Beacon-Directed Curve Positioning framework requires each robot moving to a k-point curve to see the beacons that are on the curve in the beginning and all the robots that move to the curve (in addition to the beacons in the beginning) during the execution of the framework, if there is no robot currently in transit to the curve. This turned out to be particularly challenging for Stages 1.2 and 1.3, among the other conditions listed in Definition 2.
We managed to address this challenge by exploiting the eligible area of the corners of . Notice that all the points inside for each corner are visible to all the robots in the interior of (while they are not moving). Therefore, we first develop a technique to compute an eligible line for each corner of by the interior robots of . We then develop a technique to place (at least) four interior robots on an eligible line (note that is inside ), two as left beacons and two as right beacons (Definition 3). After that, we develop a technique to maintain the property that the interior robots always see (irrespective of the robots on ), and, when there is no transient robot, they see all the robots on . This idea also turned out to satisfy the remaining three conditions (Definition 2) of the Beacon-Directed Curve Positioning framework. Putting these ideas altogether achieves runtime for Stages 1.2 and 1.3. We then extend these techniques in the same spirit to run Stages 1.5 and 2 in time. We provide details of Stages 0–2 separately below and outline the major properties they satisfy.
5. Stage 0-Initialization
The goal of this stage is to transform a collinear initial configuration to a non-collinear . Initially at , all robots are stationary and have color start. Let C denote the condition that a robot x can see only one other robot y (for C to be true for x, all robots in must be collinear with x a robot at one end of the line). Otherwise, this stage is not needed since all the robots in are already on the corners, sides, and interior of a hull with (at least) three corners.
If C holds, x sets its color to start_moving and moves perpendicular to line for a small distance . Robot x then changes its color to ready when it becomes active next time. When at least one robot does this move, the configuration changes to a non-collinear configuration for (see Figure 8). The cases of can be treated separately as special cases. For , if the robots are not collinear after at least x (or y) moved once, we already have a polygon with three corners. However, if all three robots in are again collinear after are moved and colored ready, the middle robot z sets its color to ready and moves orthogonal to line for . Since are already colored ready, they do not make the perpendicular move again, and the move of z guarantees that the collinear configuration translates to a triangle configuration. When , the only robot x can simply terminate since it sees no other robot. If , one robot sees the light of other robot ready and figures out that there are only two robots in and terminates. This happens at the second (and final) round of the algorithm.
Lemma 8.
At the end of Stage 0, one of the following holds: (i) for , the only robot simply terminates with colorstart; (ii) for , both the robots terminate changing their color toreadyfromstart; (iii) for , all three robots are in the vertices of a triangle with colorready; and (iv) for , there exists a hull such that all robots in are in the corners, sides, and the interior of with color {start,ready}.
Theorem 3.
Stage 0 finishes in (at most) three epochs.
Proof.
For , it is immediate that the algorithm terminates in one epoch. For , any collinear configuration translates to a non-collinear configuration in the first epoch, since the two endpoint robots move orthogonal to the line segment in that epoch. For , the only two robots change their color to start_moving in the first epoch. In the second epoch, they again find themselves in a line and change their color to ready. In the third epoch, each realizes that the other is the only robot in the system and terminates. For , by the third epoch, the middle robot realizes that it is the only robot between two endpoint robots in the line segment and moves orthogonal to the line by setting its color to ready. Since the endpoint robots have color ready and do not move, this gives a non-collinear (triangle) configuration by the end of that epoch. □
6. Stage 1-Interior Depletion
The goal of this stage is to move the corner, side, and interior robots of to the corners and sides of . At the start of Stage 1, each robot is colored start or ready (Lemma 8). A robot with color ready is located at a corner of . A robot with color start is located at a corner or side or in the interior of . From Stage 0, we have that is not a line segment.
Let be the sets of robots at corners, sides, and the interior of , respectively. For a robot , if all other visible robots are within an angle of respectively), then is a corner (side, interior, respectively) robot. Stage 1 moves robots in all to corners and sides of and colors them as corner and side. Figure 9 illustrates Stage 1.
This stage needs four rounds in the setting []. In Round 1.1, all corners of become corners of with color corner, and the side robots of change their color to side1 without moving. In Round 1.2, all interior robots of (also interior in ) assume color transit moving closer to their closest corners in , and the robots with color side1 move to the closest sides of assuming color side. In Round 1.3, some transit colored robots become side robots of , and, by the end of Round 1.4, all transit colored robots become side robots of .
Stage 1 organizes into five sub-stages in the setting: Stage 1.1 translates Round 1.1, Stages 1.2, 1.3, and 1.5 translate Round 1.2, and Stage 1.4 translates Rounds 1.3 and 1.4 of the algorithm. Table 3 explains how robots explicitly synchronize stages (and sub-stages) so that a next stage begins only after the current stage finishes.
- Stage 1.1 is to move the corner robots of (Figure 9a) to the corners of (Figure 9b) so that all interior robots of see them (and vice versa). Each corner robot of first moves to some point inside the eligible area in the interior of and colors itself corner1. After that, each corner that has a robot in its corner triangle changes color to corner2. Otherwise, if an interior robot in present in , it changes color to corner3, while if no interior robot is present, it changes color to corner. The side robots of first color themselves side1, and some of them later change color to special.
- Stage 1.3 is to position all the robots that are inside to the corner and triangle line segments of the corners of . The robots change color to transit after they reach their respective (corner or triangle) line segments. Figure 9d shows how the robots inside in Figure 9c move to triangle and corner line segments.
- Stage 1.4 is to move the robots in the corner line segments and the triangle line segments to the sides of . Let r be a robot on the triangle line segment of a corner of (the case for r being on the corner line segment is analogous). Robot r moves to either or and takes color side2. Figure 9e shows how the transit robots in Figure 9d become sides of .
- Stage 1.5 is to make the side robots of and the side robots of . For this, if there is only one robot in a side of , it moves to the closest side in and takes color side. If there are at least two robots in a side of , then the side robots of move to the sides of and take color side. The robots with colors side1 and special also change their color to side. Figure 9f shows how the side robots of and in Figure 9e become side robots of . At the end of this stage, all the robots in are on the corners and sides of with corners colored corner and sides colored side.
In the following, we provide details of Stages 1.1–1.5 separately below and show that each stage runs for epochs each.
6.1. Stage 1.1-Making Corners of the Corners of
At the start of Stage 1.1, a corner of may have color ready or start. If a corner of becomes active and has color start, then it assumes color ready. The side robots of change their color to side1 from start.
Definition 4.
Let and be the counterclockwise and clockwise neighbors of a corner of in the boundary of . If there are no side robots in , then is ( is ).
After has color ready, if it sees both have color ready, side1, corner1}, then it assumes color ready_moving and moves to a point in . When becomes active next time, it is already in , and each robot in the sets sees it (Lemma 1). Corner then changes its color to corner1. After that, does not move in any future epochs (but it may assume new colors).
After all corners of move to their , they form . Any robot with color side1 changes its color to special when it becomes a corner (due to the moves of corners of ) and it sees at least one other robot with color side1 or special in the side of to which it belongs. If the robot with color side1 is the only robot in that side, then it retains color side1. The robot can easily identify this situation since it is in the corridor of the side of that is formed from the moves of the corners in the side of to which it belongs. For example, if is the only side robot in a side S of , then it sees no other robot in the corridor of S besides itself.
Lemma 9
(Reference []). The interior robots of remain as the interior robots of .
Lemma 10.
has the same number of corners as .
Proof.
A corner of moves to only after it sees both have color ready, side1, corner1}. Since the interior robots of do nothing, it only remains to show that side robots of remain in their original positions. This is immediate since, if and/or are side robots of , then they take color side1 before moves to . Moreover, after and/or take color side1, they do not move to their eligible areas even if they become corners of . The only possibility is that might change their color to special. □
Lemma 11.
The corners of become corners of and take colorcorner1in (at most) three epochs.
Proof.
All the robots in the sets and (corners and sides of , respectively) change their colors to ready and side1, respectively, in, at most, one epoch. All the corners in then move to their by the end of the next epoch with color ready_moving. By the end of the third epoch, the robots that moved to change their color to corner1. □
We now describe how the corners of change their colors from corner1 to corner2, corner3, or corner. For a corner with color corner1, we will define conditions to be satisfied on both adjacent sides that will depend on , its side , and the neighboring corner on that side and, likewise, , , and . Figure 10 shows (as ) and its neighboring sides and (as and ) as it moves from to .
Figure 10.
An illustration of how a corner of moves during Stage 1.1.
The following lemma deals with visibility of the neighboring corners.
Lemma 12.
Corner of sees both neighboring corners and .
Proof.
Since , , and were the endpoints of and of and now moved to their , the remaining side robots in and do not block the view of to see both and . This is because and and and are not in the sides and anymore, and the interior robots of remain as interior in (Lemma 9). □
Corner waits until and satisfy one of the conditions below for side and and satisfy a corresponding condition for side .
- (C1)
- If is corner , then has color ∈ {corner1, corner2, corner3, corner}.
- (C2)
- If is the only side robot on , then has color side1 and has color ∈ {corner1, corner2, corner3, corner}.
- (C3)
- If is one of multiple side robots on , then has color special and has color ∈ {corner1, corner2, corner3, corner}.
When the robots of both sides adjacent to satisfy the appropriate conditions, then takes a color changing action as follows. If at least one robot is inside corner triangle (defined with respect to ), then change color to corner2. Otherwise, if at least one robot is in the interior of , then change color to corner3, but, if no robot is in the interior of , change color to corner.
Lemma 13.
When Stage 1.1 finishes, all the corners of are colored corner2,corner3,corner}.
Proof.
If there is a corner of with color start, ready, ready_moving, then either condition or conditions and do not hold for at least one corner of with color corner1, and that corner cannot change its color to corner2, corner3, or corner. □
Lemma 14.
All corners of are colored corner2,corner3,corner} in (at most) one epoch after they are coloredcorner1.
Proof.
The proof is immediate since, after all corners of are colored corner1, either condition or both and hold for each corner of . □
The corollary below follows from Lemmas 11 and 14.
Corollary 1.
Stage 1.1 finishes in (at most) four epochs.
6.2. Stage 1.2: Positioning the Robots Inside Corner Triangles of the Corners of on the Corner Line Segments
Note that after Stage 1.1 finishes, the corner robots of have color corner2, corner3, or corner. The side robots of have color side1 or special. The interior robots of have color start. We first provide an high level overview of an algorithm that finishes Stage 1.2 in epochs and then provide details of an algorithm that runs Stage 1.2 in epochs.
The -epoch algorithm for Stage 1.2 works as follows. The goal is to move all the interior robots inside corner triangles to position them on the corner line segments . First, two robots are positioned on of each triangle sequentially, if no such two robots are already on . In fact, the robots that are closest to are chosen to perform those actions. Others remain stationary. Those robots that now moved to are colored differently to indicate that they are on that line segment. This can be done in epochs. After two robots are positioned on of each triangle and colored appropriately, the remaining robots start to move to . For a robot to move to , it has to correctly identify . For that, has to see (at least) two robots that are on . Therefore, in one epoch after two robots are positioned on , at least a robot moves to since it sees two robots on . In the next epoch, at least a robot moves to . This makes 4 robots on . Therefore, in the third epoch, at least two robots move to , making total 6 robots. Then, number of robots can move to in each subsequent round. Since there are n robots all internal robots may be inside a corner triangle, this whole process finishes in epochs. This approach was developed in our IPDPS’17 paper [].
We are now ready to describe -epoch algorithm for Stage 1.2 which we developed in our SSS’17 paper []. We execute Stage 1.2 in two sub-stages. In Stage 1.2.1, we compute eligible lines for the corners of . In Stage 1.2.2, we put (at least) four interior robots in each of those lines to serve as left and right beacons as required in the Beacon-Directed Curve Positioning framework of Section 3 to run Stage 1.3 in epochs.
6.2.1. Stage 1.2.1-Computing Eligible Lines for the Corners of
Let be a corner of colored corner2. If there are robots inside corner triangle , then pick the corner line segment ; otherwise, pick the triangle line segment . Denote this line as . We first put four interior robots of in (Figure 11a) and color them transit. This helps later to compute the eligible line for .
Figure 11.
An illustration of how the corner and interior robots of move during Stage 1.2.1.2: (a) four robots on line which is either a corner line segment or a triangle line segement ; (b) two robots from moving to a line parallel to towards corner ; (c) corner moving to on the intersection point of and ; (d) one orange robot moves to ; (e) corner robot now moves back to the corner; (f) another orange robot moves to ; (g) the orange robots on move away from each other making room for two robots on to move to it; and finally (h) fours robots are on .
Stage 1.2.1.1: Moving Four Interior Robots in to :
Let be the first robot to be activated among the interior robots after Stage 1.1 finishes. Suppose corner of is closest to . Robot sees and its neighbor corners and in (Lemma 1). Therefore, can find whether it is inside or not.
Suppose first that is inside . Let be the line parallel to passing through . If there is no robot in divided by towards , changes its color to transit. Notice that, in this case, is in fact the corner line segment . Let be the robot in closest to (w.r.t. the line parallel to ) and also closest to (among the corners of ). Robot changes its color to start_moving and moves to the intersection point w of and line . It then changes its color to transit when it becomes active next time. Until takes color transit, no other robot in moves toward because each robot in closer to sees at least a robot with color start or start_moving in the area divided by line (parallel to towards . Similarly as , two other robots can sequentially move to and take color transit. The remaining robots in do not move toward after four transit robots are in since either they see at least a robot with color start or start_moving toward from their position or four transit robots already on .
Suppose now that is not inside . It moves to at the intersection point of and assuming color start_moving and colors itself transit when it becomes active next time. The three other robots in closest to then move sequentially to as the previous paragraph discussed and color themselves transit.
Corner changes its color to corner21 after it sees (exactly) four robots on with color transit. This synchronizes it with the interior robots as they also do not move to after four robots are already on it. After takes color corner21, the robots in the set (with color start) that find closest among the corners of assume color internal (without moving). After all robots in take color internal, assumes color corner22 (changing from corner21). All this is possible because sees all the robots in (with color start), and vice versa (Lemma 1). The robots in the set , after taking color internal, wait until all corners of have color corner3, corner5, corner}. This is because they see all the corners of .
Observe that it is possible for some of the corners of to have fewer than four robots (or even no robot) on even after all robots in have color internal. Those corners change their color directly to corner5 from corner2.
Stage 1.2.1.2-Computing Eligible Lines for the Corners of : We describe how to compute for . Let be the four robots in of corner (Stage 1.2.1.1) with and between and , and being closer to , respectively (Figure 11a). We ask and to move to the lines and , respectively, assuming color transit_moving. Robots perform this move only when they have color transit and has color corner22. The position they move to in those lines is the 1/8-th point from to and , respectively. They then change their color to transit1 (Figure 11b). After sees both with color transit1, it computes and a point on (or on ) so that the line, say , parallel to passing through (or ) crosses . According to the construction, is parallel to , and also parallel to . Let on be the point so that crosses . Observe that is in fact the eligible line . Corner then moves to (the procedure for moving to point is analogous) assuming color corner22_moving (Figure 11c) and changes its color to corner23. Let be the position of before it moves to .
We now describe a technique to put all on (which is ) so that the interior robots of can recognize it as . Let be closer to than from the new position of (the case of being closer to than is analogous). Robot moves to the intersection point of and assuming color transit1_moving (Figure 11d) and then changes its color to transit2 when it becomes active next time. After sees colored transit2, it moves back to its previous position (where it was colored corner22) assuming color corner23_moving (Figure 11e). Although has no memory of , it can compute since is the intersection point of lines and . Robot then assumes corner24. After this, with color transit1 moves to the intersection point of and assuming color transit1_moving (Figure 11f). It then assumes color transit2.
Let be the current positions of , respectively. The robots and (after taking color transit2) move either left or right in to make room for robots and to move to without blocking any internal colored robots to see and also the robots on . Robot (and similarly ) moves as follows. Let be a line that connects with . Let be a line connecting with an internal colored robot r in the left or right of such that, in the cone area formed by and , there is no other internal colored robot. Let w be the intersection point of and . Robot moves to the midpoint m of the line segment that connects it with w (note that all three points , and m are in ) assuming color transit2_moving (Figure 11g). It then changes its color to eligible when it becomes active next time. After and see both and with color eligible, moves to point (the position of in before it moved to point m) and moves to (the position of in before it moved) (Figure 11h). Robots then assume color eligible. After sees all are on with color eligible, it assumes color corner3.
Lemma 15.
During Stage 1.2.1, four interior robots of inside the corner polygon are correctly placed on the eligible line of and coloredeligibleand the corners of are colored corner3,corner5,corner}. Stage 1.2.1 runs for epochs avoiding collisions and Stage 1.2.1 starts only after Stage 1.1 finishes.
Proof.
It is easy to see that, if the robot r in the interior of is not inside , it does not move to since r does not find closest to it among the corners of . We first show that four robots on correctly move to (which is or ) and then show that they are then correctly positioned on the eligible line .
To prove the first case, it is sufficient to show that an internal robot always sees its closest corner and two neighboring corners and of in during Stage 1.2.1. This will allow to correctly compute and move to it if it is closer to than any other interior robot of .
Notice that sees all the corners of in the beginning of Stage 1.2.1 as no robot has moved to lines or at that time. Let be the closest interior robots to corners , respectively. Let () be currently moving or have moved to (). We will show that do not block to see , respectively. Observe that, since () is currently moving to or has moved to (), that means () is closer to () than any other internal robot of . Moreover, according to the algorithm for Stage 1.2.1.1, except (), no other robot is currently moving to ().
Let be the line parallel to passing through . Define lines similarly. Note that, if () is moving to or has already moved to (), then no other robot with color start is inside the triangle divided by line () towards (). Moreover, since the corners have already moved to their eligible areas, a unique line connects every internal robot with these corners. Therefore, as and are moving toward different corners of , they do not block the view of to see corners and . Furthermore, no more than four robots will move to because the interior robot in that is closest to after four robots are in sees all the robots in and, hence, simply waits.
We now show that these four robots on are correctly positioned on . Note that sees all four robots on . Robot simply waits until four robots are on . After four robots are on , can wait for two of them to take color eligible. At this time, the two robots are on a line in the triangular area divided by line towards and the line is parallel to (Figure 11b). As now computes and moves to the point on one side (Figure 11c), the line parallel to going through must pass through . Now, since the four robots are arranged on two lines and with two robots on each of them, they provide the bearing to move to . After that, the color eligible of will provide the bearing for to move to .
The colors {corner3, corner5, corner} of the corners are immediate.
We now show that Stage 1.2.1 finishes in epochs. The four robots can move to in, at most, 8 epochs, i.e., a robot takes, at most, 2 epochs. In the first epoch, a robot moves to . In the next epoch, it changes its color to transit. After that, in one epoch, corner changes its color to corner21. The robots in then color themselves internal in one epoch. Each corner then colors itself corner22 or corner5 in one epoch. Therefore, Stage 1.2.1.1 finishes in, at most, 11 epochs. Similarly, since we are moving four robots on to , Stage 1.2.1.2 also needs epochs.
We now show that the execution of Stage 1.2.1 is collision-free. Note that the robots moving to two different corners do not collide since they are closer to those corners than others. The robots moving to in Stage 1.2.1.1 do not collide because the lines joining them with the corner intersect only at (and they do not reach ). For Stage 1.2.1.2, it is clear from the construction (see Figure 11) that the robots never share the same positions, and their paths do not cross.
Finally, since all the interior robots of see all the corners of , the interior robots do not start Stage 1.2.1 since they see at least a robot with color corner1 until all corners of are colored corner2, corner3, or corner. □
Lemma 16.
Let be a robot with colorinternalin the interior of . When Stage 1.2.1 finishes, sees and all foureligiblecolored robots in the eligible line .
Proof.
We have from Lemma 1 that, in the beginning of Stage 1.2, all interior robots of can see as is positioned at a point inside . Since all the interior robots of can see , a unique line joins with each interior robot of . Therefore, it is easy to see that two lines and joining with two interior robots of intersect only at .
In Stage 1.2.1.1, when four interior robots of move to , they move in their lines , , to reach ; hence, they do not block any other internal robot in to see (and vice versa). Note that we consider only the robots that are colored internal (or colored start in Stage 1.2.1.1). In Stage 1.2.1.2, when move to , move again in lines and and and move to the points of that are not on any line joining any interior robot (with color internal) with (note that has not yet moved to or of any corner of ). Therefore, all the interior robots (with color internal) see even after moved to .
We now show that all the interior robots of see all (in addition to ) after are positioned on . We have from Lemma 1 that any point inside is visible to all the interior robots (with color internal) of . Moreover, since is already in due to its move in Stage 1.1 and joins two points in the neighbor edges of in the perimeter of , the lines joining interior robots with intersect exactly at one point, and no two interior robots of are in any line of an interior robot . Therefore, are visible to all the interior robots of even after that are positioned on (and vice versa). Moreover, since are in , they are colored eligible. □
6.2.2. Stage 1.2.2: Positioning (at least) Four Interior Robots on the Eligible Lines of the Corners of
After computing the eligible line for a corner of in Stage 1.2.1, the goal in this stage is to see whether the four robots on with color eligible can serve as left and right beacons to apply the Beacon-Directed Curve Positioning framework of Section 3 to reposition the remaining interior robots of (with color internal) to the eligible lines in epochs. If those four robots are positioned such that all the interior robots of inside the corner polygon are within the cone area formed by lines , then these robots serve as left and right beacons and this stages finishes with changing its color to corner4. Otherwise, (at most) four robots inside move to in this stage so that two of them serve as left beacons and two of them serve as right beacons for the Beacon-Directed Curve Positioning framework. Figure 12 illustrates these ideas.
Figure 12.
An illustration of how the interior robots of move to the eligible lines during Stage 1.2.2.
The details are as follows. Let be the first robot with color internal to be activated after all the corners of are colored corner3, corner5, or corner with at least a corner colored corner3. Let be closest to corner of than any other corner of . Robot sees (Lemma 16) which has color corner3. Robot also sees both the neighboring corners of in and eligible colored robots that are on the eligible line of (Lemma 16).
Let be the cone area of formed by line and side of ; the left of Figure 12 shows the cone areas and of two internal robots and . for formed by lines and can be defined similarly; the left of Figure 12 also shows and of two internal robots and . If there is no other robot with color internal in (and/or ) that is closer to than , then moves to at the intersection point of and assuming color internal_moving. As depicted in the left of Figure 12, does not see any other robot closer to in and moves to . It then assumes color eligible when it becomes active next time.
Robot determines whether there is some other robot in the cone area (and/or ) that is closer to than itself as follows. Let be two lines perpendicular to and , respectively, passing through their midpoints, forming the convex polygon . If there is a robot with color internal in () divided by line () towards , then assumes that is closer to in ().
Note that always sees (Lemma 16). However, may not see or when there is another robot in that it currently transient to . Nevertheless, observe that the robots moving to and do not block the view of to see and . Therefore, decides to move to if and only if the first robot it sees in both the left and right of has color corner3, corner4, corner5, corner}. Finally, when sees two robots with color eligible in its cone area (and/or ), it does not move to (even if there is no other robot closer to in and/or than itself).
As soon as the corner sees (at least) four eligible robots in , it assumes color corner4 if the following holds. Let () be the second robot in from the either end of (Figure 12). Let be the cone area formed by lines and (the area between two thick dotted lines in the right of Figure 12). If all the robots with color internal inside the corner polygon lie within , assumes color corner4. The right of Figure 12 illustrates these ideas, where all the internal robots (shown as black) are within .
Lemma 17.
Let there be at least foureligiblecolored robots on . All the robots with colorinternalinside the corner polygon see and the robots on . Furthermore, sees all the robots on .
Proof.
The proof is to extend the argument of Lemma 16 for the robots that move to during Stage 1.2.2. We have from Lemma 16 that the points on are visible to all the interior robots of . Moreover, since any interior robot moves to following the line joining with , it does not block the visibility of to see the robots inside . Moreover, sees all the robots on since there is no other robot in the interior of divided by towards . □
Observe that it is possible for some corner of to not have (at least) four eligible robots in even after all the robots inside moved to . In this case, assumes color corner5 (directly from corner3). Observe also that there can be, at most, eight robots on before any corner changes its color to corner4 since all four robots that are positioned on in Stage 1.2.1.2 are such that they are positioned within and four new robots inside need to be moved to so that there will be two robots to act as left beacons and two robots to act as right beacons on . This configuration is needed for an admissible configuration for Stage 1.3.
Lemma 18.
During Stage 1.2.2, (at least) four internal robots of are positioned on the eligible lines and coloredeligible. Stage 1.2.2 runs for epochs avoiding collisions and Stage 1.2.2 starts only after Stage 1.2.1 finishes.
Proof.
We have from Lemma 16 that, when Stage 1.2.1 finishes, any robot with color internal in the interior of sees and all four eligible colored robots on . Robot also sees and if no robot is currently in transit to (irrespective of the interior robots in transit to and ). Note that only the robots inside move to since, otherwise, they will be closest to some other corner of than . Therefore, any robot inside can see all if no robot inside is currently in transit to (Lemma 17). Therefore, can compute the cone areas and . Moreover, since sees all , it can find whether there is some robot inside cone and/or . Therefore, can correctly move to .
We now show that Stage 1.2.2 runs for epochs. Note that since four robots are already on due to the execution in Stage 1.2.1, at most, four new robots move to at Stage 1.2.2. A robot can move to in two epochs; hence, it needs eight rounds to put four new robots on . After that, the corner can color itself corner4 in one epoch.
The execution is collision-free since the robots moving to different eligible lines do not collide. Moreover, the robots moving to the same eligible line also do not collide since the straight lines (joining them with ) they follow to reach do not intersect before .
Finally, Stage 1.2.2 starts only after Stage 1.2.1 finishes because the robots in the interior of with color internal see at least a corner with color corner3, corner5, corner} during Stage 1.2.1. □
6.3. Stage 1.3-Positioning the Remaining Internal Robots of on the Eligible Lines
In the beginning of Stage 1.3, all corners of have color corner4, corner5, corner} with at least a corner colored corner4 (otherwise, there is no interior robot with color internal in ).
Using the -epoch approach developed in IPDPS’17 [], all interior robots of that are on the corner line segments have color eligible and the rest have color internal. The goal is to move the internal colored robots to position themselves on the corner line segments. This is done as follows: Each robot colored internal find the closest corner of . It then moves toward that corner to be positioned on the corner line segment if it sees at least twp robots that are positioned on that corner line segment with color eligible. The -epoch argument for this approach is in the lines of the argument we provided in Stage 1.2.
We now describe the -epoch approach developed in SSS’17 []. At the end of Stage 1.2, all interior robots of that are on the eligible lines have color eligible and the rest have color internal. Let be a corner of colored corner4, and let r be a robot with color internal that is inside the corner polygon . Note that r is closer to than other corners of and it always sees (Lemma 16). Robot r moves as follows.
Condition 1.3.1:
Robot r has color internal and it can see at least two eligible colored robots towards .
Action 1.3.1:
Let be the line formed by those eligible robots. Robot r assumes color internal_moving and moves to the intersection point w of lines and .
Condition 1.3.2:
Robot r has color internal_moving.
Action 1.3.2:
Robot r assumes color eligible.
As soon as does not see any robot with color internal or internal_moving (i.e., all robots in the interior of are placed in the eligible lines), it assumes color corner5. We can prove the following two lemmas.
Lemma 19.
During Stage 1.3, theeligiblecolored robots positioned on of a corner of are seen by all theinternalcolored robots inside (and vice versa), if there is no transient robot towards .
Proof.
We have from Lemmas 16 and 17 that the robots inside see all the robots on at the end of Stage 1.2. The direct extension of those lemmas shows that, if a robot inside moves to , it will also be visible to the remaining robots inside waiting to move to . Therefore, if some interior robot inside does not see any robot on , then there must be some robot that is blocking the view of from . Since the interior robots do not block the view while they are waiting to move to , there must be a robot currently in transit to . □
Lemma 20.
During Stage 1.3, all the robots in the interior of (with colorinternal) are correctly positioned on the eligible lines of the corners of and coloredeligible. Moreover, the corners of are coloredcorner5. Furthermore, Stage 1.3 runs for epochs avoiding collisions and Stage 1.3 starts only after Stage 1.2.2 finishes.
Proof.
The idea is to show that the configuration at the end of Stage 1.2 satisfies all the conditions of Definition 2 to apply the Beacon-Directed Curve Positioning framework of Section 3 to run this stage in epochs. We have that the final positions of the robots inside on the eligible line (a 2-point curve) are in the positions enclosed within the cone area and two eligible robots (that serve as left beacons) are in the left of and two eligible robots (that serve as right beacons) are in the right of . We argue that all four conditions of Definition 2 are satisfied in Stage 1.3. Condition (a) is satisfied since the paths of two different robots in the interior of do not intersect while moving to . Condition (b) is also satisfied since the robots move in straight lines joining them with . Condition (c) is satisfied since the paths intersect at one point. Finally, Condition (d) is also satisfied since all four beacons are visible to each robot in their initial positions (Lemma 17). Therefore, due to Theorem 2, Stage 3 runs in epochs.
The execution is collision-free since the paths of any two robots do not intersect and they do not land up in the same position in .
Finally, Stage 1.3 starts only after Stage 1.2 finishes because the remaining robots in the interior of do not see colored corner4 until Stage 1.2 finishes. □
6.4. Stage 1.4-Positioning the Robots on the Eligible Line to the Sides of
Let r be a robot on the corner line segment or the triangle line segment . Note that, if there are robots in , then there are no robots in (and vice versa). Therefore, for simplicity, we denote by both the corner and triangle line segments of . The goal is to move r to a position on side or of between points and () or and (). At the end of Stage 1.4, all the transit colored robots are on the sides of with color side2. To move robots on to or , each robot on should be able to recognize sides and of .
Let and be the points in sides and at distance and from and , respectively. It is easy to show that each robot on sees all robots that are positioned on and between points and and and . Therefore, we first move two robots on (i) and to and (ii) and to and color them side2. After that, all robots in can move to or . Figure 13 illustrates the ideas of this stage.
Figure 13.
An illustration of how robots on move to the sides of in Stage 1.4
Lemma 21.
Let α be the robot on and β be the robot on that are closest to side among the robots in and , respectively. At least one of sees both and .
Proof.
Robot can see as it is closest to , and no robots are in the triangle . Similarly, can see . If can also see , then the lemma is satisfied. Otherwise, a robot on blocks the view. In that case, , at the end of , can see as its line of sight passes between and , and the lemma is satisfied. □
Suppose sees both and (the case of seeing , is analogous). Robot assumes color transit_moving and moves to the point at distance from in . Then, changes its color to side2. Repeat this process so that one more robot places itself at point at distance from in . This robot will be unless the next robot on after determines that cannot see , and then will be .
Lemma 22.
Each robot on sees the robots with colorside2placed at points ρ and ϱ of side . Moreover, they see two robots placed at points and on defined analogously to ρ and ϱ.
Proof.
As noted above, each robot on sees all robots that are positioned on and between points and and and . Robots at , , , and are in these ranges. □
Robot r in , after seeing two side2 colored robots each in and , moves as follows. Let L and be the lines perpendicular to and passing through r, respectively. Robot r assumes color transit_moving and moves to the intersection point w of and L or of and L, whichever is closest to it. When r becomes active next, it changes it color to side2 from transit_moving.
Lemma 23.
The robots in the corner and/or triangle line segments of move to the sides of and assume colorside2in epochs. Furthermore, Stage 1.4 starts only after Stage 1.3 finishes.
Proof.
The movement to a side of is an instance of Beacon-Directed Curve Positioning. Robots move to points and on each side of and take color side2 in, at most, four epochs. The remaining robots on corner line segments or triangle line segments move to a side of and take color side2 in two more epochs.
Finally, Stage 1.4 starts only after this stage finishes since the eligible colored robots on the eligible lines see at least a robot with color internal or internal_moving until Stage 1.3 finishes. The corners can change their color to corner5 since they do not see any robot with color internal or internal_moving after all robots in the interior of moved to the eligible lines of the corners of . □
6.5. Stage 1.5-Making Side Robots of the Side Robots of
Let S be a side of with its endpoints. There is a side in with its endpoints and all the side robots in S are in the corridor of with color either side1 or special. The robots that become side robots in Stage 1.4 are on with color side2. Stage 1.5 is for the side robots on . Stage 1.5 starts for the side robots on when they do not see any other robot with color except corner, side2, side1, special.
We assume in the description below that there are at least two side robots on S and at least a side robot on . The cases of number of robots on S and not satisfying this assumption can be treated as special cases and can be executed in a constant number of epochs. Let be the side robots on S with being closer to . Robots have color special and the others have side1. Since are endpoints of , divide S into three sides , where , , and . Let be the lines perpendicular to passing through , respectively. Let be the intersection points of and , respectively. Points divide into three segments , where , , and . Figure 14 illustrates these ideas.
Figure 14.
Example configuration of side of P and side of for Stage 1.5.
Recall that Stage 1.5 moves the robots on , , and with color side2 to , , and , respectively, and colors them side.
We run two sub-stages, Stage 1.5.1 and Stage 1.5.2, one after another. In Stage 1.5.1, the robots in move to , respectively. In Stage 1.5.2, the robots in move to . Stages 1.5.1 and 1.5.2 synchronize by changing the colors of from special to temp_corner. In both the sub-stages, the idea is to satisfy the conditions for the Beacon-Directed Curve Positioning we developed in SSS’17 to run Stage 1.5 in epochs. The technique we used in IPDPS’17 initially moves a robot in the first and second epochs, two robots in the third epoch, and in each subsequent epoch giving overall epochs runtime for each sub-stage of Stage 1.5, in the similar spirit of the argument of this approach we outlined in Stage 1.2.
Observation 1.
During Stage 1.5.1, the robots in segment see both and with colorspecial.
6.5.1. Stage 1.5.1-Moving Robots on Segments to
We discuss here how robots on move to (the case of robots on moving to is analogous). Our goal is to satisfy the conditions for the framework of Section 3 to run this stage in epochs. In Sharma et al. [], this stage runs in epochs. Therefore, we first move four robots from to perpendicular to and color them side. To make sure that they serve as left and right beacons for the robots on , we move two robots in closer to and two robots on closer to to .
We first provide details on how we move four robots on to . Let be the robot adjacent to in . Robot knows , as it sees both and . Let be a line perpendicular to passing through . Robot assumes color side2_moving and moves to the intersection point of and . Robot then assumes color side when it becomes active next time. There are now three robots in . The other robots on simply wait facilitating the sequential repositioning since they see a robot moving from to . Robot on that sees three robots on is then moved to similarly as . After completes its move and assumes color side, there will be four robots on . We then move similarly the two robots on closer to point to sequentially. After there are four robots on , the robots on that see at least three robots of (with color side or special or corner) move to . That is, the robots with color side, special, and corner act as left and right beacons for the robots on side with color side2. They move assuming color side3_moving and change that color to side when they become active next time. Robots on can determine that they can move to when they see (at least) three robots of since they either (i) see more than six robots of or (ii) if they see fewer than six robots, then there must be (at least) a robot with color side3_moving they see and this indicates that they can move. Moreover, the color side3_moving is not used in any other stage.
Since the robots on are moving to simultaneously with the robots on moving to , we have to be careful that the robots of () do not move to (). That is, we have to guarantee that the robots on do not mistake as . This is needed for the collision-guarantee of the algorithm. We guarantee this as follows. Let X denote the set of robots with color that the robot s on sees when it becomes active. The robots in X may be of or or both. Though () is a 2-point curve, observe that a special colored robot is at one end and a corner colored robot is at the other end also acting as beacons. Let ; otherwise, s does not move. Let denote the line formed by at least three robots in X. Let denote the robots of X that do not belong to . Let denote the line formed by the robots in .
Let L denote the line through s perpendicular to . Robot s moves to if and only if either of the following two conditions is satisfied.
- (i)
- Not all robots on are in the same side of L. That is, there is at least one robot of on the left and at least one robot of on the right from the point x on where L intersects . This is because the robots in will always be on only one side of point x.
- (ii)
- If all the robots on are in the one side of L, then there is at least one robot r with color side3_moving that s sees in the other side of L (not necessarily on line ). Moreover, robot r is closer to L than any robot that is on line (w.r.t. the perpendicular distance from the robot on to L). If these conditions hold for r, then r must be either a robot of (that is already on or on its way to ) or the robot is at .
Robots and assume color temp_corner as soon as all the robots on and reach to and , respectively, and take color side. Observe that () sees the robots on () and the robots on () except ().
Lemma 24.
During Stage 1.5.1, all the robots on and move to and , respectively, and take colorside. Moreover, Stage 1.5.1 runs for epochs avoiding collisions, and Stage 1.5.1 starts only after Stage 1.4 finishes.
Proof.
We prove this lemma for the robots on moving to (the proof for the robots on moving to is analogous). Until four robots are on , the robots on move sequentially one after another to position themselves on . Moreover, as they move perpendicular to , they do not land on or . After four robots are on , we show that the robots on satisfy all the conditions of the Beacon-Directed Curve Positioning framework. Condition (a) is satisfied as the robots on always move perpendicular to to position themselves on . Conditions (b) and (c) are also satisfied due to the perpendicular moves of the robots on . Condition (d) is also satisfied as is a line segment and all the waiting robots on are between two left and two right beacons with color side, and the waiting robots on have color side2. Therefore, through Theorem 2, all the robots on move to in epochs.
We now show that the execution of Stage 1.5.1 is collision-free. This is immediate as in the beginning of Stage 1.5.1, no side robots are on or . Moreover, the robots on are in distinct positions, and they always move perpendicularly to . Therefore, the robots moving from to do not collide. Furthermore, as robots on do not move to (and vice versa), the robots from and do not collide.
Finally, Stage 1.5.1 starts only when side robots see other robots with colors only in {corner, side2, side1, special}. □
6.5.2. Stage 1.5.2-Moving Robots on Segment to
The robots on do not move during Stage 1.5.1. In Stage 1.5.2, similarly to Stage 1.5.1, two robots each on closer to and move to sequentially and take color side3. After that, the robots of that see at least two side3 robots move perpendicularly to to the line formed by those (at least) two side3 robots, assuming color side2_moving. The robots of after moving to take color side3 when they next become active. It is easy to prove that is in fact . After all robots on move to , the side robots on take color side and the endpoint robots of take color corner. As may already contain side robots (which are, in fact, the side robots of ), when the robots on move, they may end up in the positions of that other robots already occupy. In this case, the robot moving from to finds the first position that is free to the left or right of the point m on at which a line L passing through the robot and perpendicular to intersects . This guarantees collision freedom. Therefore, we have the following lemma.
Lemma 25.
During Stage 1.5.2, all the side robots on move to and take colorside, and the endpoint robots on take colorcorner. Moreover, Stage 1.5.2 runs for epochs avoiding collisions, and Stage 1.5.2 starts only after Stage 1.5.1 finishes.
Proof.
The proof of robots in moving to is similar to Lemma 24.
Stage 1.5.2 starts only after Stage 1.5.1 finishes as the robots on see the colors of both and as special until all the robots on and move to and , respectively. □
Lemmas 24 and 25 provide the following corollary.
Corollary 2.
The side robots of become the side robots of and take colorsidein epochs.
6.6. Correctness, Collision-freedom, and Runtime for Stage 1
The correctness and collision-freedom follow similarly as in Sharma et al. [] and the runtime follows combining Corollary 1, Lemmas 15, 18, 20, 23, and Corollary 2.
Theorem 4.
Stage 1 executes in epochs avoiding collisions and uses colors.
7. Stage 2-Edge Depletion
After Stage 1.5 finishes, all robots in are on the sides and corners of colored side and corner, respectively. The objective of Stage 2 is to move all side robots of to corners of using the Beacon-Directed Curve Positioning framework (see Figure 7d,e). The algorithm achieves this by working independently on each side of , placing all side robots of S on an arc of a circle (that is, a 3-point curve) in the corridor of S that traverses the end points of S; call this circle a safe circle and denote it by . Clearly, this ensures that no three side points of S are collinear. The algorithm further guarantees that is convex, thus ensuring complete visibility. Note that the technique we developed in IPDPS’17 [] also runs Stage 2 in epochs without using the Beacon-Directed Curve Positioning framework; however, the use of the Beacon-Directed Curve Positioning framework streamlines the discussion as it was used in Stages 1.2, 1.3, and 1.5.
Definition 5
(Reference []). Let be points such that (a) are collinear with w between v and x, (b) are not collinear with line segment , and (c) lie on the same side of such that line segments and do not intersect. Let (non-reflex) angles be and . Let and . Let (resp., ) be the line traversing point v (resp., x) such that it forms an angle (resp., ) with . The point of intersection h of is called the “safe apex” of w w.r.t. and the triangle is called the “safe area” of (Figure 15).
Figure 15.
An illustration of safe apex and safe area.
Stage 2 has six stages (see Figure 16). We describe the effect of these stages; Sharma et al. [] established the correctness and collision-freedom of Stage 2 itself. Initially each side has robots of color side and corner. In Stage 2.1 (the first sub-stage of Stage 2), the two extremal side robots (next to corners and ) move into the safe area of side S and become “scouts” and with color scout1 (Figure 16(1)). In Stage 2.2, each scout, or , determines the circle or that traverses points or , respectively.
Figure 16.
Stage 2 sub-stages. Part (i) shows the configuration of a side at the end of the th sub-stage or the beginning of the th sub-stage. The figure shows corners, side robots, scouts, and beacons as black, red, green, and blue circles.
The scout with the lower radius circle moves to the other circle and both scouts now become “beacons” with color beacon (Figure 16(2)). The safe circle of side S (denoted by ) passes through both beacons and and the corners . In Stage 2.3, the next pair of extremal points uses the corners and the two beacons to position themselves on as two more beacons and with color beacon (Figure 16(3)). Stage 2.4 similarly adds the third pair of beacons and to with color beacon (Figure 16(4)). At this point, serves as a 3-point function, and the side robots execute the Beacon-Directed Curve Positioning algorithm. Therefore, in Stage 2.5, all remaining side points, move to (Figure 16(5)). When no points remain in the interior of the polygon with color side, the beacons color themselves as corners in Stage 2.6 and the algorithm terminates (Figure 16(6)).
During Stage 2, each robot can unambiguously determine with which side S it is associated. This allows us to consider each side in isolation. We show below that this stage satisfies all the conditions required to apply the Beacon-Directed Curve Positioning framework, so it runs in epochs.
Lemma 26.
During Stage 2, all the side robots of become corners of and take colorcorner. Stage 2 starts only after Stage 1.5.2 finishes. Moreover, Stage 2 runs for epochs avoiding collisions and then the algorithm terminates.
Proof.
Stages 2.1–2.4 run in epochs since only, at most, two robots are moving in these stages. Stage 2.6 also runs in epochs as no robots move in this stage and only color computation is needed.
Therefore, it remains to show that Stage 2.5 runs in epochs, even by robots, using the Beacon-Directed Curve Positioning framework. Observe that side S of has side robots. Moreover, due to the moves of the side robots of S in Stages 2.1-2.4, six beacons are already on the safe circle, .
We now argue that Stage 2.5 satisfies all the conditions required to apply the Beacon-Directed Curve Positioning technique. We first show that the waiting robots on S that are yet to move to satisfy all the conditions for an admissible configuration (Definition 2). Condition (a) is satisfied as the robots in S always move perpendicularly to S to positions on . Condition (b) is also satisfied due to their perpendicular moves. Condition (c) is satisfied as the path of any robot on S perpendicular to S intersects at exactly one point, as is a circle that passes through the beacons and and the corners and . Condition (d) is also satisfied as all the waiting robots are on a line S and passes through the corners and in the corridor of S. Furthermore, all the waiting robots on S are between the three left beacons and three right beacons with color beacon and the waiting robots on S have color side. Therefore, from Theorem 2, Stage 2.5 finishes in epochs as due to our use of as a curve for the final positions of the robots on S. Thus, Stage 2 runs for epochs. The collision-freedom in the execution of Stage 2 is immediate as the robots move perpendicularly to S. We also observe that side robots can distinguish the interior of the polygon from the outside; hence, each side S can proceed independently.
Stage 2 starts only after Stage 1.5.2 finishes as, otherwise, the robots on the sides of with color side see at least a robot with color that is not side or corner.
The algorithm terminates after Stage 2 as all the robots have color corner after Stage 2.5 finishes and that signifies that all the robots in are on the corners of a hull , solving Complete Visibility. □
Theorem 5.
Stage 2 executes in epochs avoiding collisions and uses 6 colors (2 colors are of Stage 1).
Proof of Theorem 1.
We have the runtime of Theorem 1 in the setting combining the results of Theorems 3–5. We have the number of colors bound of Theorem 1 counting the colors listed in Table 2, which totals 47 different colors. □
8. Concluding Remarks
We have presented, to our knowledge, the first asymptotically optimal, -time algorithm for Complete Visibility for point robots with lights using colors in the asynchronous setting with monotonic robot movements in a 2-dimensional real plane. The best previous results for this problem were time in the fully synchronous setting and time for the semi-synchronous setting, both using colors. The result of this paper significantly improves on these existing results through new techniques as the asynchronous setting is the weakest and fully synchronous setting is the strongest among the three settings, fully synchronous, semi-synchronous, and asynchronous.
The Complete Visibility problem is fundamental with application in solving other problems under obstructed visibility. For example, the solution presented in this paper already played a crucial role in solving the pattern formation problem considered in Reference [], where the solution was used in the first step of the four-step pattern formation algorithm. The benefit was that since the algorithm presented here arranges robots on the corners of a convex hull, we were able to exploit the knowledge of N obtained after Complete Visibility is solved to plan for how to run steps 2–4 of the pattern formation algorithm of [].
Several questions remain open. The open questions can be categorized depending on the focus on number of colors, runtime, color/runtime trade-off, and nature of a solution. We discuss open problems in each categories below. Regarding the number of colors, a major open question is to design a 2-color algorithm (ignoring runtime) that works in the asynchronous setting even when robots have non-monotonic movements. Non-monotonic movements meaning that robots may stop before reaching the destination point or change direction before reaching the destination. The existing solutions in this direction provide a 2-color algorithm only in the case of monotonic movements in the asynchronous setting. The same can be done for the case of fat robots and design a color-optimal algorithm.
Regarding runtime, a major open question is to design a provably-efficient runtime algorithm in the asynchronous setting with non-monotonic movements. Our result in this paper only provides runtime with monotonic movements. First, of all, it would be interesting to see whether the algorithm of this paper can be extended to establish runtime algorithm, where D is the diameter of the initial configuration and is the minimum distance a robot travels in each move operation. cannot be zero since, otherwise, the problem may not simply be solved. After that, it would be interesting to see whether the bound can be improved.
Regarding trade-off, a major open question is to minimize the number of colors from current 60 to say 30 (the best possible is 2) without impacting runtime. Can we do better if we could have two lights on a robot so that it can have information on two colors for the two lights than just a single color for the single light?
Regarding nature of a solution, a major open question is to solve Complete Visibility without robots needing to be arranged on the corners of a convex hull. Can the runtime of can be achieved for such non-convex hull solution? What about the number of colors? What about handling non-monotonic movements? This aspect can also be considered for fat robots.
Furthermore, can the fault-tolerant algorithms be designed for Complete Visibility? There are some algorithms that handle faults in certain cases, but this direction calls for systematic effort to deal with faults under different settings. All the aforementioned aspects can be considered for robots working on a grid setting, as well.
Finally, are there other algorithms and problems that can benefit from the Beacon-Directed Curve Positioning framework the we developed in this paper?
Author Contributions
Conceptualization, G.S.; methodology, G.S. and R.V.; validation, G.S., R.V. and J.L.T.; formal analysis, G.S., R.V. and J.L.T.; investigation, G.S.; resources, R.V. and J.L.T.; writing–original draft preparation, G.S. and R.V.; writing–review and editing, J.L.T.; visualization, G.S. and R.V.; supervision, J.L.T.; project administration, R.V.; funding acquisition, G.S. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Flocchini, P.; Prencipe, G.; Santoro, N. Distributed Computing by Oblivious Mobile Robots. Synth. Lect. Distrib. Comput. Theory 2012, 3, 1–185. [Google Scholar] [CrossRef]
- Das, S.; Flocchini, P.; Prencipe, G.; Santoro, N.; Yamashita, M. Autonomous mobile robots with lights. Theor. Comput. Sci. 2016, 609, 171–184. [Google Scholar] [CrossRef]
- Peleg, D. Distributed Coordination Algorithms for Mobile Robot Swarms: New Directions and Challenges. In International Workshop on Distributed Computing; Springer: Berlin/Heidelberg, Germany, 2005; pp. 1–12. [Google Scholar]
- Vaidyanathan, R.; Sharma, G.; Trahan, J.L. On Fast Pattern Formation by Autonomous Robots. Available online: https://www.sciencedirect.com/science/article/abs/pii/S0890540121000146 (accessed on 18 January 2021).
- Di Luna, G.A.; Flocchini, P.; Chaudhuri, S.G.; Santoro, N.; Viglietta, G. Robots with Lights: Overcoming Obstructed Visibility Without Colliding. In Symposium on Self-Stabilizing Systems; Springer: Berlin/Heidelberg, Germany, 2014; pp. 150–164. [Google Scholar]
- Di Luna, G.A.; Flocchini, P.; Chaudhuri, S.G.; Poloni, F.; Santoro, N.; Viglietta, G. Mutual visibility by luminous robots without collisions. Inf. Comput. 2017, 254 Pt 3, 392–418. [Google Scholar] [CrossRef]
- Sharma, G.; Busch, C.; Mukhopadhyay, S. Mutual Visibility with an Optimal Number of Colors. In International Symposium on Algorithms and Experiments for Wireless Sensor Networks; Springer: Berlin/Heidelberg, Germany, 2015; pp. 196–210. [Google Scholar]
- Vaidyanathan, R.; Busch, C.; Trahan, J.L.; Sharma, G.; Rai, S. Logarithmic-Time Complete Visibility for Robots with Lights. In Proceedings of the 2015 IEEE International Parallel and Distributed Processing Symposium, Hyderabad, India, 25–29 May 2017; pp. 375–384. [Google Scholar]
- Sharma, G.; Vaidyanathan, R.; Trahan, J.L.; Busch, C.; Rai, S. Complete Visibility for Robots with Lights in O(1) Time. In International Symposium on Stabilization, Safety, and Security of Distributed Systems; Springer: Berlin/Heidelberg, Germany, 2016; pp. 327–345. [Google Scholar]
- Agathangelou, C.; Georgiou, C.; Mavronicolas, M. A Distributed Algorithm for Gathering Many Fat Mobile Robots in the Plane. In Proceedings of the 2013 ACM Symposium on Principles of Distributed Computing, Montreal, QC, Canada, 22–24 July 2013; pp. 250–259. [Google Scholar]
- Sharma, G.; Alsaedi, R.; Busch, C.; Mukhopadhyay, S. The Complete Visibility Problem for Fat Robots with Lights. In Proceedings of the 19th International Conference on Distributed Computing and Networking, Varanasi, India, 4–7 January 2018; pp. 21:1–21:4. [Google Scholar]
- Sharma, G.; Busch, C.; Mukhopadhyay, S. Complete Visibility for Oblivious Robots in O(N) Time. In Proceedings of the Networked Systems-6th International Conference, NETYS 2018, Essaouira, Morocco, 9–11 May 2018; pp. 67–84. [Google Scholar]
- Sharma, G.; Vaidyanathan, R.; Trahan, J.L.; Busch, C.; Rai, S. Logarithmic-Time Complete Visibility for Asynchronous Robots with Lights. In Proceedings of the 2015 IEEE International Parallel and Distributed Processing Symposium, Hyderabad, India, 25–29 May 2017; pp. 513–522. [Google Scholar]
- Sharma, G.; Vaidyanathan, R.; Trahan, J.L. Constant-Time Complete Visibility for Asynchronous Robots with Lights. In International Symposium on Stabilization, Safety, and Security of Distributed Systems; Springer: Berlin/Heidelberg, Germany, 2017; pp. 265–281. [Google Scholar]
- Di Luna, G.A.; Flocchini, P.; Poloni, F.; Santoro, N.; Viglietta, G. The Mutual Visibility Problem for Oblivious Robots. In Proceedings of the Canadian Conference on Computational Geometry, Halifax, NS, Canada, 11–13 August 2014; pp. 348–354. [Google Scholar]
- Aljohani, A.; Sharma, G. Complete Visibility for Mobile Robots with Lights Tolerating Faults. Int. J. Netw. Comput. 2018, 8, 32–52. [Google Scholar] [CrossRef][Green Version]
- Poudel, P.; Aljohani, A.; Sharma, G. Fault-tolerant complete visibility for asynchronous robots with lights under one-axis agreement. Theor. Comput. Sci. 2021, 850, 116–134. [Google Scholar] [CrossRef]
- Bhagat, S.; Chaudhuri, S.G.; Mukhopadhyaya, K. Formation of General Position by Asynchronous Mobile Robots Under One-Axis Agreement. In International Workshop on Algorithms and Computation; Springer: Berlin/Heidelberg, Germany, 2016; pp. 80–91. [Google Scholar]
- Czyzowicz, J.; Gasieniec, L.; Pelc, A. Gathering Few Fat Mobile Robots in the Plane. Theor. Comput. Sci. 2009, 410, 481–499. [Google Scholar] [CrossRef]
- Adhikary, R.; Bose, K.; Kundu, M.K.; Sau, B. Mutual Visibility by Asynchronous Robots on Infinite Grid. In International Symposium on Algorithms and Experiments for Sensor Systems, Wireless Networks and Distributed Robotics; Springer: Berlin/Heidelberg, Germany, 2018; pp. 83–101. [Google Scholar]
- Sharma, G.; Vaidyanathan, R.; Trahan, J.L. Optimal Randomized Complete Visibility on a Grid for Asynchronous Robots with Lights. Int. J. Netw. Comput. 2021, 11, 607–616. [Google Scholar]
- Hector, R.; Vaidyanathan, R.; Sharma, G.; Trahan, J.L. Optimal Convex Hull Formation on a Grid by Asynchronous Robots with Lights. In Proceedings of the 2020 IEEE International Parallel and Distributed Processing Symposium, New Orleans, LA, USA, 18–22 May 2020; pp. 1051–1060. [Google Scholar]
- D’Emidio, M.; Frigioni, D.; Navarra, A. Synchronous Robots vs Asynchronous Lights-Enhanced Robots on Graphs. Electr. Notes Theor. Comput. Sci. 2016, 322, 169–180. [Google Scholar] [CrossRef][Green Version]
- Cohen, R.; Peleg, D. Local Spreading Algorithms for Autonomous Robot Systems. Theor. Comput. Sci. 2008, 399, 71–82. [Google Scholar] [CrossRef]
- Dutta, A.; Chaudhuri, S.G.; Datta, S.; Mukhopadhyaya, K. Circle Formation by Asynchronous Fat Robots with Limited Visibility. In International Conference on Distributed Computing and Internet Technology; Spring: Berlin/Heidelberg, Germany, 2012; pp. 83–93. [Google Scholar]
- Gan Chaudhuri, S.; Mukhopadhyaya, K. Leader election and gathering for asynchronous fat robots without common chirality. J. Discrete Algorithms 2015, 33, 171–192. [Google Scholar] [CrossRef]
- Honorat, A.; Potop-Butucaru, M.; Tixeuil, S. Gathering fat mobile robots with slim omnidirectional cameras. Theor. Comput. Sci. 2014, 557, 1–27. [Google Scholar] [CrossRef]
- Pagli, L.; Prencipe, G.; Viglietta, G. Getting Close Without Touching: Near-gathering for Autonomous Mobile Robots. Distrib. Comput. 2015, 28, 333–349. [Google Scholar] [CrossRef]
- Ando, H.; Suzuki, I.; Yamashita, M. Formation and agreement problems for synchronous mobile robots with limited visibility. In Proceedings of the International Conference on Distributed Computing and Internet Technology, Bhubaneswar, India, 10–13 January 1995; pp. 453–460. [Google Scholar] [CrossRef]
- Prencipe, G. Autonomous Mobile Robots: A Distributed Computing Perspective. In International Symposium on Algorithms and Experiments for Sensor Systems, Wireless Networks and Distributed Robotics; Spring: Berlin/Heidelberg, Germany, 2013; pp. 6–21. [Google Scholar]
- Yamashita, M.; Suzuki, I. Characterizing geometric patterns formable by oblivious anonymous mobile robots. Theor. Comput. Sci. 2010, 411, 2433–2453. [Google Scholar] [CrossRef]
- Abshoff, S.; Cord-Landwehr, A.; Fischer, M.; Jung, D.; Meyer auf der Heide, F. Gathering a Closed Chain of Robots on a Grid. In Proceedings of the 2016 IEEE International Parallel and Distributed Processing Symposium (IPDPS), Chicago, IL, USA, 23–27 May 2016; pp. 689–699. [Google Scholar]
- Cord-Landwehr, A.; Fischer, M.; Jung, D.; Meyer auf der Heide, F. Asymptotically Optimal Gathering on a Grid. In Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures, Pacific Grove, CA, USA, 11–13 July 2016; pp. 301–312. [Google Scholar]
- Degener, B.; Kempkes, B.; Langner, T.; Meyer auf der Heide, F.; Pietrzyk, P.; Wattenhofer, R. A tight runtime bound for synchronous gathering of autonomous robots with limited visibility. In Proceedings of the Twenty-Third Annual ACM Symposium on Parallelism in Algorithms and Architectures, San Jose, CA, USA, 4–6 June 2011; pp. 139–148. [Google Scholar]
- Degener, B.; Kempkes, B.; Meyer auf der Heide, F. A local O(n2) gathering algorithm. In Proceedings of the Twenty-Second Annual ACM Symposium on Parallelism in Algorithms and Architectures, Santorini, Greece, 13–15 June 2010; pp. 217–223. [Google Scholar]
- Kempkes, B.; Kling, P.; Meyer auf der Heide, F. Optimal and competitive runtime bounds for continuous, local gathering of mobile robots. In Proceedings of the Twenty-Fourth annual ACM Symposium on Parallelism in Algorithms and Architectures, Pittsburgh, PA, USA, 25–27 June 2012; pp. 18–26. [Google Scholar]
- Izumi, T.; Potop-Butucaru, M.G.; Tixeuil, S. Connectivity-preserving Scattering of Mobile Robots with Limited Visibility. In Symposium on Self-Stabilizing Systems; Springer: Berlin/Heidelberg, Germany, 2010; pp. 319–331. [Google Scholar]
- Cord-Landwehr, A.; Degener, B.; Fischer, M.; Hüllmann, M.; Kempkes, B.; Klaas, A.; Kling, P.; Kurras, S.; Märtens, M.; Meyer auf der Heide, F.; et al. A New Approach for Analyzing Convergence Algorithms for Mobile Robots. In International Colloquium on Automata, Languages, and Programming; Springer: Berlin/Heidelberg, Germany, 2011; pp. 650–661. [Google Scholar] [CrossRef]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).