Probabilistic Asynchronous Arbitrary Pattern Formation
PProbabilistic Asynchronous Arbitrary Pattern Formation *Quentin Bramas S´ebastien Tixeuil Sorbonne Universit´es, UPMC Univ Paris 06, CNRS, LIP6 UMR 7606, 4 place Jussieu 75005 Paris. { quentin.bramas, sebastien.tixeuil } @lip6.fr Abstract
We propose a new probabilistic pattern formation algorithm for oblivious mobile robots that operates inthe ASYNC model. Unlike previous work, our algorithm makes no assumptions about the local coordinatesystems of robots (the robots do not share a common “North” nor a common “Right”), yet it preserves theability from any initial configuration that contains at least 5 robots to form any general pattern (and not justpatterns that satisfy symmetricity predicates). Our proposal also gets rid of the previous assumption (in thesame model) that robots do not pause while moving (so, our robots really are fully asynchronous), and theamount of randomness is kept low – a single random bit per robot per Look-Compute-Move cycle is used.Our protocol consists in the combination of two phases, a probabilistic leader election phase, and a deter-ministic pattern formation one. As the deterministic phase does not use chirality, it may be of independentinterest in the deterministic context. A noteworthy feature of our algorithm is the ability to form patternswith multiplicity points (except the gathering case due to impossibility results), a new feature in the contextof pattern formation that we believe is an important asset of our approach.
We consider a set of mobile robots that move freely in a continuous 2-dimensional Euclidian space. Eachrobot repeats a Look-Compute-Move (LCM) cycle [10]. First, it
Looks at its surroundings to obtain a snapshotcontaining the locations of all robots as points in the plane, with respect to its ego-centered coordinate system.Based on this visual information, the robot
Computes a destination and then
Moves towards the destination.The robots are identical, anonymous and oblivious i.e. , the computed destination in each cycle depends only onthe snapshot obtained in the current cycle (and not on the past history of execution). The snapshots obtained bythe robots are not consistently oriented in any manner.The literature defines three di ff erent models of execution: in the fully synchronous (FSYNC) model, robotsexecute LCM cycles in a lock-step manner, in the semi-synchronous (SSYNC) model, each LCM cycle issupposed atomic, and in the most general asynchronous (ASYNC) model, each phase of each LCM cycle maytake an arbitrary amount of time. This last model enables the possibility that a robot observes another robotwhile the latter is moving (and moving robots appear in the snapshot exactly the same way static robots do ),and that move actions are based on obsolete observations.In this particularly weak model it is interesting to characterize which additional assumptions are necessaryand su ffi cient for the robots to cooperatively perform a given task. In this paper, we consider the patternformation problem in the most general ASYNC model. The robots start in an arbitrary initial configurationwhere no two robots occupy the same position, and are given the pattern to be formed as a set of coordinates in * This work was performed within the Labex SMART supported by French state funds managed by the ANR within the Investisse-ments d’Avenir programme under reference ANR-11-IDEX-0004-02. a r X i v : . [ c s . D C ] S e p heir own local coordinate system. An algorithm solves the pattern formation problem if within finite time therobots form the input pattern and remain stationary thereafter. Related Works.
The pattern formation problem has been extensively studied in the deterministic setting [2, 1,7, 8, 4, 11, 12, 5, 6, 10]. The seminal paper on mobile robots [10] presents a deterministic solution to constructgeneral patterns in the SSYNC model, with the added assumption that robots have access to an infinite non-volatile memory (that is, robots are not oblivious). The construction was later refined for the ASYNC modelby Bouzid et al. [2], still using a finite number of infinite precision variables.The search for an oblivious solution to the general pattern formation proved di ffi cult [6]. For obliviousdeterministic robots to be able to construct any general pattern, it is required that they agree on a common“North” (that is, a common direction and orientation) but also on a common “Right” (that is, a common chiral-ity), so that robots get to all agree on a common coordinate system. If only a “North” (and implicitly if only a“Right”) is available, then some patterns involving an even number of robots cannot be formed. Relaxing thecommon coordinate system condition let to a characterization of the patterns that can be formed by determinis-tic oblivious robots [7, 8, 12]. The best deterministic algorithm so far in the ASYNC model without a commoncoordinate system [8] proves the following: If ρ denotes the geometric symmetricity of a robot configuration(i.e., the maximum integer ρ such that the rotation by 2 π / ρ is invariant for the configuration), and I and P denotethe initial and target configurations, respectively, then P can be formed if and only if ρ ( I ) divides ρ ( F ) . Allaforementioned deterministic solutions assume that both the input configurations and the target configurationdo not have multiplicity points (that is, locations hosting more than one robot), and that robots share a commonchirality. Overall, oblivious deterministic algorithms either need a common coordinate system or cannot formany general pattern.To circumvent those impossibility results, the probabilistic path was taken by Yamauchi and Yamashita [13].The robots are oblivious, operate in the most general ASYNC model, and can form any general pattern fromany general initial configuration (with at least n ≥ (i) all robotsshare a common chirality, (ii) a robot may not make an arbitrary long pause while moving (more precisely, itcannot be observed twice at the same position by the same robot in two di ff erent Look-Compute-Move cycleswhile it is moving), and (iii) infinitely many random bits are required (a robot requests a point chosen uniformlyat random in a continuous segment) anytime access to a random source is performed. While the latter two areof more theoretical interest, the first one is intriguing, as a common chirality was also used extensively in thedeterministic case. The following natural open question raises: is a common chirality a necessary requirementfor mobile robot general pattern formation ? As the answer is yes in the deterministic [6] case, we concentrateon the probabilistic case. Our contribution.
In this paper, we propose a new probabilistic pattern formation algorithm for obliviousmobile robots that operate in the ASYNC model. Unlike previous work, our algorithm makes no assumptionsabout the local coordinate systems of robots (they do not share a common “North” nor a common “Right”), yetit preserves the ability from any initial configuration that contains at least 5 robots to form any general pattern(and not just patterns such that ρ ( I ) divides ρ ( F ) ). Besides relieving the chirality assumption, our proposalalso gets rid of the previous assumption [13] that robots do not pause while moving (so, they really are fullyasynchronous), and the amount of randomness is kept low – a single random bit per robot is used per use ofthe random source – ( vs. infinitely many previously [13]). Our protocol consists in the combination of severalphases, including a deterministic pattern formation one. As the deterministic phase does not use chirality, itmay be of independent interest in the deterministic context.A noteworthy property of our algorithm is that it permits to form patterns with multiplicity points ( without assuming robots are endowed with multiplicity detection), a new feature in the context of pattern formation thatwe believe is an important asset of our approach. Of course, the case of gathering (a special pattern defined bya unique point of multiplicity n ) remains impossible to solve in our settings [9].2 Model
Robots operate in a 2-dimensional Euclidian space. Each robot has its own local coordinate system. Forsimplicity, we assume the existence (unknown from the robots) of a global coordinate system. Whenever itis clear from the context, we manipulate points in this global coordinate system, but each robot only sees thepoints in its local system. Two set of points A and B are similar , denoted A ≈ B , if B can be obtained from A by translation, scaling, rotation, or symmetry. A configuration P is a set of positions of robots at a given time.Each robot that looks at this configuration may see di ff erent (but similar) set of points.Each time a robot is activated it starts a Look / Compute / Move cycle. After the look phase, a robot obtains aconfiguration P representing the positions of the robots in its local coordinate system. After an arbitrary delay,the robot computes a path to a destination. Then, it moves toward the destination following the previouslycomputed path. The duration of the move phase, and the delay between two phases, are chosen by an adversaryand can be arbitrary long. The adversary decides when robots are activated assuming a fair scheduling i.e. , inany configuration, all robots are activated within finite time. The adversary also controls the robots movementalong their target path and can stop a robot before reaching its destination, but not before traveling at least adistance δ > δ being unknown to the robots).An execution of an algorithm is an infinite sequence P ( ) , P ( ) , . . . of configurations. An algorithm ψ forms a pattern F if, for any execution P ( ) , P ( ) , . . . , there exists a time t such that P ( t ) ≈ F and P ( t ′ ) = P ( t ) for all t ′ ≥ t . In the sequel, the set of points F denotes the pattern to form. The coordinates of the points in F aregiven to the robots in an arbitrary coordinate system so that each robot may receive di ff erent, but equivalent,pattern F . If the pattern contains points of multiplicity, the robots receives a multiset, that is, a set where eachelement is associated with its multiplicity. Even if the robots are not endowed with multiplicity detection, theyknow from the pattern what are the points of multiplicity to form. In particular, then can deduce from thepattern, the number n of robots, even if they do not see n robots. Our algorithm is divided into four phases. Since robots are oblivious and the scheduling is asynchronous, wecannot explicitly concatenate several phases to be executed in a specific order. However, one can simulate thee ff ect of concatenation of two (or more) phases by inferring from the current configuration which phase toexecute. Implementing this technique is feasible if phases are associated with disjoint sets of configurationswhere they are executed. Also, in order to simplify the proof of correctness, robots should not switch phaseswhen placed in a configuration containing moving robots i.e. , a phase has to ensure that if the configurationresulting from a movement is associated with another phase, then all the robots are static (that is, none of themis moving). When this property holds, the first time a phase is executed, we can suppose that the configurationis static.Our algorithm can form an arbitrary pattern. In particular, the pattern F can contain points of multiplicity(but cannot be a single point). If this is the case, the robots create a new pattern ˜ F from F where they removethe multiplicity, and add around each point p of multiplicity m , m − p , and located atthe same distance to the center of the smallest circle enclosing F . The algorithm then proceed as usual with ˜ F instead of F . The initial pattern F is formed by the termination phase, when ˜ F is almost formed. So from now,we suppose that the pattern does not contains points of multiplicity and we refer to the details of the terminationphase to see how an arbitrary pattern is formed.In the following we define the phases of our algorithm and the set of associated configurations, startingfrom the more precise one (the phase we intuitively execute at the end to complete the pattern formation).Unless otherwise stated, the center of a configuration refers to the center of the smallest enclosing circle of thisconfiguration. Termination.
The termination phase occurs when all robots, except the closest to the center, forms the target3attern (from which we remove one of the point closest to the center). The phase consists in moving the lastrobot towards its destination. While moving, the robot remains the closest to the center, so that the resultingconfiguration is associated to the same phase.
Almost Pattern Formation.
Among the remaining configurations, we associate the guided ones to this phase.A configuration is guided when a unique robot is su ffi ciently close to the center and induces by its position aglobal sense of direction and orientation to every robot. In particular, when executing this phase, robots aretotally ordered and have a unique destination assigned. The phase consists first in moving all the robots (exceptthe one that is closest to the center), one by one, so that they are at the same distance to the center as theirdestination in the pattern. Secondly, the robots moves toward their destination, keeping their distance to thecenter and the ordering unchanged. The configuration has to remain guided until each robot, except the closestto the center, reaches its destination. A configuration obtained after executing this phase is either associated tothe same phase, or to the termination phase. Formation of a Guided Configuration 1 (FBC1).
Among the remaining configurations, we associate the onesthat contain a centered equiangular or biangular (CEB) set to this phase. A CEB-set is a subset of robots thatexists when the configuration is symmetric or is almost symmetric. Moreover it is constructed independentlyfrom the coordinate system (so it is unique when it exists), and is invariant when the robots in this set movetoward (or away from) the center of the configuration (see Section 4.4 for a formal definition). When theconfiguration contains a CEB-set, our algorithm consists in moving the robots in this set to obtain a guidedconfiguration. The invariance property of the CEB-set is important to ensure that resulting configurations arestill associated with this phase.In more details, when this phase is executed, the robots in the CEB-set Q moves either toward or away fromthe center with probability 1 /
2. We show that, with probability 1, a unique robot is elected after a finite numberof activations. Then, the elected robot performs a special move to force the other robots in Q to terminate theirmovement. Once each robot is static, the elected robot moves toward the center to create a guided configuration.During the execution of this phase, it is possible that the configuration is associated with the termination phase.If this happens, our algorithm makes sure that all robots are static. Formation of a Guided Configuration 2 (FBC2).
We associate all remaining configurations to this phase.When executing this phase, the configuration does not have a CEB-set. This implies that the configuration isnot symmetric, so the robots are totally ordered. Therefore, the smallest robot moves toward the center to createa guided configuration (it remains the smallest robot while doing so). Before the movement, the robot checksif there exists a point in its path that creates a configuration containing a CEB-set. If it is the case, the robotchooses this point as its destination so that, when the configuration contains a CEB-set (and the robots switchto the FBC1 phase), all the robots are static.Almost Pattern FormationFBC1 TerminationFBC2 P ≈ F Lemma 4 Lemma 4Lemma 2 Lemma 1
Figure 1: Relations between the phases of the algorithm.We define the relation ↝ between phases, where A ↝ B if executing the phase A can lead to a configurationassociated with phase B . The proof of our main theorem follows from Lemma 1, Lemma 2, and Lemma 4 (seeFigure 1) detailed in the next Section. Theorem 1.
Our algorithm forms any pattern F that is not a point, starting from any configuration of at least5 robots that does not contain a point of multiplicity. Algorithm Details
In this section we describe in more detail the phases of our algorithm. We start by listing the necessary notationsused in the remaining of the section.
Let P be a set of points, then C ( P ) denotes the smallest enclosing circle of P . Otherwise mentioned, c ( P ) denotes the center of C ( P ) . The circle of a robot r ∈ P is the circle centered at c ( P ) containing r . We say arobot moves on its circle if its trajectory is contained in its circle. A radial movement is a linear movementwhose origin and destination are on the same half-line of origin c ( P ) . We say a robot moves radially if itperforms a radial movement.The pattern to form, F , is given to each robot as a set of points in their local coordinate system. However,at each activation, robots can translate and scale their local coordinate system so that C ( P ) = C ( F ) . Hence,we suppose in the remainder of the paper that C ( P ) = C ( F ) , and that the radius of C ( P ) is the common unitdistance (unless otherwise mentioned). This is possible because in our case, the configuration where all robotsshare the same location (that is, are gathered) is not reachable. For two points a and b , ∣ a ∣ b = ∣ a − b ∣ denotesthe distance between a and b . In a n -robot configuration P , as we are often interested in the distance between apoint and the center c ( P ) , we simply write ∣ a ∣ instead of ∣ a ∣ c ( P ) .The interior, resp. the exterior, of a disc or a circle C , denoted interior ( C ) , resp. exterior ( C ) , does notinclude the circumference. A set of points A (or simply a point) holds C ( P ) if C ( P ∖ B ) ≠ C ( P ) , for a subset B ⊂ A . The angle formed by three points u , v and w is denoted by ang ( u , v , w ) ∈ [ , π ) , and the orientationdepends on the context. If the orientation is not given, it is either clockwise or counterclockwise, but it doesnot vary for a given robot during a cycle. Partial Ordering and Symmetricity.
Given a set of points (typically a configuration) P , we order the pointsbased on their coordinates in the coordinate systems defined by the points that are the closest to, but not at, thecenter c ( P ) . Formally, let M = { r ∈ P s.t. ∣ r ∣ = min r ′ ∈ P ∖{ c ( P )} ∣ r ′ ∣} . For each robot r m in M and each orientation o in {⟳ , ⟲} we define the polar coordinate system Z or m ∶ P → R + × [ , π ) , r ↦ (∣ r ∣ , ang ( r m , c ( P ) , r )) orientedby o . We denote by Z or m ( P ) the increasing sequence of coordinates in Z or m of the points in P . In particular, if r and r are two points such that ∣ r ∣ < ∣ r ∣ , then the coordinates in Z or m ( P ) of r are smaller than the coordinatesof r .We define Z min as the set of coordinate systems that minimize the sequence of coordinates, using the lexi-cographical order. We use this set of coordinate systems to define the relation < , where r < r ′ if and only if thecoordinates of r are smaller than the coordinates of r ′ in every coordinate systems Z ∈ Z min . From this relationwe deduce the partial ordering of P .We define the symmetricity of a configuration P as the number of minimal points in its partial ordering. Inparticular, if the robots are endowed with chirality (or if the configuration does not have an axis of symmetry),this definition matches the definition of symmetricity of previous work [1, 8]. In particular, if a configuration P is such that ρ ( P ) = k >
1, then P can be partitioned in n / k regular k -gons centered at c ( P ) (where a 2-gon isa line with center its middle). However, this is not true in the general case when robots do not have a commonsense of chirality. Also, it is important to notice that if c ( P ) ∈ P then ρ ( P ) =
1, even if the configuration issymmetric or is invariant by rotation.
Ordered and Guided Configuration. An ordered configuration is a configuration where the partial order ofrobots is a total order. In particular, this implies that there is a unique coordinate system Z in Z min and all therobots agree on Z as a global coordinate system.When the configuration is ordered, let f , f , . . . , f n be any total ordering of points in F satisfying the partialordering of F (an arbitrary ordering can be chosen if more than one satisfies the condition). Even if the patternis given to robots using an arbitrary coordinate system, each robot can scale it so that C ( F ) = C ( P ) , mirrors it5o that the orientation chosen for the ordering of the points in F coincides with the orientation of the orderingof the robots, and rotate it so that the points f and r are on the same half-line of origin c ( P ) . Without loss ofgenerality, we can suppose that F is given to the robots with those property, in the global coordinate system Z .One can observe that the choice of the ordering of points in F is not important, since the resulting coor-dinates of points in F in the global coordinate system Z are identical for two di ff erent orderings (indeed, theresulting sets are equivalent, and are equals after applying the aforementioned transformations). So, from nowon, when the configuration is ordered, robots see the points in F in the same way in the global coordinatesystem, and have a common ordering of points in F .A guided configuration is an ordered configuration that satisfies: (i) ∣ r ∣ = ∣ r ∣/ (ii) ∣ r ∣ ≤ ∣ f ∣ ; (iii) ang ( r , c ( P ) , r ) < min f ≠ f , ∣ f ∣=∣ f ∣ ang ( f , c ( F ) , f ) (see Figure 2a).A static configuration that only satisfies ∣ r ∣ ≤ min (∣ r ∣ , ∣ f ∣)/ r moves toward the center until ∣ r ∣ ≤ ∣ f ∣ and if the third condition is not satisfied, r moves to the center and then moves away from it to form an appropriate angle with r , and such that ∣ r ∣ = min (∣ r ∣ , ∣ f ∣)/
2. Once r and r reach their destinations, the configuration is static and guided. Therefore,from now on, a static configuration such that ∣ r ∣ ≤ min (∣ r ∣ , ∣ f ∣)/ The termination phase consists in the following steps. First, the robots check (a) if a point of multiplicity existsin the configuration (by comparing the number of visible robots with the number of points in the pattern) or (b)if the configuration is guided (so that each robot sees F in the same coordinate system), if each point in F isoccupied by a robot, and if the other robots are close to a point of F . If it is not the case , then the pattern to form is modified to obtain a pattern ˜ F without point of multiplicity andthe other phases of the algorithm are executed with ˜ F instead of F . If it is the case , then every robot r knows its destination f r ∈ F (its the closest point of F ). If there is a robot r ≠ r with r ≠ f r and f r ≠ c ( F ) , then r moves toward f r , while remaining in its circle. When no such robotexists then there is two case: Case 1: r is the only robot not located on its destination in F . Then r moves toward its destination (if multipledestinations are possible, then it chooses the closest one) and the other robots do not move. While it is moving,the global coordinate system is modified but r remains the only closest robots to the center. When r reachesits destination (which can be a location that is already occupied by another robot), the pattern F is formed. Case 2:
There are several robots with destination c ( F ) . Then, they all move toward c ( F ) when activated.During those moves, the global coordinate system may not be visible to the robots anymore, but all the robotscan detect that F ∖ { c ( F )} is formed and that the robots closest to c ( F ) are moving toward c ( F ) .Now we detail how ˜ F is constructed from F . The goal is that, when ˜ F is formed by the robots, every pointof F is occupied by a robot and the other robots are close to a point of F (so that they know their destinationin F even without the ordering of robot). Let F be the initial pattern that can contain points of multiplicity.Let ˜ F be the set of points constructed from F by removing the multiplicity and adding, for each point p ∈ F ∖ { c ( F )} of multiplicity m > m − p , . . . , p m − such that ∣ p i ∣ = ∣ p ∣ and ang ( p , c ( F ) , p i ) = α ( F ) i ,with α ( F ) = min ({ ang ( f , c ( F ) , f ′ ) ∣ f , f ′ ∈ F } ∖ { }) . If c ( F ) has multiplicity m in F then, we also add m − ε F = min f ∈ F ∖{ c ( F )} ∣ f ∣ such that one point is on the half line oforigin c ( F ) passing through one of the greatest point in F . In this construction, the orientation of the angles iseither deduced from the pattern, or arbitrary if F has an axis of symmetry. The construction may not be unique(e.g. if the F has an axis of symmetry) but the possible resulting sets are all similar, and ˜ F is any of those. Forall the phases except Termination, ˜ F is used instead of F whenever F contains points of multiplicity. Lemma 1.
The
Termination phase terminates on a configuration P ≈ F. .3 Almost Pattern Formation In this phase we assume that the configuration is guided. We have a total order over robots r , . . . , r n , andeach robot sees the pattern in the same way in a global coordinate system Z . In Z , the points of F are alsototally ordered f , . . . , f n so that each robot r i knows its final destination f i . The goal of this phase is that eachrobot, except r , reaches its destination. In the sequel P ′ = P ∖ { r } and F ′ = F ∖ { f } . One can observe that C ( P ′ ) = C ( P ) , and we can assume that C ( F ′ ) = C ( F ) (if this is not the case, we can modify the ordering ofpoints in F so that f does not hold C ( F ) ).This phase consist in two sub-phases. The first one consists in moving each robot to its correct circleand the second one in moving each robot to its destination, while remaining in its circle. While doing this,the ordering of robot stays the same so that the destination of each robot remain unchanged. We give here adetailed overview, and refer to the appendix for a complete description. Reach the Correct Circle.
Let C , C , . . . , C m be the m circles centered at c ( P ) with decreasing radius, eachcontaining at least one point in F ′ . This subphase consists in moving robots so that each circle contains thecorrect number of robots. For each circle C i , 1 ≤ i ≤ m , we remove a robot if there are too many robots on C i and we add a robot if there are too few robots on C i . We do so by either moving a robot that is on the circletoward the inside of C i or the contrary. We move the robots one by one while keeping the ordering of robot andby keeping C ( P ) unchanged. Reach the Destination.
Let i ∈ [ , m ] , C i now contains m i robots and the m i destinations for those robots. Therobots and the destinations are ordered so that each robot is aware of its corresponding destination. They can allmove toward their destination, while remaining on C i and preserving the robots ordering ( i.e. , without reachinganother robot position). When a robot r is active and another robot is on the way, r chooses on the circle halfthe distance to this robot. There cannot be a deadlock since there is no cycle in the waiting relation. Indeed,robots on C i are ordered by angle so that they behave like they are on a finite segment. If i =
1, during theirmovement, robots also ensure that C ( P ) remains unchanged. To do so, if a robot r ∈ C is active and detectsthat its movement can modify C ( P ) , then it moves as much as possible without changing C ( P ) . Lemma 2.
After the
Almost Pattern Formation phase, each robot in P ′ reaches its destination in F ′ , and the Termination phase is executed.Proof.
First we show that there is no deadlock. Suppose we have on a circle C , m robots r < r < . . . < r m and m destinations d < d < . . . < d m . r i has destination d i and moves toward it (staying on C ) in the directorientation if r i < d i and in the indirect orientation otherwise. For the sake of contradiction, suppose that r i < d i and r i cannot reach d i , even after an infinite number of activation. we observe that, to block r i , r i + must satisfy r i < r i + ≤ d and r i + is not able to free the way for r i + . This implies that r i + ≤ r i + ≤ d . Recursively, thismeans that r m ≤ d . But nothing blocks r m to reach d m when r m ≤ d m , a contradiction.Now suppose for the purpose of contradiction that C ( P ) is modified. This means that there exist two robots r and r ′ on C that form an angle greater than π . Before C ( P ) is modified, they form an angle of at most π ,so that one robot’s movement on C in the direct orientation, and the other’s movement on C in the indirectorientation. This is possible only if there is no point in F on C between r and r ′ , which is a contradiction withthe fact that C ( P ) = C ( F ) . (cid:3) If the current configuration P is not guided, and contains a CEB-set Q , we execute this phase to obtain a guidedconfiguration. To do so, one robot has to be elected to guide the configuration. Once a unique robot is elected,other robots may still be moving. One way to be sure that the other robots are static is to give them newdestinations. To do so, the elected robot moves on its circle with a small angle. After this move, the otherrobots can still detect the elected robot and compute the angle. This angle can be used as a persistent memory.For a given angle, each robot moves toward a deterministic destination. This ensure that at the end of the phaseall the robots are static. Another angle is used at the end of the phase to form a guided configuration.7he phase consists of two procedures: a robot election and using the elected robot to form a static guidedconfiguration.First, we give the formal definition of the CEB-set and how to compute it. Then, we present the twoprocedures that use the property of the CEB-set to form a static guided configuration. CEB-set Definition.
For a given point c , the string of angles S A c , r , o ( P ) starting from a robot r with orientation o is the sequence of angles formed by the robots in P with r , around Point c , and with Orientation o . If fortwo robots r ≠ r ′ , the strings of angles S A c , r , o ( P ) and S A c , r ′ , o ( P ) are equal, we say the configuration is regular (this is tantamount to say the string of angles is periodic). Regular sets have been introduced by Bouzid etal. [1] for solving the gathering problem. Its main property is that there exists at most one point c such that S A c , r , o ( P ) = S A c , r ′ , o ( P ) , and this point is invariant by robots movement toward to, or away from c (as it is alsothe Weber point). Particular regular configurations are equiangular configurations (the period of the string ofangles is 1) and biangular configurations (the period of the string of angles is 2). The point c is called the centerof regularity of the configuration.We say that a configuration is sym-regular , if two strings of angles, centered at the center c ( P ) of C ( P ) ,with opposite orientations, are equal, i.e. , if there exists r , r ′ ∈ P (possibly r = r ′ ) such that S A c ( P ) , r , ⟳ ( P ) = S A c ( P ) , r ′ , ⟲ ( P ) .We define the centered equiangular of biangular set (CEB) set CEB ( P ) of a configuration P as follow: ● If P is not regular nor sym-regular: then P does not have a CEB-set i.e. , CEB ( P ) = ∅ . ● If the whole configuration P is equiangular or biangular: then CEB ( P ) = P and, in this case, the center of theconfiguration c ( P ) is the center of regularity . ● Otherwise: the CEB-set Q is constructed as follow. Initially, Q = ∅ . Let S be the set of smallest robots(according to the partial ordering of robots) such that Q ∪ S does not hold C ( P ) . If Q ∪ S is equiangular orbiangular then add the robots of S in Q and start again, otherwise stop and CEB ( P ) = Q . Informally, the CEBset is the biggest subset of P containing smallest robots that is equiangular or biangular with center c ( P ) andthat does not hold C ( P ) . Since n ≥
5, if all robots are on
S EC ( P ) , there exist some robots that can be movedwithout changing S EC ( P ) , so that Q ≠ ∅ . Algorithm constructCEBSet: Q = ∅ Ignore ← ∅ while P ∖ ( Ignore ∪ Q ) ≠ ∅ do Let S be the set of smallest robots in P ∖ ( Ignore ∪ Q ) according to the partial ordering of robot if Q ∪ S holds P then Ignore ← Ignore ∪ S else if Q ∪ S is equiangular or biangular then Q ← Q ∪ S else stop Theorem 2.
For a configuration P, if ρ ( P ) > , then CEB ( P ) ≠ ∅ . If by moving one robot, a configuration has a CEB-set and the robot is among the closest robots to thecenter of the CEB-set, we say that the configuration has a CEB-set with a shifted robot . The shifted robot isthe robot that we need to move to create the CEB-set. The configuration is seen as if the shifted robot is at itsright position ( i.e. , the position where it has to be for the configuration to contain a CEB-set). The di ff erencebetween the angles of this robot before and after the move (with origin c ( P ) ) is called the shift angle . Theorem 3.
Let n ≥ , and P be an n-robot configuration that contains a CEB-set with a shifted robot. Let θ ( P ) be the smallest (non-null) angle, centered at c ( P ) , between two robots in the configuration. If the shiftangle is at most θ ( P )/ , then the shifted robot is unique. The proof of this result is not trivial, and can be found in the appendix. When computing the CEB-set ofa configuration, all the robots can see if the CEB-set has a shifted robot. The existence of a shifted robot is8rucial for our algorithm because the shift angle can be used as a persistent memory. In more details, if all theother robots move radially, they do not change the shift angle, so that the shifted robot can modify the shiftangle to remember some information for the next activation. Moreover, all the other robots can see the shiftangle and deduce some information from it. In our algorithm the shift angle is used to order the robots to makea specific move, and then, another shift angle is used to stop them.
Robot Election.
Let Q bet the CEB-set. We say a robot r e is elected if it is the shifted robot of Q or if ∣ r e ∣ < min r ∈ Q ∖{ r e } ∣ r ∣ . To elect a robot, each robot r in Q proceeds in the following way. If there is anotherrobot in Q that is strictly closer to the center, then r does not move. If r is not elected and is one of the closestrobot (unique or not), then r chooses randomly (each choice with probability 1 /
2) to go toward or away fromthe center c ( P ) . If r chooses to move toward the center, it moves a distance ∣ r ∣/
8. If r chooses to move awayto the center, it moves a (possible null) distance min ( ( d − ∣ r ∣) , ∣ r ∣) , where d is the minimum distance to thecenter among robots in P ∖ Q (and d = ∞ if P ∖ Q = ∅ ). This ensures that robots in Q remain in the CEB-setin the resulting configuration. A robot is aware that it is elected if it is elected during its look phase. When arobot is aware it is elected, and is not yet the shifted robot, it moves on its circle to create a shift angle of θ / Lemma 3.
The following properties hold: (i) eventually one robot is aware it is elected with probability one,and (ii) once a robot is aware it is elected, another robot cannot be elected.
Also, our algorithm has to ensure that n − F is in the path of a robot, then this point is either chosen as its destination,or avoided (the procedure is described in the appendix). So that, if the configuration is associated with the Termination phase, all the robots are static.
Using the Shifted Robot to Form a Static Guided Configuration.
If the elected robot is not shifted or if theshift angle is in [ , θ / ) (with θ = θ ( P ) ), it moves on its circle to create a shift θ /
8. Also, if the shift angle isin ( θ / , θ / ) and if the robots in the CEB-set Q are not on the same circle as the shifted robot, then the shiftedrobot moves on its circle to create a shift θ /
8. If another robot is activated during the movement of the shiftedrobot ( i.e. , when the shift is not exactly θ / θ /
8, theelected robot waits for the other robots in Q to reach its circle. When this is the case, the shifted robot moveson its circle to create a shift angle of θ /
4. Then it moves toward the center to create an guided configuration i.e. , the shifted robot r moves radially such that ∣ r ∣ = min (∣ r ∣ , ∣ f ∣)/ Lemma 4.
After executing the
FCB1 phase, the configuration is static and associated with either the
Termina-tion phase or the
Almost Pattern Formation (in finite time with probability one).
Similarly to previous work [13], the initial configuration should not contain multiplicity positions. In thecase where the initial configuration contains points of multiplicity, a convenient solution would be to reuseknown pattern formation algorithms (such as ours) and run a preliminary phase where multiplicity points areeliminated. This task is known as the scattering task in the literature [3]. However, even the most recentdevelopments [3] only considers the SSYNC model. Of course, as our protocol also performs correctly inSSYNC, it is possible to combine the two to obtain a protocol in SSYNC that manages multiplicities both in I and in F . Indeed, combining protocols in SSYNC is facilitated because moves are always aware of the latestconfiguration, so for all configurations that have multiplicities and do not belong to a legitimate path towardthe target pattern, the scattering phase is run, until robots either reach a configuration where there is no pointof multiplicity or a configuration that makes progress toward the target pattern. Extending this scheme to theASYNC model requires to solve the open problem of ASYNC scattering, and making sure the combinations ofprotocols is feasible. 9 eferences [1] Zohir Bouzid, Shlomi Dolev, Maria Potop-Butucaru, and S´ebastien Tixeuil. Robocast: Asynchronouscommunication in robot networks. In Chenyang Lu, Toshimitsu Masuzawa, and Mohamed Mosbah,editors, Principles of Distributed Systems - 14th International Conference, OPODIS 2010, Tozeur, Tunisia,December 14-17, 2010. Proceedings , volume 6490 of
Lecture Notes in Computer Science , pages 16–31.Springer, 2010.[2] Zohir Bouzid and Anissa Lamani. Robot networks with homonyms: The case of patterns formation. InXavier D´efago, Franck Petit, and Vincent Villain, editors,
Stabilization, Safety, and Security of DistributedSystems , volume 6976 of
Lecture Notes in Computer Science , pages 92–107. Springer Berlin Heidelberg,2011.[3] Quentin Bramas and S´ebastien Tixeuil. Tha random bit complexity of mobile robots cattering. In
ADHOC NOW , Lecture Notes in Computer Science, page to appear, Athens, Greece, July 2015. SpringerBerlin Heidelberg.[4] Shantanu Das, Paola Flocchini, Nicola Santoro, and Masafumi Yamashita. On the computational powerof oblivious robots: Forming a series of geometric patterns. In
Proceedings of the 29th ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing , PODC ’10, pages 267–276, New York, NY,USA, 2010. ACM.[5] Yoann Dieudonn´e, Franck Petit, and Vincent Villain. Leader election problem versus pattern formationproblem. In Nancy A. Lynch and Alexander A. Shvartsman, editors,
Distributed Computing, 24th Inter-national Symposium, DISC 2010, Cambridge, MA, USA, September 13-15, 2010. Proceedings , volume6343 of
Lecture Notes in Computer Science , pages 267–281. Springer, 2010.[6] Paola Flocchini, Giuseppe Prencipe, Nicola Santoro, and Peter Widmayer. Arbitrary pattern formation byasynchronous, anonymous, oblivious robots.
Theor. Comput. Sci. , 407(1-3):412–447, 2008.[7] Nao Fujinaga, Hirotaka Ono, Shuji Kijima, and Masafumi Yamashita. Pattern formation through optimummatching by oblivious corda robots. In Chenyang Lu, Toshimitsu Masuzawa, and Mohamed Mosbah,editors,
Principles of Distributed Systems , volume 6490 of
Lecture Notes in Computer Science , pages1–15. Springer Berlin Heidelberg, 2010.[8] Nao Fujinaga, Yukiko Yamauchi, Shuji Kijima, and Masafumi Yamashita. Asynchronous pattern for-mation by anonymous oblivious mobile robots. In MarcosK. Aguilera, editor,
Distributed Computing ,volume 7611 of
Lecture Notes in Computer Science , pages 312–325. Springer Berlin Heidelberg, 2012.[9] Giuseppe Prencipe. Impossibility of gathering by a set of autonomous mobile robots.
Theoretical Com-puter Science , 384(2):222–231, 2007.[10] Ichiro Suzuki and Masafumi Yamashita. Distributed anonymous mobile robots: Formation of geometricpatterns.
SIAM J. Comput. , 28(4):1347–1363, 1999.[11] Masafumi Yamashita and Ichiro Suzuki. Characterizing geometric patterns formable by oblivious anony-mous mobile robots.
Theor. Comput. Sci. , 411(26-28):2433–2453, 2010.[12] Yukiko Yamauchi and Masafumi Yamashita. Pattern formation by mobile robots with limited visibility. InThomas Moscibroda and Adele A. Rescigno, editors,
Structural Information and Communication Com-plexity - 20th International Colloquium, SIROCCO 2013, Ischia, Italy, July 1-3, 2013, Revised SelectedPapers , volume 8179 of
Lecture Notes in Computer Science , pages 201–212. Springer, 2013.1013] Yukiko Yamauchi and Masafumi Yamashita. Randomized pattern formation algorithm for asynchronousoblivious mobile robots. In Fabian Kuhn, editor,
Distributed Computing , volume 8784 of
Lecture Notesin Computer Science , pages 137–151. Springer Berlin Heidelberg, 2014.11
Pseudo-code
The algorithm consists of several phases (that are not exactly divided in the same way as in the paper), describedin pseudo-code in algorithm formPattern. Each procedure call has a phase condition. A phase is executed if andonly if its phase condition is not verified. If the condition is verified, the next phase is considered. Each time arobot is activated, it must find the first phase with a condition that is not verified and follow the correspondinginstructions. Each phase is done not to break the previous phase conditions. The condition line 9 is checkedbefore because the movement line 10 breaks the condition of the other phases. Line 6 corresponds to the robotelection. The goal is to select a robot by performing random radial movement in the CEB-set. Lines 18 to 27correspond to the deterministic pattern formation algorithm. For simplicity, our pseudo-code does not handlethe case of a pattern that contains points of multiplicity.
Algorithm formPattern: main algorithm that forms a pattern F if m = ∣ c ( F )∣ > then if F ∖ { c ( F )} is formed then the m robots closest to the center move toward c ( F ) Return else F ⇐ F ∖ { c ( F )} ∪ { m distinct points close to c ( F )} ClosestF ← { smallest elements in F that does not hold C ( F )} ClosestP ← { smallest elements in P } if ClosestP = { r } and ∃ f ∈ ClosestF s.t. P ∖ { r } ≈ F − { f } then r moves toward the closest f else r ← selectARobot () if each point of F is occupied except maybe one of the smallest and the other robots are close to their destinations then Each robot r ≠ r moves toward the closest point in F Return else F ← F where every points of multiplicity m is replaces by m points close to it and on the same circle. P ′ ← P ∖ { r } F ′ ← F ∖ { f } (with f ∈ ClosestF ) Let C , C , . . . , C m be the m circles centered at c ( P ) with decreasing radius, each containing at least one point in F ′ . For each 1 ≤ i ≤ m , let m i = ∣ C i ∩ F ′ ∣ > if ∣ C i ∩ F ′ ∣ = then f ixEnclosingCircle () for i = , , . . . , m do cleanExterior ( i ) locateEnoughRobots ( i ) removeRobotsInExcess ( i ) rotateRobotOnCircle () B Missing Algorithm Details
B.1 Pattern Formation when ∣ C ( F ) ∩ F ′ ∣ = We execute this special phase before executing the first sub-phase of phase 4.3, if ∣ C ( F )∩ F ′ ∣ =
2. If ∣ C ( F )∩ F ∣ = C ( P ) located at the two points in C ( F ) ∩ F , then the following isexecuted.If there are only two robots on C ( P ) , then the greatest robot in interior ( C ( P )) reaches C ( P ) , while re-maining smaller than robots in C ( P ) (see Action locateEnoughRobots ( i ) ). Now, there are at least three robotson C ( P ) . The greatest robot r in C ( P ) moves toward the greatest robot in C ( F ) , the smallest r ′ moves towardthe other point in C ( P ) ∩ F ′ , and the other robots choose evenly distributed destinations between r and r ′ .Those movements are done while keeping C ( P ) and the ordering unchanged. The smallest robot is chosen12 lgorithm handlePartiallyFormedPattern: executed before the robot election to handle configurationthat can create a configuration that verifies in line 9 of the main algorithm if { F r ∩ F cr } is a partition of F such that F cr ≈ P ∖ Q and ∣ Q ∣ − robots in Q are located on an halfline [ c ( P ) , f ) , with f ∈ F r then d ← radius of C ( F r ) d ← min { d ∣ D ( d ) ∩ exterior (D ( d )) ∩ F r = ∅} d ← ( d + d )/ if ∃ r ∈ Q s.t. ∣ r ∣ > d thenif ∃ r ∈ Q s.t. ∣ r ∣ > d thenfor r ∈ Q s.t. ∣ r ∣ > d do r moves radially at distance ∣ d ∣ from c ( P ) else for r ∈ Q s.t. ∣ r ∣ > d do r moves radially at distance ∣ d ∣ from c ( P ) exit Algorithm selectARobot: select a robot
Phase Condition:
There exists a selected robot r s Returned Value: r s if P contains a CEB-set Q with shifted robot then r e ← the shifted robot ε ← the shift angle S ← { r ∈ P ∣ ∣ r ∣ > ∣ r e ∣} if S ≠ ∅ and ε ≠ θ / then r e moves on its circle to create a θ / else if S ≠ ∅ and ε = θ / thenfor r ∈ S do r moves radially at distance ∣ r ∣ from c ( P ) else if ε < θ / then r e moves on its circle to create a θ / else r e moves radially toward c ( P ) to become selected else if P contains a CEB-set Q thenif P ∖ Q ≠ ∅ then d ← min r ′ ∈ P ∖ Q ∣ r ′ ∣ else d ← ∞ handlePartiallyFormedPattern() for r ∈ P doif ∣ r ∣ < min r ∈ Q ∖{ r } ∣ r ∣ then r moves on its circle to create a θ / else if { r ′ ≠ r s.t. ∣ r ′ ∣ < ∣ r ∣} = ∅ then c ← /
2, 0 otherwise if c then r moves a distance ∣ r ∣/ c ( P ) else r moves a distance min ( ( d − ∣ r ∣) , ∣ r ∣) away from c ( P ) else r ← unique robot with maximum view that does not hold C ( P ) if ∃ r ∈ [ r , c ( P )] , P ∪ { r } ∖ { r } is biangular then r moves toward r else r moves toward c ( P ) lgorithm cleanExterior(i): remove robots outside C i Phase Condition: i = ∣ interior ( C i − ∩ exterior ( C i ) ∩ P ′ ∣ = r ← smallest robot in exterior ( C i ) C ← circle centered at c ( P ) that contains r if ∣ C ∩ P ∣ > then r moves toward c ( P ) without reaching the circle of another robot nor C i else a ← max r ′ ∈ C i ang ( r , c ( P ) , r ′ ) if ang ( r , c ( P ) , r ) > a then r moves toward c ( P ) to reach C i else r moves on C i in the direct orientation to have an angle ( π + a )/ Algorithm locateEnoughRobots(i): locate enough robots on C i Phase Condition: ∣ C i ∩ P ′ ∣ ≥ m i r ← greatest robot in interior ( C i ) C ← circle centered at c ( P ) that contains r if ∣ C ∩ P ∣ > then r moves away from toward c ( P ) without reaching the circle of another robot nor C i else a ← min r ′ ∈ C i ang ( r , c ( P ) , r ′ ) if ang ( r , c ( P ) , r ) < a then r moves away from c ( P ) to reach C i else r moves on C i in the indirect orientation to have an angle a / Algorithm removeRobotsInExcess(i): remove robot in excess on C i Phase Condition: ∣ C i ∩ P ′ ∣ = m i // Where Poly ( a , b ) denotes the set of vertice of the regular a-gon centered at c ( P ) that have the line c ( P ) r as axis of symmetry union bpoints evenly distributed in the arc between angle and π / a if i > then r ← smallest robot on C i r moves toward c ( P ) without reaching the circle of another robot else if robots the m greatest robots on C forms Poly ( m , ) then r ← smallest robot on C r moves toward c ( P ) without reaching the circle of another robot else robots on C form Poly ( m , ∣ P ∩ C ∣ − m ) Algorithm rotateRobotOnCircle: move the robots on their circle to reach their final destination
Phase Condition: F ′ = P ′ Let r , . . . , r n − be the robots in P ′ in the lexicographic order of their polar coordinates in the global coordinate system.Let d , . . . , d n − be the point of F ′ in the lexicographical order of their polar coordinates in the global coordinate system. for i = , . . . , n − do A ← the arc of the circle of r i delimited by r i and d i that does not contains the point of angle 0 if A ∩ P ′ ≠ ∅ then c ← closest robot in A ∩ P ′ d ← point of A in the middle r i and cA ← the arc of the circle of r i delimited by r i and d if r i ∈ C ( P ) and then d ← the farthest point on A so that C ( P ) does not change r i moves on A toward d lgorithm fixEnclosingCircle: locate the robot of C ( P ) ∩ P ′ on C ( P ) ∩ F ′ when ∣ C ( F ) ∩ F ′ ∣ = Phase Condition: ∣ C ( F ) ∩ F ′ ∣ ≠ C ( P ) located on the two point of C ( F ) ∩ F ′ if ∣ C ( P ) ∩ P ′ ∣ = then r ← greatest robot in interior C ( P ) C ← circle centered at c ( P ) that contains r if ∣ C ∩ P ∣ > then r moves away from toward c ( P ) without reaching the circle of another robot nor C ( P ) else a ← min r ′ ∈ C ( P ) ang ( r , c ( P ) , r ′ ) if ang ( r , c ( P ) , r ) < a then r moves away from c ( P ) to reach C ( P ) else r moves on C ( P ) in the indirect orientation to have an angle a / else r ← greatest robot in C ( P ) r ′ ← smallest robot in C ( P ) if r and r ′ are located the points of C ( P ) ∩ F ′ then r ′′ ← second smallest robot in C ( P ) ∩ P ′ r ′′ moves toward c ( P ) without reaching the circle of another robot else Let r , . . . , r k be the other robots in C ( P ) ∩ P ′ in the lexicographical order of their polar coordinates // perform the following movements while preserving C ( P ) and the ordering of robotsr moves on C ( P ) toward the greatest point in C ( P ) ∩ F ′ r ′ moves on C ( P ) toward the smallest point in C ( P ) ∩ F ′ for i = , . . . , j do a ← ang ( r , c ( P ) , r ′ ) + i × ( ang ( r , c ( P ) , r ′ ) + ang ( r , c ( P ) , r ))/( j + ) r i moves on C ( P ) toward the point in C ( P ) ∩ F ′ with angle a for r ′ instead of the second greatest so that no robot can prevent r ′ to reach the smallest point in C ( P ) ∩ F ′ ,especially if it has a null angle. Once r and r ′ reach their destination, the other robots can leave C ( P ) , startingfrom the smallest. Those last movements change the ordering of r , so that it becomes the second greatest robot. B.2 Almost Pattern Formation
Reach the Correct Circle.
This sub-phase consists in moving robots so that there is the right number of robotson each circle centered at c ( P ) . Let C , C , . . . , C m be the m circles centered at c ( P ) with decreasing radius,each containing at least one point in F ′ . For each 1 ≤ i ≤ m , let m i = ∣ C i ∩ F ′ ∣ >
0. We have ∑ mi = m i = ∣ F ′ ∣ = n − r ) move on their circle followingthe direct orientation while preserving the order ( i.e. , without reaching another robot), so that no robot has a nullangle (except r ). This is required for proper operation of action ii ) , defined below. Also, if m =
2, since tworobots cannot move on C ( P ) synchronously to keep C ( P ) unchanged, we need to execute a special procedure(see subsection B.1) to ensure that the two robots are located at the two points of C ( P ) ∩ F ′ , keeping C ( P ) unchanged. Informally, this procedure moves another robot on C ( P ) if there are only two robots on it, then thetwo greatest robots reach their destination point in C ( P ) ∩ F ′ . Then, the other robots can leave safely C ( P ) .From now on, we suppose that if m =
2, then C already contains two robots located at their correspondingpoint in F .Recursively, we move robots such that each circle C i contains exactly m i robots. We define the followingprocedure for a given i , 1 ≤ i ≤ m . The procedure executes three actions sequentially and assumes, if i >
1, that ∣ interior ( C i − ) ∩ P ′ ∣ = ∑ mj = i m j . i) cleanExterior(i): If i >
1, moves robots so that interior ( C i − ) ∩ exterior ( C i ) ∩ P ′ =∅ : the smallest robotin exterior ( C i ) moves to C i while it remains greater than robots already in C i . To do so, it can moves alittle toward c ( P ) , so that there is no other robot in its circle, then moves on its circle so that its angle isgreater than the angles of robots in C i , and finally moves radially toward c ( P ) to reach C i ( e.g. , movementof robot r in Figure 2b). If i = m , we also ensure that its angle is less than 2 π − ang ( r , c ( P ) , r ) , in order15ot to break the guided configuration. We repeat this procedure until there are no more robots between C i − and C i ( e.g. , movement of robots r and r in Figure 2b). ii) locateEnoughRobots(i): Move robots so that ∣ C i ∩ P ′ ∣ ≥ m i : we have ∣ interior ( C i ) ∩ P ′ ∣ ≥
1. Indeed, if i = ∣ interior ( C ) ∩ P ′ ∣ = m − ∣ C ∩ P ′ ∣ ≥
1, otherwise, there are by hypothesis at least m i robots inside C i − , and after performing action i ) , theses robots are not between C i and C i − . The greatest robot in interior ( C i ) now moves to C i while remaining smaller than robots already in C i . To do so, it can move alittle away from c ( P ) so that no other robot remains in its circle, then move on its circle so that its angleis smaller than the angles of robots in C i (but not null), and finally move radially away from c ( P ) to reach C i ( e.g. , movement of robot r in Figure 2b). iii) removeRobotsInExcess(i) Move robots so that ∣ C i ∩ P ′ ∣ ≤ m i : the smallest robot in C i moves a littletoward c ( P ) (here, “a little” means a small distance such that the order is preserved, i.e. , the robot doesnot reach the circle of another robot nor C i + ). We repeat this process until there are exactly m i robots on C i .If i =
1, make sure that C ( P ) does not change. (see Figures 2d and 2e). However, we know that m ≥ m greatest robots r n , . . . , r n − m remain on C , and have to be the only robots to hold C ( P ) . To do so,the angles formed by two consecutive robots in { r n , . . . , r n − m } have to be smaller than, or equal to π . Thisis obtained by moving the robots on C , while preserving the ordering and C ( P ) , such that r n , . . . , r n − m form the regular m -gon that has the line c ( P ) r as an axis of symmetry (see Figure 2d). At the sametime, if the m -gon is not formed yet, other robots in C move on C to be evenly distributed in the arcbetween angle 0 and π / m (see the blue arc in Figure 2d), again while preserving the ordering and C ( P ) .Overall, each robot on C has a deterministic (and non-blocking) destination. Once the m -gon is formed(even if some other robots are still moving), the smallest robot in C ( P ) ∩ P moves a little toward c ( P ) (see Figure2e). This is repeated until only r n , . . . , r n − m remain on C .After executing those actions for i = , , . . . , m , each circle contains the proper number of robots i.e. , there are m i robots on C i . B.3 Robot Election Pre-phase
This pre-phase is executed before the robot election, i.e. , when the current configuration P contains a CEB-set Q of cardinal m . Before executing the robot election algorithm, a robot checks if the current configurationsatisfies the following conditions:i) the pattern can be rotated so that robots in P ∖ Q are located at points in F ,ii) among the m remaining points of F , denoted F r , at least m − m − Q .If those conditions are not both satisfied, the robot election is performed as previously described. Otherwisethree cases can happen. Let d be the radius of the smallest circle enclosing F r . If D ( d ) ∩ F r ≠ ∅ , let d be thesmallest radius such that D ( d ) ∩ exterior (D ( d )) ∩ F r = ∅ , otherwise let d = d . Also, let d = ( d + d )/ D ( a ) denotes the open disc centered at c ( P ) of radius a )In the first case, at least one robot r satisfies ∣ r ∣ > d . Then, all such robots move toward c ( P ) to reach thecircle of radius d . After each robot reaches its destination, either the whole configuration forms F , or P fromwhich we remove the robot with maximum view form F from which we remove a point with maximal view(the configuration is associated with the termination phase), or the configuration is still with the same phaseand satisfies the second or the third case. If the configuration is no more associated with the same phase, thenthe configuration is static.In the second case, at least one robot r satisfies ∣ d ∣ ≥ ∣ r ∣ and ∣ r ∣ > ∣ d ∣ . Then, all such robots move toward c ( P ) to reach the circle of radius d . After each robot reaches its destination, the configuration satisfies the third16ase. During this phase the configuration is associated with the same phase since no robot reaches a point in F r . In the third case, the robots in Q are at most at distance d from c ( P ) . Then the robot election proceeds aspreviously described, except that a robot with destination p such that ∣ p ∣ ≥ d does not move. During this phasethe configuration is associated with the same phase. Indeed, if d ≠ d , then there is at least one point in F r that does not contain a robot (and it is not a point with maximum view since some points are closer to c ( P ) ),otherwise (all points in F r are at distance d to c ( P ) ), there are at least two robots inside D ( d ) (because thewhole configuration associated with this phase) and they cannot reach the circle of radius d . B.4 Formation of a Guided Configuration 2 If P does not have a CEB-set, then, by Theorem 2, ρ ( P ) = P has a unique smallest robot r . Therobots check if there is a position in the segment [ r , c ( P )) such that the whole configuration is equiangular orbiangular (possibly with a shifted robot). If it is the case, the first such point in the path becomes the destinationof r . Otherwise, r is ordered to move toward the center until the configuration becomes guided. The resultingconfigurations cannot have a CEB-set (except if it is the whole configuration) since P does not contain one and r performs a radial movement. Starting from a static initial configuration, once the configuration is guided, oronce CEB ( P ) = P , all robots are static. Thus we have the following Lemma. Lemma 5.
After executing the
FCB2 phase, the configuration is static and associated with either the
FCB1 phase or the
Almost Pattern Formation . C Omitted Proofs
Lemma 1 (restated) . The
Termination phase terminates on a configuration P ≈ F.Proof.
The phase is executed when the configuration is ordered and every point of F is occupied. If F containspoints of multiplicity, and if a robot r , distinct from r , is not located at a point of F , then r is close to a pointof F i.e. , there is a unique point f ∈ F in its circle such that ang ( f , c ( P ) , r ) ≤ α ( F )/
4. In this case, r movestoward f while remaining on its circle. So that in finite time r is the only robot not located at a point of F .No we assume that r is the only robot not located on its destination in F . Let P ′ = P ∖ { r } and fora multiset A , let U ( A ) the set obtained from A by removing the multiplicity information. The configurationformed by the visible robots U ( P ′ ) may be symmetric even if P ′ is not. So there may be multiple possibledestinations p for r such that U ( P ′ ) ∪ { p } is similar to U ( F ) (one can observe that all the possible destinationare all at the same distance to the center). We have to show that the closest possible destination is the onlyremaining point in F where a robot is missing i.e. , one of the smallest point of F in the partial ordering. Ifthe smallest point of F is a point of multiplicity, then r is already located on it and so, from the definition ofa guided configuration (the configuration was guided before a point of multiplicity appeared), r is the uniquerobot that minimize the distance to the center of the configuration and such that2 ang ( r , c ( P ) , r ) < min f ≠ f , ∣ f ∣=∣ f ∣ ang ( f , c ( F ) , f ) (1)So that r can locate r and move toward it. Otherwise, if the smallest point f of F is isolated, r can stilldetect the position of r = f . Moreover, by definition of the partial ordering, ang ( f , c ( P ) , f ) is minimalso that the destination of r is the destination closest to r . Also, since f and r are on the same side of thehalf line [ c ( P ) , r ) (because their positions relative to the half line depend on the orientation of the guidedconfiguration) and since all the possible destinations for r are on the same circle, then the closest destinationto r is also the closest destination to r (see Figure 3). While moving toward its destination, r still satisfycondition (1) so that r still detect r in the next activation. (cid:3) emma 2 (restated) . After the
Almost Pattern Formation phase, each robot in P ′ reaches its destination in F ′ ,and the Termination phase is executed.Proof.
After executing the three actions cleanE xterior ( i ) , locateEnoughRobots ( i ) , and removeRobotsInE xcess ( i ) for a given i , we have m i robots on C i and ∣ interior ( C i ) ∩ P ′ ∣ = ∣ interior ( C i − ) ∩ P ′ ∣ − m i = ∑ mj = i + m j , so that wecan execute the same procedure with i +
1. If i < m it is important to observe that some robots (those ordered tomove in the last two cases) may still be in movement, but since they are now strictly between C i and C i + , theyreceive a new order with deterministic destination when executing the procedure with i +
1. Hence, at the endof the procedure with i = m , all robots are static.After executing those actions for i = , , . . . , m , each circle contains the proper number of robots i.e. , thereare m i robots on C i .Then, we have to prove that when reaching their final destinations on their circles, the robots does not createa deadlock and does not change C ( P ) . First we show that there is no deadlock. Suppose we have on a circle C , m robots r < r < . . . < r m and m destinations d < d < . . . < d m . r i has destination d i and moves towardit (staying on C ) in the direct orientation if r i < d i and in the indirect orientation otherwise. For the sake ofcontradiction, suppose that r i < d i and r i cannot reach d i , even after an infinite number of activation. we observethat, to block r i , r i + must satisfy r i < r i + ≤ d and r i + is not able to free the way for r i + . This implies that r i + ≤ r i + ≤ d . Recursively, this means that r m ≤ d . But nothing blocks r m to reach d m when r m ≤ d m , acontradiction.Now suppose for the purpose of contradiction that C ( P ) is modified. This means that there exist two robots r and r ′ on C that form an angle greater than π . Before C ( P ) is modified, they form an angle of at most π ,so that one robot’s movement on C in the direct orientation, and the other’s movement on C in the indirectorientation. This is possible only if there is no point in F on C between r and r ′ , which is a contradiction withthe fact that C ( P ) = C ( F ) . (cid:3) Lemma 3 (restated) . The following properties hold: (i) eventually one robot is aware it is elected with proba-bility one, and (ii) once a robot is aware it is elected, another robot cannot be elected.Proof. i)
Suppose first that robots always reach their destination. Initially the configuration is in a state wherethere are at least two robots whose location (or destination for those that are moving) are the closest to thecenter. Let r be the first (or one of the first) activated robot among them. With probability 1 /
2, it chooses tomove toward the center. Let r ′ be another robot among them. If r ′ is activated after r begins its movement, r ′ does not move, otherwise it moves away from the center with probability 1 /
2. So with probability greaterthan 1 / n , regardless of the scheduler’s choices , r is the only robot to move toward the center. After that, ifanother robot is activated before the next activation of r , it does not move. At the next activation of r , withprobability 1 / r chooses to move toward the center and becomes elected (and r is aware it is elected when it isnext activated since the other robots are static). So, with probability greater than 1 / n + , r is aware it is elected.If this does not happen, i.e. , if the first or the second choice of r is to move away the center or if another robotchose to move toward the center, then the configuration gets back to its initial state. So, since the probability ofsuccess is constant (for a given n ), eventually a robot is aware it is elected with probability one. Now, if robotsdo not always reach their destinations, the probability that r moves by a distance d toward the center (to becomeelected), is 1 / ⌈ d δ ⌉ , instead of 1 / r needs to choose ⌈ d δ ⌉ times to move toward the center. The probability that one of the other robotchooses to move away is still 1 /
2. So that there is again a non null probability (greater than 1 / n +⌈ d δ ⌉ ) that arobot is elected, which implies that eventually a robot is aware it is elected with probability one. ii) Once a robot r e is elected, the other robots are currently either moving away, not moving, or movingtoward the center by a distance at most the eighth of their distance to the center. In each case, when anotherrobot looks again (after it finishes its movement) it sees that the robot r e is the only closest robot to the center,and then it chooses not to move. Indeed, if another robot r is moving toward the center, it is by a distance atmost ∣ r ∣/
8. Since we have ∣ r e ∣ < ∣ r ∣ when r started its movement, we have ∣ r e ∣ < ∣ r ∣ after r finishes it. After r ’s18ovement, r e is maybe no longer elected, but since r e was aware it was elected, it already chooses to move onits circle to create a 1 / (cid:3) Lemma 4 (restated) . After executing the
FCB1 phase, the configuration is static and associated with either the
Termination phase or the
Almost Pattern Formation (in finite time with probability one).Proof.
We proved in Lemma 3 that a unique robot is elected with probability one. During the robot electionthe configuration still has the same CEB-set and we cannot have ∣ r ∣ ≤ ∣ r ∣/ r isshifted, no robot is located to a point (or has a destination) p such that ∣ p ∣ = ∣ r ∣ , so that every other robot in theCEB-set receives a new destination when it sees that the configuration contains a CEB-set with a shifted angle θ /
8. The shifted robot increases the shift angle from θ / θ / θ / θ /
4, it moves toward the center and the other robots remain static. When theshifted robot r stops i.e. , when ∣ r ∣ = min (∣ r ∣ , ∣ f ∣)/
2, the configuration is guided and all the robots are static. (cid:3)
C.1 Proof of Theorem 2
The following algorithm presents the construction of the CEB-set when the configuration P is regular or sym-regular (but not equiangular or biangular) Algorithm constructCEBSet: Q = ∅ Ignore ← ∅ while P ∖ ( Ignore ∪ Q ) ≠ ∅ do Let S be the set of smallest robots in P ∖ ( Ignore ∪ Q ) according to the partial ordering of robot if Q ∪ S holds P then Ignore ← Ignore ∪ S else if Q ∪ S is equiangular or biangular then Q ← Q ∪ S else stop Theorem 2 (restated) . For a configuration P, if ρ ( P ) > , then P has a unique, non-empty, CEB-set.Proof. If ρ ( P ) >
1, then the configuration is regular or sym-regular. If P is biangular or equiangular, then CEB ( P ) = P . Otherwise, if P is regular, then the first set S in the construction of Q (algorithm constructCEB-Set) does not hold P , so S is added to Q , which becomes non-empty. If P is sym-regular and not regular, thenthe set S of smallest robots always contains one or two robots. Since n ≥
5, the while loop is executed at leastthree times. As we cannot have three disjoints subset of P that hold P , Q is not empty. (cid:3) C.2 Uniqueness of the shifted robot
Let P be a n -robot configuration with n ≥ θ ( P ) is the minimum angle between two robots in P , centered atthe center c ( P ) . We show that, for a shifted robot to be unique, it is su ffi cient that the shift angle is at most θ ( P )/
2, and the orientation of the shift (the inverse of the orientation where we have to rotate the robot to createa CEB-set configuration) must reduce the minimum angle it forms with the other robots of the configuration.In the sequel, let W ( P ) denote the position of the Weber point of set P . Lemma 6.
Let P be a n-robot configuration and P ′ = P ∖ { r } ∪ { r ′ } . If —→ u = ———————→ W ( P ′ ) W ( P ) , then for any pointp ∈ P ∖ { r } , we have: cos ( ang (—→ u , ———→ W ( P ) r )) − cos ( ang (—→ u , ————→ W ( P ′ ) r ′ )) ≥ cos ( ang (—→ u , ————→ W ( P ′ ) p )) − cos ( ang (—→ u , ————→ W ( P ) p )) roof. It is known that W ( P ) is such that ∑ p ∈ P —→ v p = —→ v p is the normalized vector —→ v p = ———→ W ( P ) p ∣ W ( P )− p ∣ , or any vector such that ∣∣ v p ∣∣ ≤ p = W ( P ) . The equality istrue by taking only the —→ u component of each vector, which implies ∑ p ∈ P cos ( ang (—→ u , ————→ W ( P ) p )) = ( ang (—→ u , ————→ W ( P ) p )) can be any number in [− , ] if p = W ( P ) . The same equalityholds in P ′ . By subtraction, we get:cos ( ang (—→ u , ———→ W ( P ) r ))− cos ( ang (—→ u , ————→ W ( P ′ ) r ′ )) = ∑ p ∈ P ∖{ r } cos ( ang (—→ u , ————→ W ( P ′ ) p ))− cos ( ang (—→ u , ————→ W ( P ) p )) (2)One can observe that, for every point p ∈ P ∖ { r } , we have:cos ( ang (—→ u , ————→ W ( P ′ ) p )) ≥ cos ( ang (—→ u , ————→ W ( P ) p )) so that each term in the sum of the right hand side of equation (2) is positive, which implies that the left handside is not smaller than each term in the right hand side, Q.E.D. (cid:3) Lemma 7.
Let P be a n-robot configuration and P ′ = P ∖ { r } ∪ { r ′ } , with θ = ang min ( r , W ( P ) , r ′ ) ≤ θ ( P ) , and ∣ r ′ ∣ W ( P ) = ∣ r ∣ W ( P ) = min p ∈ P ∣ p ∣ W ( P ) . We have ∀ p ∈ P, ang min ( W ( P ) , p , W ( P ′ )) < θ .Proof. For this lemma, we assume that all angles are computed using a global orientation such thatang min ( r , W ( P ) , r ′ ) = ang ( r , W ( P ) , r ′ ) . Also we define —→ u = ———————→ W ( P ′ ) W ( P ) and —→ arg p ( r ) = arg (—→ u , —→ pr ) From the previous lemma, we have:cos (—→ ang W ( P ) ( r )) − cos (—→ ang W ( P ′ ) ( r ′ )) ≥ cos (—→ ang W ( P ′ ) ( p )) − cos (—→ ang W ( P ) ( p )) (3)With the notations of Figure 4: cos ( τ ) − cos ( τ + θ − γ ) ≥ cos ( β ′ ) − cos ( β ′ + γ ′ ) (4)We observe that π ≤ —→ arg W ( P ) ( r ) < —→ arg W ( P ′ ) ( r ′ ) is not possible, because this would mean that the half-lines HL ( W ( P ) , r ) and HL ( W ( P ′ ) , r ′ ) intersect, which is not possible.We can have three cases: The case —→ arg W ( P ) ( r ) ≤ π < —→ arg W ( P ′ ) ( r ′ ) : then cos (—→ arg W ( P ) ( r )) − cos (—→ arg W ( P ′ ) ( r ′ )) ≤ cos (—→ arg W ( P ) ( r )) + < − cos ( θ ) On the other hand, if arg min ( W ( P ) , p , W ( P ′ )) ≥ θ , we have:cos (—→ arg W ( P ′ ) ( p )) − cos (—→ arg W ( P ) ( p ) ≥ − cos ( arg min ( W ( P ) , p , W ( P ′ ))) ≥ − cos ( θ ) which contradicts Equation 3, then we have arg min ( W ( P ) , p , W ( P ′ )) < θ . The case —→ arg W ( P ′ ) ( r ′ ) < π < —→ arg W ( P ) ( r ) : again, we have cos (—→ arg W ( P ) ( r )) − cos (—→ arg W ( P ′ ) ( r ′ )) ≤ − cos (—→ arg W ( P ′ ) ( r ′ )) < − cos ( θ ) arg min ( W ( P ) , p , W ( P ′ )) < θ . The case —→ arg W ( P ) ( r ) < —→ arg W ( P ′ ) ( r ′ ) ≤ π : This case corresponds to the configuration shown in Figure 4. Usingthe notations of the figure, we want to prove that γ ′ < θ for any position of r , r ′ , W ( P ) , W ( P ′ ) , and p (for anarbitrary p ∈ P ∖ { r } ) verifying the conditions of the lemma. Like in previous cases, we suppose that γ ′ ≥ θ andwe reach a contradiction.For simplicity, we suppose that ∣ W ( P ) − r ∣ = τ , γ , θ , τ ′ and the distance l = ∣ W ( P ) − p ∣ rather that the positions of the points. To this purpose, we start by givingthe distance ω = ∣ W ( P ) − W ( P ′ )∣ with respect to the angles τ , γ , and θ using the law of sinus: ω ( τ, γ, θ ) = sin ( γ ) sin ( τ + θ − γ ) Then, the angle β ′ is computed using the law of sinus: β ′ ( τ, γ, θ, l , γ ′ ) = β ′ ( τ, γ, θ, l , γ ′ ) = arcsin ( l sin ( γ ′ ) ω ( τ, γ, θ ) ) or β ′ ( τ, γ, θ, l , γ ′ ) = β ′ ( τ, γ, θ, l , γ ′ ) = π − β ′ ( τ, γ, θ, γ ′ , l ) which exists only if ω ( τ, γ, θ ) ≥ l sin ( γ ′ ) . Then, we define f : f ∶ ( τ, γ, θ, l , γ ′ , i ) ↦ cos ( β ′ i ( τ, γ, θ, l , γ ′ )) − cos ( β ′ i ( τ, γ, θ, l , γ ′ ) + γ ′ ) − ( cos ( τ ) − cos ( τ + θ − γ )) The domain of definition of f is such that θ ∈ [ , π / ] , γ ∈ [ , θ ) , τ ∈ [ , π − θ ] , l ≥ γ ′ ∈ [ , π / ] , i ∈ { , } ,and ω ( τ, γ, θ ) ≥ l sin ( γ ′ ) . In the sequel, except stated otherwise, f ( τ, γ, θ, γ ′ , l , i ) denotes the image by f of anarbitrary tuple ( τ, γ, θ, γ ′ , l , i ) in its definition domain. We want to show that if γ ′ ≥ θ , then f ( τ, γ, θ, γ ′ , l , i ) > γ ′ ≥ θ . The followingclaims 1 and 3 prove the lemma. Claim 1: if ω ( τ, γ, θ ) >
1, then f ( τ, γ, θ, l , γ ′ , i ) >
0. First, if ω ( τ, γ, θ ) >
1, we can use a simple lower bound:cos ( β ′ ( τ, γ, θ, l , γ ′ ) − γ ′ ) − cos ( β ′ ( τ, γ, θ, l , γ ′ )) ≥ − cos ( γ ′ ) > − cos ( θ ) Also, ω ( τ, γ, θ ) > ( γ ) > sin ( τ + θ − γ ) , which in turn implies that γ > τ + θ − γ . Then we have: θ > γ > τ + θ − γ > τ so that 1 − cos ( θ ) ≥ cos ( τ ) − cos ( τ + θ − γ ) ⇒ f ( τ, γ, θ, l , γ ′ , i ) > Claim 2: if ω ( τ, γ, θ ) ≤
1, The minimum of f is the minimum of f ∶ ( τ, γ, θ ) ↦ f ( τ, γ, θ, , θ, ) . We want toshow that the minimum of f is reached when γ ′ is minimum ( i.e. , when γ ′ = θ ), when l =
1, and with i = l > ω ( τ, γ, θ ) , then β ′ = β ′ ( τ, γ, θ, l , γ ′ ) ≥ γ ′ . First, we have:cos ( β ′ ) − cos ( β ′ + γ ′ ) = cos ( π − β ′ ) − cos ( π − β ′ + γ ′ ) = cos ( β ′ − γ ′ ) − cos ( β ′ ) Since β ′ ≤ π /
2, from the concavity of the cosine in [ , π / ] and, if β ′ + γ ′ > π /
2, from the symmetry of thecosine with respect to π /
2, we have:cos ( β ′ − γ ′ ) − cos ( β ′ ) ≤ cos ( β ′ ) − cos ( β ′ + γ ′ ) So that the minimum of f is obtained with i =
2. Moreover, since π / ≥ β ′ ≥ β ′ ( τ, γ, θ, l , θ ) ( β ′ ) − cos ( β ′ + γ ′ ) = cos ( β ′ − γ ′ ) − cos ( β ′ ) ≥ cos ( β ′ ( τ, γ, θ, l , θ ) − γ ′ ) − cos ( β ′ ( τ, γ, θ, l , θ ))≥ cos ( β ′ ( τ, γ, θ, l , θ ) − θ ) − cos ( β ′ ( τ, γ, θ, l , θ )) Finally, again, by concavity of the cosine, since β ′ ( τ, γ, θ, l , θ ) ≤ β ′ ( τ, γ, θ, , θ ) , we have:cos ( β ′ ( τ, γ, θ, l , θ ) − θ ) − cos ( β ′ ( τ, γ, θ, l , θ )) ≥ cos ( β ′ ( τ, γ, θ, , θ ) − θ ) − cos ( β ′ ( τ, γ, θ, , θ )) So that f ( τ, γ, θ, l , γ ′ , i ) ≥ f ( τ, γ, θ, , θ, ) = f ( τ, γ, θ ) . Claim 3: if ω ( τ, γ, θ ) ≤
1, then f ( τ, γ, θ ) >
0. Let f τ ∶ τ ↦ f ( τ, γ, θ ) for fixed γ and θ . By analyzing Function f τ , we observe that f τ is increasing and then decreasing, so that the minimum of f τ is obtained with the greatestor smallest possible value of τ . For fixed θ ≤ π /
4, and γ ≤ θ , we must have τ ≤ π − θ and τ ≥ γ − θ (because ω ( τ, γ, θ ) ≤ γ and θ are chosen in the definition domain of f ): ∀ γ, ∀ θ, f ( π − θ, γ, θ ) = − cos ( θ ) + cos ( θ ) − cos ( γ ) > ∀ γ, ∀ θ, f ( γ − θ, γ, θ ) = − cos ( θ ) − cos ( γ − θ ) + cos ( γ ) > cos ( γ ) − cos ( θ ) > (cid:3) Lemma 8.
Let P be a n-robot configuration. Suppose the robots are indexed in the clockwise order r , r , . . . ,r n around the Weber point W ( P ) . Let P ′ = P ∖ { r } ∪ { r ′ } , with ang min ( r , W ( P ) , r ′ ) ≤ θ ( P )/ and ∣ r ′ ∣ W ( P ) =∣ r ∣ W ( P ) = min i ∈[ , n ] ∣ r i ∣ W ( P ) . Then, the robots in P ′ are ordered in the same way as in P around W ( P ′ ) (with r ′ instead of r).Proof. Using the same notation as the previous lemma, we define —→ u = ———————→ W ( P ′ ) W ( P ) and —→ arg p ( r ) = arg (—→ u , —→ pr ) .We suppose that the ordering of the robots in P is such that —→ arg W ( P ) ( r i ) < —→ arg W ( P ) ( r i + ) , for all i ∈ [ .. n − ] (a circular permutation of the ordering can make this true).For all i ∈ [ .. n ] , let r ′ i = r i if r ≠ r i , otherwise let r ′ i = r ′ . We now show that r ′ , . . . , r ′ n is an ordering of therobots in P ′ around W ( P ′ ) . If r ≠ r i and r ≠ r i + , we have: —→ arg W ( P ′ ) ( r ′ i ) < —→ arg W ( P ) ( r i ) + θ ( P )/ ≤ —→ arg W ( P ) ( r i + ) − θ ( P )/ θ ( P )≤ —→ arg W ( P ′ ) ( r ′ i + ) from Lemma 7If r = r i + , resp. r = r i , then we have —→ arg W ( P ) ( r ) < —→ arg W ( P ′ ) ( r ′ ) , resp. —→ arg W ( P ′ ) ( r ′ ) < —→ arg W ( P ) ( r ) + θ ( P ) , so thatthe previous inequality holds.Overall, —→ arg W ( P ′ ) ( r ′ i ) < —→ arg W ( P ′ ) ( r ′ i + ) for all i ∈ [ .. n − ] , and the ordering is preserved. (cid:3) Theorem 5.
Let P be a n-robot (n ≥ ) biangular configuration that contains a shifted robot. The shifted robotis unique.Proof. Let P be a biangular configuration with a shifted robot r (resp., r ′ ), associated to the biangular set P bi = P ∖ { r } ∪ { r bi } (resp., associated to the biangular set P ′ bi = P ∖ { r ′ } ∪ { r ′ bi } ). For the sake of contradiction,we suppose that r ≠ r ′ . From Lemma 8, the ordering is unchanged between P , P bi and P ′ bi . So, let r , . . . , r n
22e any ordering of robots in P around W ( P ) . An ordering of robots in P bi (resp., P ′ bi ) is obtained by replacing r = r i by r bi (resp., r ′ = r i ′ by r ′ bi ).If n ≥ P is equiangular, there are 3 robots in P bi ∩ P ′ bi ordered in the same way around the center ofequiangularity. Their angles are uniquely determined by the di ff erence between their indexes, indeed we have:ang ( r i , W ( P ) , r j ) = ang ( r i , W ( P ′ ) , r j ) = ∣ i − j ∣ π n Let arc α ( a , b ) be the set of points p such that ang ( a , p , c ) = α . arc α ( a , b ) is a circular arc from a to b . Twocircular arcs intersect in at most two points, so that there is at most one point p ∉ { a , b , c } in arc α ( a , b ) ∩ arc β ( b , c ) . This implies that that three robots are enough to deduce the position of the unique possible center ofequiangularity of P bi and P ′ bi . With a given center, there cannot be two shifted robots. Indeed, if c ( P bi ) = c ( P ′ bi ) ,then the angles formed with r ′ and the other robots are the same as the robot r ′ bi and ∣ r ′ bi ∣ c ( P ′ bi ) = ∣ r ′ ∣ c ( P ′ bi ) i.e. , r ′ = r bi .If n ≥ P is biangular, there are 3 robots in P bi ∩ P ′ bi whose di ff erence between indexes are even, andthe previous argument holds.The last case to consider is when n = P is biangular. In this case, if there are 3 robots in P bi ∩ P ′ bi whosedi ff erence between indexes are even, then the previous argument holds. Otherwise, without loss of generality,either { r , r , r , r } ∈ P bi ∩ P ′ bi or { r , r , r , r } ∈ P bi ∩ P ′ bi .In the first case, the center of biangularity is the unique point of intersection of arc π / ( r , r ) with arc π / ( r , r ) . Indeed, the intersection is unique due to the ordering of robots.In the second case, there can be two intersection points between arc π / ( r , r ) and arc π / ( r , r ) . Wesuppose r = r and r ′ = r . Let α ≤ β , resp. α ′ ≤ β ′ , the two angles in the string of angles S A c ( P bi ) ( P bi ) , resp. S A c ( P ′ bi ) ( P ′ bi ) . For simplicity, we can suppose that α = arg ( r , c ( P bi ) , r bi ) .On the one hand, the robot r must be shifted in the orientation that decreases its angle with respectto the other robots i.e. , decreasing its angle with r . On the other hand, r is in P ′ bi so that r must verifyarg ( r , c ( P ′ bi ) , r ) = π /
3. In particular, this implies that arg ( r , c ( P ′ bi ) , r ) < arg ( r , c ( P bi ) , r bi ) so that α ′ < α .Applying the same argument with r ′ leads to the contradiction α < α ′ < α . (cid:3) Theorem 3 (restated) . Let n ≥ , and P be a n-robot configuration that contains a CEB-set with a shifted robot.Then, the shifted robot is unique.Proof. Let P be a n -robot configuration that contains a CEB-set Q with a shifted robot. If the whole configura-tion is biangular, Theorem 5 implies the result.Otherwise, the configuration is regular or sym-regular, the center is the center of S EC ( P ) , and, even ifdi ff erent robots can be considered as shifted (when ∣ Q ∣ < (cid:3) < θ / c ( P ) r r f (a) part of a guided configuration, lo-cated near the center. C C r r r r r r r r r r (b) Execution of functions locateEnoughRobots ( i ) and cleanExterior ( i ) C C r r (c) Execution of function rotateRobotOnCircle C C r r r r r r r (d) Execution of removeRobotsInExcess ( i ) when i = C C r r ( )( ) r r r r r (e) Execution of removeRobotsInExcess ( i ) when i = r moves toward c ( P ) . Then r moves a little toward c ( P ) . Figure 2: Illustration of the pattern formation algorithm24 θ / c ( P ) r r = f Figure 3:
The blue region represents the possible location of f . The red region represent the other possible locations of f (based on the position of the visible robots U ( P ) ). Figure 4: Part of the configuration P , for the proof that γ ′ cannot be greater than θθ