Fault-tolerant gathering of asynchronous oblivious mobile robots under one-axis agreement

Fault-tolerant gathering of asynchronous oblivious mobile robots under one-axis agreement

Journal of Discrete Algorithms 36 (2016) 50–62 Contents lists available at ScienceDirect Journal of Discrete Algorithms www.elsevier.com/locate/jda ...

481KB Sizes 0 Downloads 49 Views

Journal of Discrete Algorithms 36 (2016) 50–62

Contents lists available at ScienceDirect

Journal of Discrete Algorithms www.elsevier.com/locate/jda

Fault-tolerant gathering of asynchronous oblivious mobile robots under one-axis agreement ✩ S. Bhagat a , S. Gan Chaudhuri b , K. Mukhopadhyaya a,∗ a b

ACM Unit, Indian Statistical Institute, West Bengal, India Department of Information Technology, Jadavpur University, West Bengal, India

a r t i c l e

i n f o

Article history: Available online 30 October 2015 Keywords: Gathering Crash fault Asynchronous Oblivious Swarm robots Obstructed visibility

a b s t r a c t This paper addresses gathering, a fundamental coordination problem for multi-robot systems, for n ≥ 2 asynchronous, oblivious mobile robots in the presence of f faulty robots. Earlier work has reported that the asynchronous robots cannot gather at a point without having some assumptions on multiplicity detection or total agreement in coordinate axis or constant amount of persistent memory bits. This paper shows that gathering is possible by agreeing only on one axis. Traditionally the robots have been assumed to be transparent. This work proves that gathering is achievable under one axis agreement even if the robots have obstructed visibility. In both the cases, deterministic fault-tolerant algorithms have been presented, for any initial static configuration of the robots. This paper is the first attempt at studying the gathering problem under the combination of three realistic model specifications (i) agreement in one axis (ii) obstructed visibility (iii) arbitrary number of faulty robots. © 2015 Elsevier B.V. All rights reserved.

1. Introduction In distributed computing, the mobile entities are sometimes referred to as robots or agents. Introduction of swarms (groups) of robots have changed the notion of solving problems by traditional robots where normally, a large complex machine (robot) is used to solve one single problem. It has got the standard advantages of a distributed system over centralized one. Cooperative behavior is the main strength of swarm robotics. The robots act in collaboration to execute a common task. This approach makes the system of swarm robots scalable and fault tolerant. Robots are usually represented as points moving on the 2D plane. The robots are anonymous, identical and they act autonomously in an asynchronous manner. They do not communicate with each other by passing explicit messages. They sense (observe) their surroundings and locate the positions of the other robots. Based on the set of locations, a robot determines its destination and moves their. The robots are oblivious. After reaching their respective destinations, they flush all past information. The distributed system of mobile robots aims at using the minimum amount of capabilities while trying to solve a problem. It makes designing an algorithm more difficult. For example if we had a synchronous system of robots, then designing the algorithm becomes easier. However, maintaining a synchronous system is not easy. The crux of swarm robotics is to have cheap, mass producible robots which can be easily replaced when a few are damaged. The fields of application for such a distributed system of robots are also versatile. One can use the robots to search for objects in a hazardous environ-



*

An earlier version of this work appeared in the Proc. of WALCOM 2015 (LNCS 8973). Corresponding author. E-mail addresses: [email protected] (S. Bhagat), [email protected] (S. Gan Chaudhuri), [email protected] (K. Mukhopadhyaya).

http://dx.doi.org/10.1016/j.jda.2015.10.005 1570-8667/© 2015 Elsevier B.V. All rights reserved.

S. Bhagat et al. / Journal of Discrete Algorithms 36 (2016) 50–62

51

ment [31], which typically include disaster hit areas. The robots can even work together to build a complex 3D structure [26]. Other applications include mining in hazardous areas, agricultural tasks like foraging etc. Multi-robots systems are also used in defense. A large number of robots can act as an autonomous army. The U.S. Navy has created a swarm of boats which can track an enemy boat, surround it and then destroy it [30]. Gathering, (i.e., collecting the robots to a point not defined in advance) is a fundamental coordination problem for a group of mobile robots. In this paper, we have addressed this problem in presence of some faulty robots under limitations of capabilities in terms of agreement in coordinate system and visual obstruction. The robots obey the framework described in the following subsection. 1.1. Framework General characteristics. The robots are distributed in nature, i.e., they have their own computational unit and they act independently. They do not communicate by sending or receiving messages. The robots are indistinguishable by their appearances. They perform a given task cooperatively. Geometric representation. The robots are represented by points on a 2D plane. Each robot treats its own position as its origin in its local coordinate system. They agree on the direction and orientation of any one axis (Y axis/direction of north and south, for this paper). However, they do not have any agreement on the orientation of the other axis (X axis, for this paper). Computation cycle. At any point of time, a robot may be active or inactive. When the robots are active, they operate by executing a cycle repeatedly. A robot has following three states:

• Look: In this state, the robot senses or observes the positions of the other robots in its surroundings with the help of some sensing device. The robot plots the positions of other robots in its local coordinate system.

• Compute: Depending upon what the robot has observed and the requirement of the given task, the robot computes a destination to move to.

• Move: The robot moves to the computed destination. This movement is nonrigid i.e., the robot may stop before reaching its destination. However, in order to get some guarantee that the movement would eventually be completed, it is assumed that there is a prefixed minimum distance that the robot travels if it stops prematurely. A robot cannot differentiate between a static robot and a moving robot. Activation scheduling. The operation cycle is scheduled asynchronously, i.e., at any point of time a set of robots may be in look state while some other sets of robots are computing or moving. Obliviousness. The robots are oblivious, i.e., at the end of a cycle, the robots remove all computed data of that cycle. Fault. Some of the robots may crash or become faulty i.e., they stop their activity forever. The faulty robots are still visible to others. However, the robots cannot decide whether a robot they see is functional or defective. No multiplicity detection. The robots cannot detect if more than one robot lie at a single point. Obstructed visibility. The robots are not transparent. Let r i , r j and rk be three collinear robots such that rk lies between r i and r j . rk blocks the visibility between r i and r j , i.e., r i and r j are mutually invisible. We propose a distributed algorithm that will gather all non-faulty robots (under the above model), starting from any arbitrary set of initial positions, to a point not fixed in advance, in a finite number of cycles. 1.2. Earlier works Gathering is one of the most active research topics [4,8,6,7,13,16,19,22,23,25,28] in the domain of the multi-robot systems. The primary aim of these investigations is to find out sets of minimum capabilities which the robot should have to be able to gather at a point in finite time.1 Depending on the activation scheduling, the system of robots have mostly been viewed under the following two models; (i) CORDA [27]: under this model the robots are asynchronous, i.e., they independently execute the phases of the cycles; (ii) SYm (Suzuki, Yamashita model [32]): the robots are semi-synchronous, i.e., a set of robots is active at some time and performs the phases of the cycles simultaneously. There is also a third type, called fully synchronous, where all the robots are active and perform the phases of the cycle at the same time. Gathering is possible without any extra assumption in fully synchronous model [18]. Prencipe [28] proved that, deterministic gathering of n > 2 robots is impossible in CORDA and SYm model without the assumption on multiplicity detection (the robots can detect a point consists of multiple robots). If there is no agreement about the coordinate system, gathering of even two robots is not possible without remembering the past. The result continues to hold even with multiplicity detection. Flocchini et al.

1 There is some variation of gathering such as, convergence [9]; where the robots come as close as possible but do not gather at a single point. However, in this paper we only discuss gathering at a single point.

52

S. Bhagat et al. / Journal of Discrete Algorithms 36 (2016) 50–62

[21], have reported an algorithm for gathering two robots using constant number of memory bits. Flocchini et al. [19], have shown that gathering is possible if the robots have an agreement in direction and orientation of both the axes, even when the robots can observe limited regions of certain radius, around themselves. If the robots agree on direction and orientation, Gathering is still possible even if the robots have different visibility radius [5]. Therefore, agreement in coordinate system is an important parameter for gathering. If the robots agree only on orientation or chirality, i.e., they have common clockwise direction but no common direction of X axis, gathering is not possible for two robots. Flocchini et al. [20], have characterized all formable patterns by a set of robots from arbitrary initial configurations. However, point formation or gathering is not included in their classification. Gathering has also been attempted for under dynamic compass model [23,29,24]. In this paper, we have addressed the gathering problem for asynchronous robots with static compasses and having agreement in one axis, starting from arbitrary initial configuration. An important common thread in all the reported work in asynchronous model is the assumption that the robots are fault free. It is interesting to consider errors in the system in various aspects, e.g., the robots can behave arbitrarily without properly following the algorithm or they can cease to work. In the literature the failures of the robots have been classified into several types. In transient fault [2] the robots initially may be in erroneous state, i.e., their memory have been corrupted. However, being oblivious the robots can execute the algorithm correctly after some time. Another fault model is known as crash fault [2,4]. Under this model a set of robots may stop executing the algorithm forever. The most general form of failure is byzantine fault [2], where a set of robots exhibits arbitrary behaviors or movements and does not follow the algorithm. In this paper we will focus only on crash fault. Agmon and Peleg [2] proved that gathering of non-faulty robots is possible under the SYm model even in the presence of a single faulty robot under crash fault model. This algorithm works by creating a single point with multiplicity. Hence the robots are required to detect multiplicity and initially the robots should be in distinct locations. Défago et al. [12], have studied fault tolerant gathering algorithm under SYm model and have reported a probabilistic estimation for gathering. Bouzid et al. [4], have proposed an algorithm for gathering in presence of arbitrary number of crash faults by the robots in semi-synchronous model considering common chirality (agreement in clockwise orientation) and strong multiplicity detection2 capacity by the robots. In this paper we have considered crash fault model for gathering asynchronous robots. The conventional model assumes that the robots are see transparent, i.e., the robot does not obstruct the visibility of other robots if it lies in between two robots. Recently this visibility model has been enhanced by considering obstructed visibility [14] where, if three robots are collinear, the middle robot obstructs the visibility of two end robots, i.e., the two end robots are not mutually visible. The reported results [14,15] are aimed at removing the obstructed visibility and placing the robots in general configuration where no three robots are collinear. Gathering problem has also been investigated for unit disc robots, called fat robots [11], where the obstructed visibility has been considered. The problem has been solved for two, three and four asynchronous robots [11]. Obstructed visibility has also been considered for gathering arbitrary number of synchronous fat robots [10], under two variations. One of them assumes that the robots can communicate by passing messages. The other approach uses a randomized solution. The problem of gathering has been studied under obstructed visibility using simulation results in [3] for synchronous fat robots. Agathangelou et al. [1], have proposed a gathering algorithm for arbitrarily number of asynchronous fat robots considering common chirality. In this paper, we have considered obstructed visibility for asynchronous robots having agreement in only one axis and no common chirality. 1.3. Our contribution This paper proposes an algorithm for gathering n ≥ 2 asynchronous oblivious robots under the agreement of only one axis. Gathering of two oblivious robots has been reported to be impossible without having constant amount of past memory [21] even with multiplicity detection. We show that it is possible to gather two oblivious robots if they agree on one axis. The proposed algorithm can tolerate arbitrary number of crash faults. In other words, the algorithm guarantees gathering of all non-faulty robots in presence of f faulty robots under crash faults. Bouzid et al., [4] have shown that gathering is possible under the assumption on multiplicity detection and chirality. This paper proposes an algorithm for fault tolerant gathering of asynchronous robots without having chirality and multiplicity detection but only having agreement in any one axis. Finally we have enhanced our gathering algorithm for working on non-transparent robots. This is possibly the first attempt at bringing together two realistic features of fault and opacity. 2. Terminology Let R = {r1 , r2 , . . . , rn } be a set of oblivious, indistinguishable point robots on the 2D plane. The robots follow the basic characteristics of the traditional model [18] with some additional features. At any point of time, a robot is either active or inactive. The active robots asynchronously execute the cycle look-compute-move repeatedly following CORDA model. A robot may stop (and start a new cycle) before reaching its destination. However, it must move, on each movement, at least a distance δ > 0 if its destination is more than δ distance away from it.3 This assumption is necessary to assure

2 3

The robots can detect the points with multiple robots as well as the number of robots in those points. If the destination is less than δ distance away then the robot is guaranteed to reach it in one movement.

S. Bhagat et al. / Journal of Discrete Algorithms 36 (2016) 50–62

53

Fig. 1. An example of L(C ).

1 . Fig. 2. An example of C

>1 . Fig. 3. An example of C

that a robot will not take infinite time to reach its destination. An inactive robot will not remain idle forever. There is no global coordinate system (defined by origin and axes) for the robots. Each robot has its own local coordinate system which may differ from the others. However, the robots agree on the directions of the Y axis which is conventionally north-south direction. The robots have unlimited visibility range, i.e., they can observe all robots in R and plot them in their own coordinate systems. The robots may become faulty at any stage of the execution cycle. In this paper, we only consider crash faults where a faulty robot permanently stops executing cycles. A faulty robot continues to be a part of the system; it physically remains in the system without moving. Other robots cannot identify the faulty robots. A crash fault model is denoted by (n, f ), in which at most f < n robots may become faulty at any stage of execution. Multiple robots can occupy the same position. However, to other robots they represent just one point occupied one or more robots. The robots do not have the capability to detect multiplicity. By a configuration C , we mean the set of points on the plane occupied by the robots in R i.e., C = { p 1 , p 2 , . . . , pk }, k ≤ n, where p i is the position of one or multiple robots  is the set of all such possible configurations of in R. By Ct , we denote the geometric configuration of robots at time t. C the robots by R. Following notations are used in our proposed algorithm.

• The agreement on north-south directions enables us to classify the robots into different groups according to their positions. An ordering is obtained among these groups. Horizontal lines are drawn through the points in C (Fig. 1).



• •



Some of these lines may contain multiple robot positions. The lines are sorted according to their positions along north to south direction. Let Li (C ) denote the ith horizontal line and L(C ) ordered sequence of all such lines. Let H L i (C ) be the set of distinct robot positions on Li (C ) (if two or more robots occupy same position, we consider it once) in C . We define H(C ) = ( H L 1 (C ), H L 2 (C ), . . . , H L k (C )).  as follows: ∀ C , C  ∈ C, C ≺ C  iff | H L 1 (C )| = | H L 1 (C  )| = 1 or both | H L 1 (C )| We define an equivalence relation ≺ on C and | H L 1 (C  )| are greater than 1. Note that this relation yields only two equivalence classes. In one class, each member C has | H L 1 (C )| = 1 and we denote this class by C1 (Fig. 2). In the other class each member C  has | H L 1 (C  )| > 1 and >1 (Fig. 3). we denote this class by C CheckLevel() is a function which takes L(C ) and a robot r i as arguments and returns k such that r i lies on Lk (C ). ComputeCorners() takes a set of robot positions G on a horizontal line U as arguments. It returns the two robot positions in G which lie on the two corner positions on U . By Mt , we denote the two robot positions computed by ComputeCorners() at time t. Even if the robots do not agree on the positive direction of X-axis, the corner robots as computed in their local coordinate system would be the same. ComputeTrianglePeak() is a function which takes two robot positions, p i and p j lying on the same horizontal line Lk (C ) for some k, as arguments. It computes the equilateral triangle p i T p j with side length | p i p j |. The point T lies to

54

S. Bhagat et al. / Journal of Discrete Algorithms 36 (2016) 50–62

Fig. 4. An example of Case 1.

Fig. 5. An example of Case 2.

the north of Lk (C ). It returns the point T . By t , we denote the triangle computed by ComputeTrianglePeak() at time t. In Lemma 3, we show that T remains invariant whenever it is possible to define it. • Closest() is a function which takes a robot r i and a set of positions M as arguments and returns the closest position in M from r i (tie, if any, is broken arbitrarily). Using the above functions we describe algorithm ComputeDestination() which computes a destination point for a robot on the plane. GatheringFull() builds the final gathering configuration (a point). These two algorithms are presented in section 3. Each robot in R executes GatheringFull() independently in its compute stage. The proposed algorithm is wait-free, i.e., a robot does not wait for other robots to perform an action. 3. Gathering under full visibility model In this section we describe a distributed gathering algorithm which can tolerate arbitrary number of crash faults for a set of transparent robots. The strategy is to find a unique point so that all non-faulty robots can agree on it and gather at that point within finite time. As the robots are oblivious and asynchronous, after some steps the gathering point should remain invariant even as the robots change their positions during the execution of the algorithm. If the initial configuration of the robots provides us such an invariant point then we are done. In that case the only responsibility of the robots is to move to that point in such a way that this point remains intact till all robots reach there. On the other hand, if such a point is not available, some of the robots change their positions so that an invariant gathering point becomes computable after a finite number of movements of these robots. Our algorithm is based on the ordering information of R as reflected in H(C ) = { H L 1 (C ), . . . , H L k (C )}. For an arbitrary >1 and accordingly decides the strategy for moverobot configuration C , the algorithm first checks whether C ∈ C1 or C ∈ C >1 , ments of the robots. If C ∈ C1 , the robots which are not in H L 1 (C ) move towards the robot position in H L 1 (C ). If C ∈ C  then the present configuration is converted into one which belongs to C1 and then the strategy for the previous case is followed. The different scenarios and the corresponding solution strategies are:

• Case 1: C ∈ C1 The robot r i ∈ H L 1 (C ) retains its current position and all other robots not in H L 1 (C ) move towards r i along a path not crossing L1 (C ) (Fig. 4). • Case 2: C ∈ C>1 Consider the two corner robots, say r j and rk , on L1 (C ). Compute the equilateral triangle r j T rk . The robots r j and rk move towards T along the respective sides of the triangle. The remaining non-faulty robots identify the nearer robot between r j and rk and move towards it (ties, if any, are broken arbitrarily) along the line segment joining them to their respective destinations (Fig. 5). Next we present the formal description of the algorithms. The algorithms are executed in all robot sites in their compute state independently and asynchronously. Using ComputeDestination() the robots determine the destination points to move to. Then they reach their respective destinations using GatheringFull(). In the next section, we discuss the correctness of these algorithms.

S. Bhagat et al. / Journal of Discrete Algorithms 36 (2016) 50–62

55

Algorithm 1: ComputeDestination(). Input: r i , L(C ), H(C ). Output: A destination point of r i . h ← | H L 1 (C )|; if h == 1 then r ← r j ∈ H L 1 (C ); else M ← ComputeCorners( H L 1 (C )); if position of r i ∈ M then T ← ComputeTrianglePeak( M ); r ← T; else r ← Closest(r i , M ); return r; Algorithm 2: GatheringFull(). Input: r i ∈ R Output: r i moves towards its destination. Compute L(C ); Compute H(C ); r ← ComputeDestination(r i , L(C ), H(C )); Move towards r along the line segment r i r ; 3.1. Correctness If H L 1 (Ct ) has a single location, it is the destination point for all the robots who might compute at time t. If there are robots at different locations in H L 1 (Ct ), the two farthest locations define an equilateral triangle. The tip of that triangle would be the point of gathering if at least one of the extreme robots completes journey to its destination. If not and both of them stop on the same horizontal line similar situation continues with the tip remaining invariant. If they stop on different horizontal lines, we have H L 1 () having a single point and gathering takes place there. In any case no robot moves to a point outside the equilateral triangle initially defined. Observation 1. Suppose ABC is an equilateral triangle. If D and E are two points on side AB and AC such that |BD| = |CE|, then ADE is also equilateral. Lemma 1. Suppose for the initial configuration Ct0 , | H L 1 (Ct0 )| ≥ 2. Then there exists some t  ≥ t 0 such that all the robots on L1 (Ct ) lie on the non-horizontal sides of t0 , ∀t ≥ t  . Proof. The active robots in Ct0 move in one of the following ways (Fig. 6): (i) the robots occupying the positions in Mt0 move towards T along the respective non-horizontal sides of t0 and (ii) the rest of the robots move to the points in Mt0 along the line segment joining them to their respective destinations. Until a robot in Mt0 moves or a robot reaches its destination corner point, no robot crosses L1 (Ct0 ). Suppose at time t  , at least one active robot in Mt0 starts moving towards T along the corresponding side of t0 . At time t ≥ t  , any active robot will find itself either on L1 (Ct ) or below it. Using Observation 1, any robot on L1 (Ct ) has reached its current position by either moving along a non-horizontal side of t0 or moving towards its current position occupied by the robot(s) on the respective non-horizontal side of t0 . Thus all the robots on L1 (Ct ) lie on the non-horizontal sides of t0 . 2 Lemma 2. There exits some t  such that | H L 1 (Ct )| ≤ 2 for all t ≥ t  . Proof. If | H L 1 (Ct0 )| = 1, all the non-faulty robots move towards the robot in H L 1 (Ct0 ) without crossing L1 (Ct0 ). In this case the result holds with t  = t 0 . If | H L 1 (Ct0 )| ≥ 2, using Lemma 1, let t  be the time from which L1 () contains only the robot positions which lie on the two non-horizontal sides of t0 . For t ≥ t  , | H L 1 (C t )| cannot exceed two. 2 Lemma 3. Whenever ComputeCorners() and ComputeTrianglePeak() are called, they always return positions of the robots on the non-horizontal sides of the triangle t0 and T respectively. Proof. ComputeCorners() and ComputeTrianglePeak() are called by the active robots only when they find | H L 1 ()| ≥ 2. If a robot finds itself at one of the corner points detected by ComputeCorners(), it calls ComputeTrianglePeak(). Until at least one

56

S. Bhagat et al. / Journal of Discrete Algorithms 36 (2016) 50–62

Fig. 6. An example illustrating the different movements of the robots in the proof of 1.

Fig. 7. An example of obstructed visibility.

robot occupying a position in Mt0 moves, ComputeCorners() and ComputeTrianglePeak() compute the same points on every call and these points are the three vertices of t0 . When at least one robot in Mt0 starts moving, combining Observation 1, Lemma 1 and Lemma 2, we can say the following: ComputeCorners() and ComputeTrianglePeak() are called by the active robots after finding that (i) | H L 1 ()| = 2 and (ii) the robots in L1 () lie on the non-horizontal sides of t0 . Thus, the lemma follows. 2 Theorem 1. GatheringFull() solves the gathering problem for (n, n − 1) crash fault model in finite time. Proof. Our approach is to find a unique point so that all the non-faulty robots can agree upon this point for gathering and the point remains intact even when the robots move towards it. If | H L 1 (Ct0 )| = 1, we have a unique point for gathering, namely the point in H L 1 (Ct0 ). All the non-faulty robots compute this point as their destination point and move towards it. Since robots move towards this destination point along the line segments joining them to this destination point, they never touch or cross L1 (Ct0 ) except at the destination point. This implies that the destination point remains intact under the motion of the robots. No robot waits for the completion of any action by any other robot. Thus GatheringFull() can solve gathering problem for (n, n − 1) fault model. Whenever | H L 1 ()| is more than 1, robots try to make | H L 1 ()| = 1. By Lemma 2, there exists a moment after which | H L 1 ()| = 1 or 2. During the execution of our algorithm, if | H L 1 ()| becomes 1 and all other non-faulty active robots become aware of it, then the point in H L 1 () becomes the desired gathering point. Otherwise by Lemma 3, some active robots reach T and make | H L 1 ()| = 1. Note that if any robot reaches point T , then T becomes a static point on which all non-faulty robots can agree for gathering. Once | H L 1 ()| is fixed to 1, the correctness proof is same as above. We can see that till there is single non-faulty robot in the system, our algorithm guarantees that at some time | H L 1 ()| would become 1. Thus, GatheringFull() solves gathering problem for (n, n − 1) fault model. It is worthwhile to note that our approach is wait-free. The functions computed by the robots in each computation cycle run in polynomial time and the number of these functions are finite. This implies that each computational cycle would take polynomial time. On the other hand, on each non-null movement, any active robot moves at least δ > 0 distance. As the distances between the robots are finite, to reach their destinations, robots have to spend a finite number of computational cycles (as our algorithm is wait-free, no dead-lock occurs in the system). Since the number of robots and the number is finite, GatheringFull() gathers all non-faulty robots in finite time. 2 Finally we can state the following theorem. Theorem 2. Gathering is possible for n ≥ 2 robots under one axis agreement, even with f (< n) faulty robots. 4. Gathering under obstructed visibility Traditionally, the robots are treated as points and transparent i.e., they do not create any visual obstruction. Recently the visibility model for the robots has been extended to opaque robots. Let r i , r j and rk be three collinear robots such that rk lies between r i and r j (Fig. 7). rk blocks the visibility of r i and r j , i.e., r i and r j are mutually invisible. This new visibility model is known as obstructed visibility [14]. Not many results have been published under this model. Two algorithms [14,15] have been reported for generating general configuration (where no three points are collinear) by the robots under obstructed visibility. Obstructed visibility has also been addressed for gathering of n ≤ 4 fat robots [11] and for gathering any number of fat robots using common chirality [1]. Circle formation by solid fat robots [17] has been solved using common coordinate system. No result on gathering under obstructed visibility using one axis agreement and considering f (< n) faults has yet been reported. In this section, we extend our gathering algorithm to work in obstructed visibility. First, we present an example where the previous algorithm will not work.

S. Bhagat et al. / Journal of Discrete Algorithms 36 (2016) 50–62

57

Fig. 8. An counter example of GatheringFull().

Fig. 9. An example of V (r i ) = {r j , r w , r u , r v , rk }.

Fig. 10. An example of L(Up(r i )), L(Sm(r i )), L(Lw(r i )).

Lemma 4. GatheringFull() does not work under obstructed visibility model. Proof. Consider the configuration Ct0 = { p 1 , p 2 , p 3 , p 4 } as depicted in Fig. 8 where, (i) all the positions are collinear on a horizontal line, (ii) robots at p 1 and p 4 are faulty, (iii) p 2 and p 3 contain single non-faulty robot at each position, and (iv) p 2 and p 3 are closest among all pairs. We consider a fully synchronous scheduler. Since robots at p 1 and p 4 are faulty, they never move. In every cycle robots at p 2 and p 3 move. According to GatheringFull(), the robots at p 2 and p 3 find each other closest among other robots and they swap their positions. This process continues and the algorithm never terminates. 2 4.1. Terminology In this model, a robot may not have the complete view of the current configuration C . Thus, two robots may have different views of the same configuration. Strategies are built on the current views of the robots. Each robot computes on the information available at its current position. To describe the algorithm, some new terms are introduced.

• V (r i ) denotes the set of robot positions in C which are visible to r i (Fig. 9). This set also includes the point occupied by r i .

• Using the agreement on north-south directions, a robot r i groups the robots on the basis of its current view. Robot r i sorts the distinct robot positions in V (r i ) in descending order according to their y-coordinates. In this ordering, it considers the following three sets of points, a) all points having same y-coordinate value as r i . b) all points having y-coordinate value just greater than that of r i . c) all points having y-coordinate value just lesser than that of r i . Let these sets be denoted by Up(r i ), Sm(r i ) and Lw(r i ) respectively (Fig. 10). Let Ai (V (r i )) = (Up(r i ), Sm(r i ), Lw(r i )). Note that Up(r i ) is empty for the robots having highest y-coordinate in C and Lw(r i ) is empty for all the robots having lowest y-coordinate in C . Let L(Up(r i )), L(Sm(r i )) and L(Lw(r i )) denote the three horizontal lines through Up(r i ), Sm(r i ) and Lw(r i ) respectively. Let B i (V (r i )) = (L(Up(r i )), L(Sm(r i )), L(Lw(r i ))). • L1 (C ), H L 1 (C ), ComputeCorners(), ComputeTrianglePeak() and Closest() are the same as defined in section 2. • CheckMyLevel() is a function which takes a robot position p i and Ai (V (r i )) as arguments and returns (Fig. 11): (i) 1 if Up(r i ) = φ (ii) 2 if Up(r i ) = φ • Let Mi (U ) denote the two corner robot positions on U which are visible to r i . Due to obstructed visibility, this set may be different for different robots for the same input. Let M(U ) denote the actual corner robot positions on U . A robot r i computes Mi (U ) in the following way: – Sorts the visible robot positions on U as per their x-coordinates. – Takes the two points having the smallest and the largest x-coordinates and puts them in a set Mi (U ).

58

S. Bhagat et al. / Journal of Discrete Algorithms 36 (2016) 50–62

Fig. 11. (i) CheckMyLevel(r i ) = 1 (ii) CheckMyLevel(r j ) = 2.

Fig. 12. Mi (L(Up(r i ))) = {r j , rk } and M(L(Up(r i ))) = {r j , rk }.

Fig. 13. An example of Case Lw(r i ) = φ .

Fig. 14. An example of Case Lw(r i ) = φ .

Note that here the robots compute the corner robots using the ordering information w.r.t. their own coordinate system (see also Fig. 12). • Let i and T i denote the equilateral triangle and the corresponding peak of the triangle computed by r i using ComputeTrianglePeak(). Let denote the equilateral triangle defined on M(L1 (C )) and T be the peak of . • CheckCorner() is a binary function which takes a robot position p i and the set of other visible robot positions to r i on U as arguments. This function checks whether p i lies between two other robot positions on U or it is a corner robot position. It returns 0 if p i lies between two other robot positions on U otherwise returns 1. • LowerPoint() takes a robot position p i , Ai (V (r i )) and B i (V (r i )) as arguments. It returns a point v to the south of p i . The point v lies on the vertical line passing through p i and is d distance away from p i , where – d = dd1 , if Lw(r i ) is empty. d1 and d2 are the distances of the two visible robot positions from p i on L(Sm(r i )) with 2 d1 ≤ d2 (Fig. 13). ˆ

– d = d2 , otherwise. dˆ is the distance between L(Sm(r i )) and L(Lw(r i )) (Fig. 14). Note that any deterministic point would serve the purpose. However, a careful choice might give us a bound on the number of steps.

4.2. Algorithm GatheringObstructed The robots may have different views of the same configuration. Our strategies are based on the current views of the robots. A robot r i on L(Sm(r i )) can see all the robots on L(Up(r i )) and L(Lw(r i )). We exploit this fact to design our algorithm. We consider the position p i of a robot r i and accordingly propose destination point for it. The different scenarios and the corresponding solution strategies are:

• Up(r i ) = φ and |Sm(r i )| = 1:

The position p i , occupied by r i on L(Sm(r i )), has a unique global property that it has the highest y-coordinate value w.r.t. any local coordinate system as defined in our model. The point p i serves as the gathering point. The robot r i does not move. Due to obstructed visibility, p i may not be visible to some of the robots. Our algorithm makes sure that in later stages this point is visible to all the points and gathering takes place.

S. Bhagat et al. / Journal of Discrete Algorithms 36 (2016) 50–62

59

• Up(r i ) = φ and |Sm(r i )| > 1:

>1 . We convert C into a configuration in C1 . We follow the There are at least two robot positions on L(Sm(r i )) and C ∈ C same strategies as in the earlier model but the movements of the robots are different here. Followings are the possible scenarios and the corresponding solution strategies: – |Sm(r i )| = 2: There are only two robot positions on L(Sm(r i )). Let them be p i and p j . All the active robots on L(Sm(r i )) computes same set of corner robot positions and this set includes their current positions. r i computes the triangle p i T i p j and sets T i as its destination point. T i is also the destination point for all other active robots on L(Sm(r i )). – |Sm(r i )| > 2 and p i ∈ M(L(Sm(r i ))): Since |Sm(r i )| > 2, the view of r i is obstructed by at least one robot position on L(Sm(r i )). Mi (L(Sm(r i ))) computed by r i is different from M(L(Sm(r i ))). The robot r i computes the equilateral triangle i and sets T i as the destination point. The robots occupying the position p i are the only candidates to move towards T i . – |Sm(r i )| > 2 and p i ∈ / M(L(Sm(r i ))): r i finds that it is not a corner robot. It computes a point v below it using LowerPoint() and moves to v. • Up(r i ) = φ All the robots on L(Up(r i )) are visible to r i . We gradually move r i upwards. – If L(Up(r i )) contains only one robot position, r i moves towards this robot position. – If L(Up(r i )) contains more than one robot position, r i identifies the nearest robot position, say p j , in Mi (L(Up(r i ))). The robot r i moves towards p j . Now we present the formal description of the algorithms. The robots execute GatheringObstructed() in their compute state to achieve gathering. The robots use ComputeDestinationPoint2() to determine the destination points. Algorithm 3: ComputeDestinationPoint2(). Input: p i , Ai (V (r i )), Hi (C ). Output: A destination point for r i . l ← CheckMyLevel( p i , Ai (V (r i ))); if l == 1 then h ← |Sm(r i )|; if h == 1 then r ← r j ∈ Sm(r i ); else C ← CheckCorner( p i , Sm(r i )); if C == 1 then Mi (L(Sm(r i ))) ← ComputeCorners( p i , Sm(r i )); T i ← ComputeTrianglePeak(Mi (L(Sm(r i )))); r ← Ti; else r ← LowerPoint( p i , Ai (V (r i )), B i (V (r i ))); else

Mi (L(Up(r i ))) ← ComputeCorners( p i , Up(r i )); r ← Closest( p i , Mi (L(Up(r i )))) return r; Algorithm 4: GatheringObstructed(). Input: r i ∈ R Output: r i moves towards its destination. Compute Ai (V (r i )); Compute B i (V (r i )); r ← ComputeDestinationPoint2( p i , Ai (V (r i )), B i (V (r i ))); Move towards r along the line segment p i r ; 4.3. Correctness of GatheringObstructed() In this section, we prove that by executing algorithm GatheringAlgorithm2, all the non-faulty robots will gather at a point within finite time. Robots move to create a unique point in their North. Once a unique stable robot position is achieved, all other non-faulty robots move towards it. If the initial configuration Ct0 provides such a unique point, we show that all the non-faulty robots in other positions reach this point in finite time. If there is no such point in Ct0 , we guarantee that the

60

S. Bhagat et al. / Journal of Discrete Algorithms 36 (2016) 50–62

Fig. 15. An example of Lemma 5.

executions of our algorithm create such a point within finite time and all non-faulty robots occupying other positions move to it within finite time. Observation 2. Suppose ABC is an equilateral triangle and D is a point on side BC. We draw an equilateral triangle EBD with side length |BD|. Then E lies on the side AB. Lemma 5. If | H L 1 (Ct )| ≥ 2 and r i has a position in M(L1 (C t )), then T i lies on a non-horizontal side of the equilateral triangle (Fig. 15). Proof. If | H L 1 (Ct )| = 2, then T i = T for any robot r i on L1 (Ct ) and hence the lemma is true. Next we consider the case when | H L 1 (Ct )| > 2. The visions of all the robots having positions in M(L1 (C t )) are obstructed by other robots on L1 (Ct ). Let r i and r j be any two robots lying at two different positions in M(L1 (C t )). Due to obstructed visibility, T i = T j . All the positions in Mi (L1 (C t )) and Mi (L1 (C t )) lie on L1 (Ct ). By Observation 2, we conclude that T i and T j lie on two non-horizontal sides of the equilateral triangle defined on M(L1 (C t )) i.e., . 2 Lemma 6. If | H L 1 (Ctˆ )| ≥ 2, then there exists t  ≥ tˆ such that all the robots on L1 (Ct ) lie on the non-horizontal sides of the equilateral triangle , ∀t ≥ t  . Proof. An active robot r i occupying a position in M(L1 (C tˆ )) moves towards T i along a non-horizontal side of . The rest of the active robots on L(Ctˆ ) which do not have positions in M(L1 (C tˆ )), move downwards. All the other robots move towards the respective closest corner robot positions on the horizontal lines just above them. Now consider the possible scenarios when, for the first time, at least one robot on the topmost horizontal line i.e., a robot having a position in M(L1 (C t  )), t  ≥ tˆ starts moving in upward direction along a non-horizontal side of . Then at any time t > t  , L1 (C t ) contains one or two robot positions. If L1 (C t ) has exactly one robot position, either (a) at least one robot has reached the peak of the corresponding equilateral triangle or (b) at least one robot stopped before reaching its destination which is the peak of the corresponding equilateral triangle. For the second case, at least two robots, moving along two non-horizontal sides of , have reached their current positions. Therefore, all robots on L1 (Ct ) lie on non-horizontal sides of , ∀t ≥ t  . 2 Lemma 7. Whenever ComputeTrianglePeak() is called by the same robot for the second time or more, it always returns T . Proof. ComputeTrianglePeak() is called by the robots having positions in M(L1 ()). If | H L 1 (Ct )| = 2, then ComputeTrianglePeak() is called by active robots on L1 (Ct ) and it returns T . If | H L 1 (Ct )| > 2 and ComputeTrianglePeak() is called by a robot r i having a position in L1 (Ct ), it returns T i . Once robots on L1 (Ct ) start moving and ComputeTrianglePeak() is called by a robot for second time or more, by Lemmas 5 and 6, we have the result. 2 Theorem 3. GatheringObstructed() solves the gathering problem in finite time for (n, n − 1) crash fault model. Proof. If a robot reaches T , it finds itself on the topmost position and it stops moving further. No robot moves beyond point T .

• At least one robot reaches T : In this case, T becomes the desired gathering point and the rest of the non-faulty robots reach T in one of the following ways: – The robots which are moving towards T , reach T without halting. – The robots which find T as the unique point in the corresponding Up(), move to T . – The rest of the non-faulty robots move to the corner robot positions on the corresponding horizontal line L(Up()). Since T is unchanged under the motion of the robots and the distances of T from these robots are finite, the robots eventually move to position in which they find T as the only member in Up() and they move to it without halting.

S. Bhagat et al. / Journal of Discrete Algorithms 36 (2016) 50–62

61

• No robot reaches T : This can arise if both the corner robots stop before reaching T and do so at different horizontal levels. After all other robots complete their current motion, they simply move to the unique topmost point. If a robot cannot see the topmost point, it would go to the location currently occupied by some other robot. Once the obstructions are removed, it would finally go to the topmost point. • |HL1 (Ct0 )| = 1: There is only one robot position on L1 (Ct0 ). As argued in the case before, all the robots would gather at the fixed topmost point. Since the movements of a non-faulty robot do not depend on the movements of the other robots, our approach for this case is wait-free. All the non-faulty robots gather at a point even if there are at most (n − 1) crashed robots present in the system. Arguing in lines similar to GatheringFull, we can show that the time for gathering is finite. 2 5. Conclusion This paper establishes that the gathering under one axis agreement is possible under the following two models.

• Full visibility model where the robots are assumed to be transparent. • Obstructed visibility model where the robots have been assumed to be opaque. Some of the robots may be faulty in the sense that they remain in the system without executing the algorithm. To the best of our knowledge, this is the first reported result on the possibility of gathering, in the presence of faulty robots, under one axis agreement. Moreover, obstructed visibility takes the model a step closer to the real world. References [1] C. Agathangelou, C. Georgiou, M. Mavronicolas, A distributed algorithm for gathering many fat mobile robots in the plane, in: Proc. ACM Symposium on Principles of Distributed Computing, 2013, pp. 250–259. [2] N. Agmon, D. Peleg, Fault-tolerant gathering algorithms for autonomous mobile robots, SIAM J. Comput. 36 (1) (2006) 56–82. [3] K. Bolla, T. Kovacs, G. Fazekas, Gathering of fat robots with limited visibility and without global navigation, in: Proc. Swarm and Evolutionary Computation, 2012, pp. 30–38. [4] Z. Bouzid, S. Das, S. Tixeuil, Gathering of mobile robots tolerating multiple crash faults, in: Proc. IEEE 33rd International Conference on Distributed Computing Systems, 2013, pp. 337–346. [5] A. Chatterjee, S. Gan Chaudhuri, K. Mukhopadhyaya, Gathering asynchronous swarm robots under nonuniform limited visibility, in: Proc. International Conference on Distributed Computing and Internet Technologies, 2015, pp. 174–180. [6] M. Cieliebak, P. Flocchini, G. Prencipe, N. Santoro, Solving the robots gathering problem, in: Proc. Automata, Languages and Programming, 2003, pp. 1181–1196. [7] M. Cieliebak, P. Flocchini, G. Prencipe, N. Santoro, Distributed computing by mobile robots: gathering, SIAM J. Comput. 41 (4) (2012) 829–879. [8] M. Cieliebak, G. Prencipe, Gathering autonomous mobile robots, in: Proc. International Colloquium on Structural Information and Communication Complexity, 2002, pp. 57–72. [9] R. Cohen, D. Peleg, Convergence properties of the gravitational algorithm in asynchronous robot systems, SIAM J. Comput. 34 (6) (2005) 1516–1528. [10] A. Cord-Landwehr, B. Degener, M. Fischer, M. Hüllmann, B. Kempkes, A. Klaas, P. Kling, S. Kurras, M. Märtens, F. Meyer auf der Heide, C. Raupach, K. Swierkot, D. Warner, C. Weddemann, D. Wonisch, A new approach for analyzing convergence algorithms for mobile robots, in: Proc. Automata, Languages and Programming, 2011, pp. 650–661. [11] J. Czyzowicz, L. Gasieniec, A. Pelc, Gathering few fat mobile robots in the plane, Theor. Comput. Sci. 410 (6) (2009) 481–499. [12] X. Défago, M. Gradinariu, S. Messika, P. Raipin-Parvédy, Fault-tolerant and self-stabilizing mobile robots gathering, in: Proc. 20th International Symposium on Distributed Computing, 2006, pp. 46–60. [13] B. Degener, B. Kempkes, T. Langner, F. Meyer auf der Heide, P. Pietrzyk, R. Wattenhofer, A tight runtime bound for synchronous gathering of autonomous robots with limited visibility, in: Proc. 23rd ACM Symposium on Parallelism in Algorithms and Architectures, 2011, pp. 139–148. [14] G.A. Di Luna, P. Flocchini, S. Gan Chaudhuri, N. Santoro, G. Viglietta, Robots with lights: overcoming obstructed visibility without colliding, in: Proc. Stabilization, Safety, and Security of Distributed Systems, 2014, pp. 150–164. [15] G.A. Di Luna, P. Flocchini, F. Poloni, N. Santoro, G. Viglietta, The mutual visibility problem for oblivious robots, in: Proc. 26 Canadian Conference on Computational Geometry, 2014, pp. 348–354. [16] Y. Dieudonné, F. Petit, Self-stabilizing gathering with strong multiplicity detection, Theor. Comput. Sci. 428 (2012) 47–57. [17] A. Dutta, S. Gan Chaudhuri, S. Datta, K. Mukhopadhyaya, Circle formation by asynchronous fat robots with limited visibility, in: Proc. 8th International Conference on Distributed Computing and Internet Technology, 2012, pp. 83–93. [18] P. Flocchini, G. Prencipe, N. Santoro, Distributed Computing by Oblivious Mobile Robots. Synthesis Lectures on Distributed Computing Theory, Morgan & Claypool Publishers, 2012. [19] P. Flocchini, G. Prencipe, N. Santoro, P. Widmayer, Gathering of asynchronous robots with limited visibility, Theor. Comput. Sci. 337 (1–3) (2005) 147–168. [20] P. Flocchini, G. Prencipe, N. Santoro, P. Widmayer, Arbitrary pattern formation by asynchronous, anonymous, oblivious robots, Theor. Comput. Sci. 407 (1–3) (2008) 412–447. [21] P. Flocchini, N. Santoro, G. Viglietta, M. Yamashita, Rendezvous of two robots with constant memory, in: Proc. International Colloquium on Structural Information and Communication Complexity, 2013, pp. 189–200. [22] N. Gordon, Y. Elor, A. Bruckstein, Gathering multiple robotic agents with crude distance sensing capabilities, in: Proc. Ant Colony Optimization and Swarm Intelligence, 2008, pp. 72–83. [23] T. Izumi, Y. Katayama, N. Inuzuka, K. Wada, Gathering autonomous mobile robots with dynamic compasses: an optimal result, in: Proc. International Symposium on Distributed Computing, 2007, pp. 298–312. [24] T. Izumi, S. Souissi, Y. Katayama, N. Inuzuka, X. Défago, K. Wada, M. Yamashita, The gathering problem for two oblivious robots with unreliable compasses, SIAM J. Comput. 41 (1) (2012) 26–46.

62

S. Bhagat et al. / Journal of Discrete Algorithms 36 (2016) 50–62

[25] Y. Katayama, Y. Tomida, H. Imazu, N. Inuzuka, K. Wada, Dynamic compass models and gathering algorithms for autonomous mobile robots, in: Proc. Structural Information and Communication Complexity, 2007, pp. 274–288. [26] N. Michael, J. Fink, V. Kumar, Cooperative manipulation and transportation with aerial robots, Auton. Robots 30 (1) (2011) 73–86. [27] G. Prencipe, Instantaneous actions vs. full asynchronicity: controlling and coordinating a set of autonomous mobile robots, in: Proc. 7th Italian Conference on Theoretical Computer Science, 2001, pp. 154–171. [28] G. Prencipe, Impossibility of gathering by a set of autonomous mobile robots, Theor. Comput. Sci. 384 (2–3) (2007) 222–231. [29] S. Souissi, X. Défago, M. Yamashita, Using eventually consistent compasses to gather memory-less mobile robots with limited visibility, ACM Trans. Auton. Adapt. Syst. 4 (1) (2009) 9:1–9:27. [30] M. Steinberg, Intelligent autonomy for unmanned naval systems, in: Proc. Defense and Security Symposium, International Society for Optics and Photonics, 2006, p. 623013. [31] K. Sugihara, I. Suzuki, Distributed motion coordination of multiple mobile robots, in: Proc. 5th IEEE International Symposium on Intelligent Control, 1990, pp. 138–143. [32] I. Suzuki, M. Yamashita, Formation and agreement problems for anonymous mobile robots, in: Proc. 31st Annual Conference on Communication, Control and Computing, 1993, pp. 93–102.