Live Exploration with Mobile Robots in a Dynamic Ring, Revisited
Subhrangsu Mandal, Anisur Rahaman Molla, William K. Moses Jr
LLive Exploration with Mobile Robots in a DynamicRing, Revisited
Subhrangsu Mandal
Indian Institute of Technology Kharagpur
Kharagpur, [email protected]
Anisur Rahaman Molla
Indian Statistical Institute
Kolkata, [email protected]
William K. Moses Jr.
Technion - Israel Institute of Technology
Haifa, [email protected]
Abstract —The graph exploration problem requires a groupof mobile robots, initially placed arbitrarily on the nodes of agraph, to work collaboratively to explore the graph such that eachnode is eventually visited by at least one robot. One importantrequirement of exploration is the termination condition, i.e., therobots must know that exploration is completed. The problemof live exploration of a dynamic ring using mobile robotswas recently introduced in [Di Luna et al., ICDCS 2016]. Init, they proposed multiple algorithms to solve exploration infully synchronous and semi-synchronous settings with variousguarantees when robots were involved. They also providedguarantees that with certain assumptions, exploration of the ringusing two robots was impossible. An important question left openwas how the presence of robots would affect the results. In thispaper, we try to settle this question in a fully synchronous settingand also show how to extend our results to a semi-synchronoussetting.In particular, we present algorithms for exploration withexplicit termination using robots in conjunction with either (i)unique IDs of the robots and edge crossing detection capability(i.e., two robots moving in opposite directions through an edgein the same round can detect each other), or (ii) access torandomness. The time complexity of our deterministic algorithmis asymptotically optimal. We also provide complementary im-possibility results showing that there does not exist any explicittermination algorithm for robots even when each robot hasa unique ID, edge crossing detection capability, and access torandomness. The theoretical analysis and comprehensive simu-lations of our algorithm show the effectiveness and efficiency ofthe algorithm in dynamic rings. We also present an algorithm toachieve exploration with partial termination using robots withunique IDs in the semi-synchronous setting, when robots haveaccess to edge crossing detection capability and randomness butdo not know a bound on the size of the ring or have access to alandmark or are guaranteed that robots have common chirality.Our algorithms are fully decentralized, lightweight, and easilyimplementable. Index Terms —multi-agent systems, mobile robots, exploration,uniform deployment, distributed algorithms, dynamic graph, ringgraph
I. I
NTRODUCTION
The research area of autonomous mobile robots in a graphsetting has been well studied over the years. Many funda-mental problems have been studied in this area, such as theproblem of exploration of a graph using multiple robots. In
A. R. Molla was supported, in part, by DST Inspire Faculty researchgrant DST/INSPIRE/04/2015/002801, Govt. of India. The work of WilliamK. Moses Jr. was supported in part by a Technion fellowship. this problem, multiple robots are placed in nodes in the graphand the goal is to design an algorithm, run by each robot,such that all robots collectively visit each node at least onceas quickly as possible. As this fundamental problem has beensolved to a large degree in most vanilla settings [2], [5], [9],[12], [21], its study has been extended to more exotic, butrealistic, settings.One such setting is a dynamic network. In the real world,dynamism is seen fairly regularly in networks. As with mostthings in real life, the dynamism that appears in the realworld is quite complex. In order to work towards a deeperunderstanding of this complexity, we first start with a simplermodel of dynamism, which is a restricted version of applied to a ring in the synchronous setting. Wenow describe this version of dynamism. Consider n vertices, v , v , . . . , v n − , with an undirected edge between every node v i and v i +1 mod n , ∀ i : 0 ≤ i ≤ n − . In each round, theadversary can choose to remove at most one edge of the ring.In this setting, Di Luna et al. [7] were the first to studythe problem of graph exploration when robots do not knowwhat the adversary will do next ( live or online dynamism).This is contrasted with another scenario, called post-mortem dynamism, where robots have complete knowledge of howthe adversary will control dynamism in every round. In [7],Di Luna et al. studied both fully synchronous systems andsemi-synchronous systems where nodes are anonymous, i.e.do not have unique IDs. In the fully synchronous setting, theyshow that by using just robots without unique IDs, subjectto some assumptions, deterministic exploration of a ring in thepresence of 1-interval connectivity is possible with terminationdetection. These assumptions include a mix of the followingideas: (i) robots have knowledge of the value of n , (ii) thereexists a landmark (a unique node that can be identified byrobots as being unique), (iii) robots have common chirality (acommon sense of clockwise/counterclockwise). They differen-tiate between explicit termination detection where all robotscan detect the completion of exploration and subsequentlyterminate, and partial termination detection where at leastone of the robots (but not necessarily all of them) detectscompletion and terminates. They show that deterministic ringexploration with explicit termination is possible with robotswith the aforementioned assumptions. They also providematching impossibility results that deterministic exploration a r X i v : . [ c s . D C ] J a n ith partial termination is impossible with robots when n isunknown and no landmark is available, even in the presenceof robots with unique IDs and common chirality. They alsoshow that if n is unknown, no landmark is available andthe robots are anonymous, then regardless of the number ofrobots initially deployed on the ring, deterministic explorationwith partial termination is impossible. This impossibility holdseven if those robots have common chirality. An importantquestion left unanswered was if exploration with ≥ robots ispossible when no knowledge of n is known and no landmarkis available but robots may have IDs. In this paper, we furtherextended the exploration problem in the dynamic ring and tryto settle this question in the fully synchronous setting andprovide partial results in the semi-synchronous setting. A. Our Contributions
In this paper, we look into exploration of a dynamic ringwith robots and show various positive results when certainassumptions are made.We show that deterministic exploration of a dynamic ringof size n with explicit termination detection is indeed possiblewith robots when n is unknown and no landmark is present.In fact, not only is exploration possible, but the running timeof our algorithm (which is linear on the size of the ring) isasymptotically optimal. We require robots to have unique IDsand have the capability of edge crossing detection, i.e. tworobots passing through the same edge in a given round inopposite directions can detect that they passed each other inthat round. We also implement our algorithm and show that itoutperforms the theoretical time bound for different parameterranges.We subsequently remove the need for the edge crossingdetection assumption with the help of randomness. We alsoshow how to use randomness to remove the need for robotsto have unique IDs. Note that this result when we achieveexplicit termination with anonymous robots, no landmark, noknowledge of n , but access to randomness is in sharp contrastto the impossibility result of [7] where even partial terminationwith any number of robots is impossible without under thesame setting but without access to randomness. We also showhow to modify our algorithm to achieve partial terminationwith better runtime. Our positive results are summarized inTable II.One may wonder if either the use of edge crossing detectionor the use of randomness is sufficient for robots to bypass theimpossibility result from [7]. We show that when robots onlyhave access to edge crossing detection, exploration with partialtermination of two robots is impossible. We further show thatwhen the use of randomness is also allowed, exploration withexplicit termination of two robots is impossible. Thus, we seethat only with the use of robots do either of these capabilitiesprovide sufficient power to overcome the impossibility ofexploration with explicit termination. Our impossibility resultsare summarized in Table I along with a comparison to theimpossibility result from [7]. Finally, we show how to use the ideas we built up through-out the paper in order achieve partial termination in the semi-synchronous setting when robots do not know an upper boundon the value of n or a have access to a landmark. The algorithmuses robots with unique IDs, access to randomness, andaccess to the edge crossing detection capability. B. Related Work
Exploration of static anonymous graphs using mobile robotshas been studied for a very long time. A good survey onthe topic is presented in [4], [6]. Exploration on anonymousgraphs with 1-interval connected dynamism is relatively newand the first paper to study it in the current model is [7].In the paper, they look at exploration problem in a ringunder 1-interval connected dynamism and provide variousdeterministic algorithms to solve the problem using robotsfor various assumptions. It should be noted that the way 1-interval connectivity is defined in their paper and also in thecurrent paper is different from the original definition proposedin [17], [20]. Specifically, the original definition of 1-intervalconnectivity allows for permutations of the nodes of the graph,whereas in [7], the nodes remain stationary and the adversarycan only choose whether to remove at most one of a fixed setof edges.A randomized approach to graph exploration was presentedin [3] via random walk, however the model of dynamism theylook at is slightly different. Their approach is that of a lazyrandom walk, but when the rate of change of the graph isvery fast, i.e. every round the adversary changes the graph,then things become complicated. Essentially their approachmay take Ω( n ) time to explore a dynamic ring of size n ,however, it cannot guarantee any termination.There are other works in literature which have addressedthe problem of exploration on dynamic graphs. Explorationproblem on dynamic ring for T-interval connected case isaddressed in [16]. They have addressed the problem in twoscenarios. In one scenario the robot knows about all changes inthe dynamic ring. In another case the robot has no knowledgeabout the changes but the edges are δ -recurrent. They haveextended their work in [14] and addressed the explorationproblem on cactus graph when change in the graph topologyis known to the robot. There are other works like [10], [19]which address the exploration problem for general graphsin centralized environment when the change in the graphtopology is already known. There are works [11], [15] whichaddress the live or online version of the exploration problemin distributed environment for periodically varying graphs.In this case there are finite number of carriers in the graphand an edge between two nodes exist only when a carriermoves from one node to the other. They have assumed thatthe movement of each carrier is periodic. A very recent work[13], studies exploration in time-varying graphs (including -interval connectivity) of arbitrary topology, investigates thenumber of robots necessary and sufficient to explore suchgraphs. There have been other papers that look at different2 ABLE IF
ULLY SYNCHRONOUS SETTING , IMPOSSIBILITY RESULTS . Paper n , No landmark Non-anonymous robots, Chirality Partial termination impossible[7] Any No knowledge of n , No landmark, Chirality Partial termination impossibleAnonymous robotsCurrent paper 2 No knowledge of n , No landmark Non-anonymous robots, Chirality, Partial termination impossibleEdge crossing detectionCurrent paper 2 No knowledge of n , No landmark Non-anonymous robots, Chirality, Explicit termination impossibleEdge crossing detection, Access to randomness TABLE IIF
ULLY SYNCHRONOUS SETTING , POSSIBILITY WITH ROBOTS . R
ESULTS : EXPLORATION WITH EXPLICIT TERMINATION . Assumptions Running timeNon-anonymous robots, Edge crossing detection Explicit termination in O ( n ) roundsNon-anonymous robots, Access to randomness Explicit termination with probability ≥ − /n in O ( n log n ) rounds on expectationAccess to randomness Explicit termination with probability ≥ (1 − O (1 / l ))(1 − /n ) in O (( n + n · l ) log n ) rounds on expectation ∗∗ Here, l is an input parameter to the algorithm. problems such as gathering [8] and dispersion [1] on dynamicgraphs under 1-interval connectivity. C. Organization of Paper
In Section II, we elaborate on the exact model of thesystem. In Section III, we present our impossibility resultsfor termination with just 2 robots. In Section IV, we developour algorithm to achieve exploration with explicit terminationusing 3 robots, including simulations of the algorithm. InSection V, we show how to remove the requirement of edgecrossing detection and unique IDs for robots in our algorithmthrough the creative application of access to randomness. InSection VI, we extend our deterministic algorithm to achieveexploration with partial termination using 3 robots in semi-synchronous model. Finally, we conclude with future researchdirections in Section VII.II. N
ETWORK M ODEL AND A SSUMPTIONS
We consider a -interval connected synchronous dynamicring R of size n as considered in [6], [7]. As R is a ring,each node in R has two neighbours connected via two ports.The ring is anonymous, i.e., nodes are indistinguishable. Weassume that the nodes are fixed, but the edges of R maychange over time. More precisely, at any round one of theedges might be missing from R . An adversary decides whichedge to be deleted in a round. This dynamic ring is called asa -interval connected ring [7], [18]. The adversary controlsthe edge deletion (and addition) with the knowledge of thealgorithm and current states and positions of the robots.There are three robots A = { R , R , R } which explore R . Each robot is equipped with a finite memory, say O (log n ) bits and computational capabilities. Each robot has a uniqueidentifier (ID) and initially a robot only knows its own ID.Furthermore, we assume that the IDs are k -bit strings suchthat the length k is O (1) . It is sufficient to represent distinctIDs with constant number of bits. ID of a robot is representedas b k − b k − · · · b b . We assume that the length of each IDis same. Initially robots do not know the size of the ring (not even any bound of it). The robots do not share any commonchirality, i.e., the clockwise or anti-clockwise direction forall the robots may differ. During movement, at any nodea robot can differentiate between the port through which itenters the node and the other port. All the robots execute thesame protocol. Multiple robots can reside at a single nodeat the same time. The robots can move from one node to aneighboring node in some round if the corresponding edge isavailable in that round. A robot can successfully move towardsa fixed direction if the corresponding adjacent edge is availablein the dynamic ring; otherwise, if the edge is missing, the robotwaits until the edge is available. We assume the edge crossingdetection , i.e. two robots moving in opposite directions on thesame edge in the same round, can detect that they passed eachother in that round and exchange information.We consider here a synchronous system which progressesin time steps, called as rounds. In a single round, the sequenceof operations executed as follows: (i) the robots perform localcomputation and decide whether to move from the currentnode and the direction of the movement, (ii) the adversaryremoves at most one edge from the ring for this round, (iii)the robots execute their movements, if any, so long as the edgethey wish to move over is present.Note that we also consider a semi-synchronous system inSection VI. As most of the paper relates to a fully synchronoussystem as previously described, we postpone the descriptionof the semi-synchronous system to Section VI.III. I MPOSSIBILITY OF E XPLORATION WITH
OBOTS
In this section, we extend the impossibility results from [7]to the scenario where robots also have the edge crossingdetection capability and access to randomness. First, we makea similar observation to Observation 2 from [7].
Observation 1.
The adversary can prevent two robots startingat different locations from meeting each other even if they haveunlimited memory, common chirality, distinct known IDs, theedge crossing detection capability, and access to randomness.
Theorem III.1.
There does not exist any exploration algo-rithm with partial termination of anonymous rings of unknownsize by two robots, even when robots have distinct IDs,common chirality, the edge crossing detection capability, andwhen the scheduler is fully synchronous.Proof.
Let there exist an algorithm A that achieves explorationwith partial termination with two robots, say R and R . Runthis algorithm on a ring of size n and consider any adversarystrategy that prevents R and R from ever meeting. FromObservation 1, we know such a strategy is possible. Let usassume that, without loss of generality, R terminates firstafter T ( n ) rounds. We now construct a ring and adversarystrategy such that A will fail, i.e. never achieve exploration.Consider the ring of size T ( n ) + 4 and place R and R on nodes that are at distance T ( n ) + 2 from each other, i.e.at opposite ”ends” of the ring. Have each robot run A andlet the adversary act such that R ’s local view at each timestep is similar to its view when R ran A on the ring of size n . Thus, after T ( n ) time steps (rounds), R will terminateand by Observation 1, R never came into contact with R .Subsequently, in each future round the adversary will removeany edge that R may want to traverse and thus ensure that R does not explore any more nodes. After T ( n ) rounds, R and R would have collectively explored at most T ( n ) +2 nodes and thus A fails to achieve exploration, which is acontradiction.We now provide a similar impossibility result when robotshave access to randomness. Note that for this result, weare showing the impossibility of explicit termination and notpartial termination. Also note that the proof is similar to that ofthe previous theorem with a few subtle but significant changes. Theorem III.2.
There does not exist any exploration algo-rithm with explicit termination of anonymous rings of unknownsize by two robots, even when robots have distinct IDs, com-mon chirality, the edge crossing detection capability, accessto randomness, and when the scheduler is fully synchronous.Proof.
Let there exist an algorithm A that achieves explorationwith explicit termination with two robots, say R and R .Run this algorithm on a ring of size n . Define T ( n ) to bethe maximum running time for both robots to terminate, overall choices of randomness and all adversarial strategies thatprevented R and R from meeting. By Observation 1, weknow that such strategies exist. Define an execution j of A asa vector of all the random choices, information communicated,local computation, and movements performed by both robots until termination. Define V R ( i, j ) as the vector of local viewsof R for all rounds up to round i for some execution j of A . Define V R ( j ) as the vector of local views of R for allrounds up to termination for some execution j of A . Define V R ∞ as the set of all V R ( j ) across all executions j of A forall possible choices of randomness and all possible adversarialstrategies subject to the condition that R and R never meet.We now construct a ring and adversary strategy such that A will fail, i.e. never achieve exploration.Consider the ring of size T ( n ) + 4 and place R and R on nodes that are at distance T ( n ) + 2 from each other. Now,the adversary focuses on R and acts so that the local viewof R at round i , V R ( i, j ) will always belong to V R ∞ forthe current execution j of A . This is possible because R and R never meet in any of the executions we considered andso the local view of R in a given round is influenced onlyby which edge has been removed in that round. Furthermore,since R and R are located at distance T ( n ) + 2 away fromeach other, R will never meet R within T ( n ) rounds, so wecan safely ignore how R behaves. Now, after T ( n ) rounds, R will terminate.We subsequently have the adversary focus on R and trapthe robot within a strip of two nodes. Consider two adjacentnodes u and v and let R be present on one of them. Theadversary always removes the edge from the node that is notthe edge between u and v . Thus, R will either terminate orindefinitely move between these two nodes.In the course of the execution, R could explore at most T ( n ) + 1 nodes before it terminates and R could similarlyexplore at most those many nodes before being trapped. Thus,no more than T ( n )+2 nodes could ever be explored, resultingin A failing. This is a contradiction and thus we see that nosuch A can exist.The reason the above impossibility result works for explicittermination but not for partial termination is that when weallow robots to use randomness to make choices, it no longerbecomes clear which robot terminates first. This is not an issuefor explicit termination because we leverage the fact that bothrobots eventually terminate and consider that running time.However, for partial termination, when utilizing the adversaryto mimic the local view of one of the robots, it is unclear whichrobot we should focus on initially. And since we cannot focuson both simultaneously, if we pick the incorrect robot initially,we cannot guarantee that it will eventually terminate, and thuscannot move on to focus on the other robot.We note that, the above proof strategy and observation canbe extended to multiple robots when the adversary is mademore powerful. Define a t-adversary as one which can removeat most t edges in the graph in the given round. Note that,Observation 1 holds for t +1 robots starting at unique positionson a ring of size at least t + 2 . Thus, we can use a similar4roof strategy to prove the following theorems. Theorem III.3.
There does not exist any exploration algo-rithm with partial termination of anonymous rings of unknownsize at least t + 2 by t + 1 robots in the presence of a t -adversary, even when robots have distinct IDs, commonchirality, the edge crossing detection capability, and when thescheduler is fully synchronous. Theorem III.4.
There does not exist any exploration algo-rithm with explicit termination of anonymous rings of unknownsize at least t + 2 by t + 1 robots in the presence of a t -adversary, even when robots have distinct IDs, commonchirality, the edge crossing detection capability, access torandomness, and when the scheduler is fully synchronous. IV. D
ETERMINISTIC E XPLORATION WITH
OBOTS
In Section III, we showed that it is impossible to explore ananonymous and unknown size dynamic ring with two robotsand achieve explicit termination. In this section, we present adeterministic solution for this exploration problem using threerobots. We assume that each robot has a unique ID which isnot known to the other robots unless they meet. We furtherassume that when two robots cross an edge (from oppositedirections) in the same round, they sense each other and themeeting happened. Note that this edge crossing detectionassumption does not help two robots (with unique IDs) tosolve the exploration problem (see Section III). The outline ofthe algorithm is discussed below. The pseudocode is given inAlgorithm 1.The algorithm works in four stages: (Stage 1) first meetingof two robots, (Stage 2) second meeting of two robots,(Stage 3) exploration detection, and (Stage 4) termination.
Stage 1 ensures the first meeting of any two robots at somenode or via edge crossing in the ring. For this, we need tomake sure that at least two of them move in the oppositedirection; otherwise if all the three robots move in the samedirection at the same speed, they may never meet even if theadversary never deletes any edge. Thus we have to break thissymmetry deterministically. For this, each robot moves basedon the bit string of its ID. Each robot moves in phases and eachphase consists of several rounds. More precisely, the numberof rounds in the i -th phase is i . Without loss of generality,say that a robot moves in what it considers the clockwise (left)direction in phase i when b i mod k = 0 . When b i mod k = 1 ,the robot moves in the other (right) direction. The first stageends when at least two robots meet. Let us mark or name thetwo robots A and B , where the larger ID one is A and the We briefly recap the strategy. First run a supposed exploration algorithm A on a ring of size n that terminates in T ( n ) rounds. Subsequently, constructa ring of size ( t + 1)(2 T ( n ) + 2) and place the t + 1 robots equidistantfrom each other. Now, for partial termination (explicit termination), run A onthis larger ring and simulate the execution on the smaller ring for robot ( t robots) until it settles down and subsequently trap the remaining t robots ( robot) on already explored nodes. The total explored number of nodes willfall short the total size of the ring and hence A is incorrect. Here by ‘sense’ we mean the two robots can detect the edge crossing andcan exchange information including IDs. other is B . Note that, the third robot may not know about thismeeting and hence is unaware of the end of the first stage.Let us call the third robot as C . If these three robots meet atthe same time (at some node) then the smallest ID robot getsnamed C . Notice that if two or three robots are positioned atthe same node initially then the algorithm starts from Stage 2.Then Stage 2 starts (which is known to at least A and B ). The robots A and B start moving in opposite directionsfrom the meeting point (node) from Stage 1 and never changetheir directions until they terminate the algorithm. A and B each maintain a counter which counts the number of stepsthe robot successfully moves. Furthermore, each robot storesthe ID of the other. Note that a robot cannot move in aparticular direction in a round if the corresponding edge ismissing (i.e., deleted by the adversary). Each of the robotscontinues to move until one of them meets the third robot.The second stage ends when either of A and B meets thethird robot, which subsequently gets named C . Without lossof generality, assume that A and C meet. Then A shares thefollowing stored information with C : ID of B , the directionof B ’s movement and the number of steps A has successfullymoved after Stage 1. C stores all this information. A and C also store each other’s IDs.Then Stage 3 starts, which ensures the completion of thering exploration by at least two robots. This can happen in twoways. (I) if A and B meet (again) then it is guaranteed thatexploration of the ring is complete. This scenario is depictedin Fig. 1. (II) The adversary can prevent the meeting of A and B by removing an edge between them. Recall that A and B are moving in opposite directions. Eventually thesetwo robots will reach two adjacent nodes and may wait forthe (missing) edge to move. In this scenario, exploration iscompleted but A and B do not know this as n is unknown.If the adversary does not remove the edge in one round, then A and B will meet. Therefore, the adversary will need toremove the edge indefinitely. In this situation, robot C is usedto determine the completion of exploration. From the meetingpoint of A and C in Stage 2, robot C starts moving towards theopposite direction of A (i.e., in the same direction of B ) and A continues moving in its fixed direction. Robot B does notknow that A and C met in Stage 2, and continues to move inits fixed direction. Robot C moves towards B until it catches B . Subsequently, C changes its direction and move towards A until it catches A . C then repeats this process and moves backto B . Essentially, C performs a zig-zag movement between A and B and checks if the distance (i.e., the hop distance) from A to B and B to A are the same. For this, the robot C maintainstwo variables AtoB and
BtoA . AtoB stores the number of The third robot gets named C only after it meets either A or B at theend of Stage 2. Note that even if A and C do not have shared chirality, the directionof B can be conveyed as follows. Depending on how A and C meet, C will immediately know the direction A moves in or can take a round or twoto understand this based on how A and C both move in their “clockwise”direction and see if they moved to the same node or not. Once C determinesthe naming mechanism A uses for directions, C can understand exactly whichdirection B is moving in. A1st meeting oftwo robots B A A CA meets un-marked robot B A CB meets A(a) (b) (c)
Fig. 1. Here continuous, dashed and dotted lines shows the movement of robot A , B and C respectively. (a) Shows the scenario when two unmarked robotmeet and get marked as A and B , i.e. Stage 1 ends and Stage 2 starts. (b)Shows the scenario when A and the unmarked robot meet and the unmarkedrobot gets marked as C , i.e. Stage 2 ends Stage 3 starts, (c) Shows the scenariowhen A and B meets, i.e. Stage 3 ends. successful steps (moves) towards B , starting from A untilit meets B , and BtoA stores a similar number.When thesetwo distances are equal, i.e.,
AtoB = BtoA , the algorithmdetermines that exploration is complete, as this conditionimplies that A and B lie on adjacent nodes whose edge hasbeen removed by the adversary and thus C has explored theentire graph. This scenario is depicted in Fig. 2. Therefore,either A and B meet and detect that exploration is completed,or C deduces the completion from the hop-distance counts. Inthe latter case, C would be co-located in a node with either A or B and can thus inform that robot of the completion ofexploration. Thus, at least two robots detect the explorationcompletion but the third robot may be unaware of this. Thenwe begin Stage 4 to ensure that all robots are made aware ofexploration completion and can thus terminate.In Stage 4 , the two robots which detected the completion ofexploration move in order to inform the third robot about thecompletion, and all robots terminate (to guarantee the explicittermination). Recall that the robots A and B maintained acounter of their successful moves starting from their meetingin Stage 2. If A and B meet at the same node again, then thesum of their counters is exactly n . If they meet by crossingeach other, then the sum of their counters is exactly n + 1 .If they do not meet but the scenario from Stage 3 plays out,then C and one of the two robots knows the value of n − . Inany case, there are two robots which know that exploration iscompleted and know the value of n at some node. Then thesetwo robots start moving in opposite directions to each otherfor at most n rounds. When one of them meets the third robot,it informs the third robot about the completion of explorationand they both terminate. The other robot also terminates after n rounds (if it does not meet the third robot). We show thatafter n rounds, at least one of the robots (which detects thecompletion of exploration) meets the third robot and informsit about the completion of exploration.The formal pseudocode of the algorithm is given in Algo-rithm 1. The pseudocode is written for the situation where atmost two robots start on the same node or meet at the samenode, to aid readability. However, it is easy to modify the codeto handle the case of 3 robots meeting at the same node or B A1st meeting oftwo robots B A A CA meets un-marked robot B C(a) (b) (c)A and C meets C meets B(d) (e) (f)CCC meets BCCA C B C meets A and(AtoB = BtoA)C CAu v u vB
Fig. 2. Here continuous, dashed and dotted lines shows the movement ofrobot A , B and C respectively. (a) Shows the scenario when two robots meetfor the first time and get marked as A and B , i.e. Stage 1 ends and Stage 2starts. (b) Shows the scenario when A and the 3rd unmarked robot meet andthe unmarked robot gets marked as C , i.e. Stage 2 ends Stage 3 starts, (c)Shows the scenario when C meets B and finds AtoB (cid:54) = BtoA , (d) Showsthe scenario when C again meets A at node v and finds AtoB (cid:54) = BtoA (e)Shows the scenario when C again meets B at node u and finds AtoB (cid:54) = BtoA (f) Shows the scenario when C again meets A at node v and finds AtoB = BtoA and Stage 3 ends. u and v are two consecutive nodes in R .As nodes in R are not identifiable, the name of nodes are used for the easeof understanding. initially located at the same node. The pseudocode requires usto define some parameters. Each robot maintains the followingvariables: • size : size of the ring (initialized to ∞ ). • step : stores the number of successful steps or moves ofa robot. • mark : takes value in { A, B, C } . Initialized to N IL forall the robots.Different events are defined below, which may occur when twoor more robots meet during the execution of the algorithm. • meetSmall: when a robot meets with a smaller ID robotand mark = N IL for both the robots. • meetLarge: when a robot meets with a larger ID robotand mark = N IL for both the robots. • meetMark: when a robot, whose mark = N IL , meetsanother robot whose mark (cid:54) = N IL . • meetX: when a robot, whose mark (cid:54) = N IL , meetsanother robot whose mark = X for X ∈ { A, B, C } . • meetTer: when a robot meets another robot which isexecuting START T ERMINATION procedure.Notice that when meetSmall event occurs for one robot, then meetLarge occurs for the other robot at the same time. Inthe pseudocode some functions are used. Small description ofthose functions are given below. • M OVE ( dir ): By executing this function a robot movesone step towards the direction specified in dir . Here valueof dir can be lef t or right .6 GET M ARK (): When two robots meet, this function re-turns the value stored at variable mark on the other robot. • GET S TEPS ( mark ): When two robots meet, this functionreturns the value stored at step on the other robot. • ASK T ERMINATE ( omark ): When two robots meet, thisfunction signals to start termination to the other robot forwhich mark = omark . • REC T ERMINATE (): When two robots meet, this functiondetects whether a robot has received a signal to starttermination or not. This function returns if signal tostart termination is received.In a ring there are two directions to move at each node. Arobot chooses a direction arbitrarily and calls that directionas left and the other direction as right . Since the robots donot share any common chirality, the left and right directionsof a robot may differ from the other robots (initially). Whentwo or more robots meet, they can decide upon the directionsand share a common chirality. The following algorithm (Al-gorithm 1) is executed by all the robots in parallel. A. Correctness and Time Analysis
We first discuss the correctness of the algorithm in thefollowing lemma.
Lemma IV.1.
Algorithm 1 correctly explores the dynamic ringand guarantees explicit termination.Proof.
We show that by the end of Stage 3, the ring isexplored (by at least two robots). Stage 3 ends when one of thefollowing two cases occurs: (I) robots A and B meet (II) robot C meets A and finds AtoB = BtoA (after zig-zag movement)or C meets B and finds AtoB = BtoA . Case I:
Robots A and B meet again after their first meetingin Stage 1. Since they move in opposite directions and neverchange directions after their first meeting, it is obvious thatwhen they meet again, exploration is completed. The robotscan also calculate the value of n when they meet again. Case II:
Robot C meets either of A and B , and learns that AtoB = BtoA . This implies that robot C has traversedsame number of steps in two consecutive zig-zag movements.This scenario is only possible if both A and B are tryingto traverse the same edge from adjacent nodes, since theadversary can remove only one edge at a time. Thus whenrobot C determines that AtoB = BtoA after two consecutivezig-zag movements, it is guaranteed that C has explored allnodes in the ring and the size of the ring is AtoB + 1 or BtoA + 1 . Fig. 2 depicts this scenario.Thus, in both cases, at least two robots detect that explo-ration is completed. Moreover, the robots which detect thisalso know the size of the ring n at the end of Stage 3. Thusin the termination stage, these two robots, which detectedthe completion of exploration, start moving in two oppositedirections for at most n rounds and terminate. It followsfrom the proof of Lemma IV.2 (below) that after n rounds,at least one of them meets the 3rd robot. So the 3rd robotalso gets the information of the completion of exploration and terminates. Thus, explicit termination is guaranteed at the endof Stage 4.Let us now analyze the time complexity of the explorationalgorithm. We calculate the time taken in each stage of thealgorithm. Lemma IV.2.
If two among the three robots move in oppositedirections in a dynamic ring of size n , then at least two ofthem meet in at most n − rounds.Proof. If any two among these three robots are initially locatedat the same node in the ring, then this lemma holds trivially.We assume that the three robots are initially located on threedifferent nodes in the ring. In this scenario, we prove thislemma by induction on the size of the ring. Recall that a robotalways tries to move in some specified direction so long asthe corresponding edge is available, i.e. it does not voluntarilyremain stationary.
Base case:
Consider the ring of size with each robot initiallylocated on a different node. As the adversary can removeonly one edge and at least two robots are moving in oppositedirections, at least two of the robots will be on the same nodeafter step (either the two moving in opposite directions meetor if the edge between them is not available then the third onecatch one of them). Thus, the base case is true. Inductive step:
Assume that the claim holds on rings up tosize l . We show that the claim also holds for rings of size l + 1 . In a ring of size l + 1 , when all three robots are locatedat different nodes, the maximum min-distance between tworobots is at most l − . As none of the robots are changingtheir direction and the adversary can remove only one edge ina round, at least one robot can successfully move one step inone round. Hence, after one round the situation on the ring ofsize l + 1 maps to a situation on the ring of size l (or at leasttwo of them meet). As this lemma holds for a ring of size l or less, at least two robots meet at some node after at most l − rounds. Therefore, it takes at most ( l −
2) + 1 , i.e., l − rounds, in a ring of size l + 1 . Hence the lemma holds. Lemma IV.3.
In Stage 1 of the algorithm, there exists a phase i ∈ [0 , k − when at least one robot moves in the directionopposite to the direction followed by other two robots, where k is the length of the ID bit-string of the robots.Proof. Recall that in the i th phase a robot moves in somedirection for i rounds. It then changes its direction of move-ment in the next phase iff the next bit in its ID is different.Consider the scenario where all robots move in the samedirection starting from the first phase (otherwise the lemmais trivially true). There are two scenarios to consider. Eitherall robots share the same chirality or they do not.Consider the scenario where all robots share the samechirality. Since the IDs of the robots are different, at least onebit in the ID of each pair of the robots are different. Hencethere will be at least two phases in between to k − when Here, min-distance refers to the shortest path distance between two robotson the ring.
Lemma IV.4.
Stage 1 of Algorithm 1 finishes in at most n + n · k rounds, where k is the length of the ID bit-string of therobots.Proof. We show that there exists a phase i ∈ [0 , j ( k − whenat least two robots meet in Stage 1, where k is the length of theIDs of the robots and j is some positive integer. It follows fromLemma IV.3 that there exists a phase i ∈ [0 , k − when atleast two robots move in the opposite directions to each other.The number of rounds in that phase is i . If i ≥ n − then itfollows from Lemma IV.2 that any two robots meet. However,it might be the case that i < n − for that i in [0 , k − . Thenaccording to our algorithm (see Stage 1), these two robots(again) move in the opposite directions in each of the phases j ( k −
1) + i for j = 1 , , . . . , and hence Stage 1 finishes when j ( k − ≤ n − and j ( k − i ≥ n − for some positiveinteger j . Thus, Stage 1 takes at most (cid:80) j ( k − it =0 t rounds.The sum is bounded above by ( n + n · i ), since j ( k − ≤ n − .Therefore, Stage 1 of Algorithm 1 finishes in at most n + n · k rounds, since i < k . Algorithm 1 E XPLORE -D YNAMIC -R ING -3-R
OBOTS1: i := while ( ) do if b i mod k = 0 then
4: E
XPLORE ( left , i)5: else if b i mod k = 1 then
6: E
XPLORE ( right , i)7: i := i + 1 Procedure 2 E XPLORE ( dir , i) for tstep = 0 to ( i − ) do if meetSmall then
3: B E R OBOT
AB( A )4: else if meetLarge then
5: B E R OBOT
AB( B )6: else if meetMark then
7: B E R OBOT
C()8: M
OVE ( dir ) Lemma IV.5.
Stage 2 of Algorithm 1 finishes in at most n rounds.Proof. Stage 2 finishes when any of the two robots A and B meets C after their ( A and B ) first meeting in Stage 1. Notethat A and B start moving in the opposite directions fromafter Stage 1. Thus it follows from the proof of Lemma IV.2that one of them meets C in at most n − rounds. Lemma IV.6.
Stage 3 of Algorithm 1 finishes in at most n rounds.Proof. Stage 3 finishes when either (I) A and B meet againwhich ensures that exploration is completed, or (II) robot C detects the completion of exploration from the step countsof its zig-zag movement, i.e., when AtoB = BtoA = n − .Generally, the adversary can block the movement of one robot,since it can delete at most one edge. It can block the movementof two robots only when they are on the adjacent nodes of anedge and want to move through that edge, but the adversarykeeps the edge deleted. Suppose these robots A and B couldnot meet in n rounds (after the end of Stage 2). Then they mustbe at the adjacent nodes of the deleted edge, which followsfrom Lemma IV.2. Subsequently, robot C will eventually findone of the robots, say A , in at most n rounds. C will thenperform one iteration of the zig-zag movement and find B in n − rounds (and set its counter AtoB to n − ). In the next n − rounds, C moves back to A and sets BtoA to n − aswell. Thus, when AtoB = BtoA = n − , C concludes thatexploration of the ring is complete and can inform A of thesame. Thus Stage 3 finishes in at most n rounds. Lemma IV.7.
Stage 4 of Algorithm 1 finishes in at most n rounds.Proof. In Stage 4, two robots, which have detected thecompletion of exploration, move for at most n rounds andterminate. Since these two robots move in opposite directions,it follows from Lemma IV.2 that at least one of them meetsthe 3rd robot in n − rounds and they both terminate. HenceStage 4 takes n rounds. Procedure 3 B E R OBOT
AB( recM ark )
1: step := if mark = NIL then mark := recMark while ( ) do if mark = A then
6: M
OVE ( left )7: else
8: M
OVE ( right )9: if move successful then
10: step := step+111: if meetB or meetA then if mark = A then
13: recStep :=
GET S ETPS ( B )14: size := step + recStep + START T ERMINATION ( A , left , size)16: else
17: recStep :=
GET S ETPS ( A )18: size := step + recStep + START T ERMINATION ( B , right , size)20: else if meetC and REC T ERMINATE () = 1 then
21: size :=
GET S TEPS ( C ) + if mark = A then START T ERMINATION ( A , left , size)24: else if mark = B then START T ERMINATION ( B , right , size)26: else if meetTer then terminate Now we state the main result of this section.8 heorem IV.8.
Algorithm 1 correctly explores a 1-intervalconnected dynamic (anonymous) ring of size n in O ( n + n · k ) rounds with robots such that each robot has unique ID oflength k bits and the robots have no knowledge of n and nocommon chirality.Proof. The correctness of the algorithm follows fromLemma IV.1.The running time of the algorithm follows from thetime complexity analysis of the four stages in Lem-mas IV.4, IV.5, IV.6 and IV.7. Thus by summing up theindividual runtimes, we get the time complexity as ( n + n · k ) + n + 4 n + n = 7 n + n · k .Hence, Algorithm 1 explores a dynamic ring of size n withthree robots in (7 n + n · k ) rounds, where each robot has aunique ID of length k bits. Procedure 4 B E R OBOT
C() AtoB := BtoA := recMark := GET M ARK ()4: if mark = NIL then mark := C if recMark = A then dir := right else if recMark = B then dir := left while ( ) do
11: M
OVE ( dir )12: if move successful then
13: step := step+114: if meetB then
15: AtoB := step16: if AtoB (cid:54) = BtoA then
17: step := 018: else
19: size := step + ASK T ERMINATE ()21:
START T ERMINATION ( C , left , size)22: else if meetA then
23: BtoA := step24: if AtoB (cid:54) = BtoA then
25: step := 026: else
27: size := step + ASK T ERMINATE ()29:
START T ERMINATION ( C , right , size)30: else if meetTer then terminate Procedure 5
START T ERMINATION ( mark , dir , size)
1: Ttime := size2: while (1) do
3: M
OVE ( dir )4: Ttime := Ttime-15: if Ttime = then terminate else if ( meetA or meetB or meetC ) then terminate Corollary IV.8.1.
There exists an algorithm which explores a1-interval connected dynamic (anonymous) ring of size n in O ( n ) rounds with robots having unique IDs of length O (1) bits and without the knowledge of n and without commonchirality.B. Simulation Results We perform experimental evaluation and highlight the ef-fectiveness and efficiency of our algorithm in dynamic ringsfor different parameter ranges. In particular, we evaluated theperformance of our algorithm by computing the running timefor different sizes of the dynamic ring (i.e., number of nodesin the ring) and also for different ID lengths of the robots. Inthe simulations, we assumed the robots are placed at randomnodes in the beginning. Furthermore, each robot decides itsinitial direction of movement randomly, i.e. each robot decidesclockwise (left) or anti-clockwise (right) direction randomly.We assume an adversary determines the dynamic ring ineach round. In particular, the following four different adver-sarial strategies are considered for the simulations. • Random Edge Deleted (RED):
At each round, the adver-sary randomly selects an edge in the ring and deletes it.The previously deleted edge gets added to the ring. • Same Edge Deleted (SED):
The adversary randomlyselects an edge in the ring and keeps the edge deletedthroughout the execution. • Random Robot Blocking (RRB):
At each round, the ad-versary targets a random robot, and block the movementof the robot in that round. This is done by deleting theedge through which the robot decides to move in thatparticular round. • Same Robot Blocking (SRB):
The adversary randomlyselects a robot and block the movement of the robotthroughout the execution by deleting appropriate edges.That is, the robot is not allowed to move from its initialposition.The robots have no knowledge about the adversarial strate-gies, but the adversary knows the robots’ current positionincluding the edges through which the robots decide to move.Thus the above adversarial strategies are adaptive. In all thecases, the dynamic ring remains connected throughout theexecution.
Varying the Size of the Ring (Fig. 3):
In this experiment,we consider dynamic ring of five different sizes, i.e., n =20000 , , , and . The robots have IDof length ; in fact, the ID-bits are taken , and for the 3 robots. We run the algorithm for times for eachvalues of n and count the average number of rounds taken toexplore the ring. We plot the results in Fig. 3, where the x-axisrepresents the ring size– n and y-axis represents the obtainedrounds to explore the ring. Observe that the time or the numberof rounds to explore the ring increases when the size of thering n increases. However, in all the cases, the running timeof our algorithm is bounded above by n for all the differentadversarial strategies. The running time is less than n forthe strategies RED and RRB. This shows that the simulationresults outperform our theoretically proven time bound– n + n · k , where k is the ID length of a robot.9 N u m b e r o f r o un d s SEDRED RRBSRB
Fig. 3. Varying n , the size of the ring. N u m b e r o f r o un d s SRBSED REDRRB
Fig. 4. Varying the ID length of the robots.
Varying the ID Length of the Robots (Fig. 4):
In thisexperiment, we consider a ring of size . The length of theIDs of each robot varies from to (notice that log n = 15 as ). Particularly, ID length of the robots areconsidered , , , and for the simulations. The ID-bitsare generated randomly. In this case also, we run the algorithmfor times on each different ID lengths and count the averagenumber of rounds taken to explore the ring. Again we performthe simulations for the four adversarial strategies. We plot thissimulation results in Fig. 4, where the x-axis represents the IDlength and y-axis represents the rounds taken by the algorithmto explore the ring. Observe that in all the cases, the runningtime of the algorithm is bounded above by n , where n isthe ring size. In fact, the running time is less than n forthe strategies RED and RRB. In this case also, the simulationresults outperform our theoretically proven time bound.V. E XPLORATION WITH R ANDOMNESS
We can remove the need for edge crossing detection throughthe creative use of randomness, resulting in an algorithm that is both Las Vegas and Monte Carlo in nature. We bound thealgorithm’s expected running time and success probability inthe following section. Subsequently, we show how to furtheruse randomness to remove the requirement of having uniqueIDs initially assigned to each robot.
A. Removing Edge Crossing Detection
In this section, we first discuss the changes to the Algo-rithm 1 that are required to make it work. We then subse-quently provide bounds for the running time and correctness.Notice that edge crossing detection is used when two robotsare located at adjacent nodes and must move in oppositedirections along the same edge in the same round. A simpleway to get the robots to meet is to force one to be stationarywhile the other moves. This can easily be achieved by havingeach robot flip a fair coin to decide if it should move or not. Ifthe result of the coin toss is heads, then the robot performs themovement it initially planned to do. If the result is tails, thenthe robot does not move. Call this subroutine as R
ANDOM -M OVEMENT .R ANDOM -M OVEMENT can be run as a subroutine by everyrobot in every round, after deciding to move (and where to)but before the actual movement. We now describe how tofurther modify E
XPLORE -D YNAMIC -R ING -3-R
OBOTS (Algo-rithm 1), in addition to using the subroutine, so that we mayremove the need for edge crossing detection.In Stage 1, notice that if the algorithm required a robot tomove for s steps in r rounds, then directly using R ANDOM -M OVEMENT in the algorithm may cause that robot to movefor less than s steps in r rounds, even when the adversarydoes not block any movement of the robot. This is slightlyproblematic as we require that there exists a phase in whichrobots can move for at least n steps, and we do not want todrastically increase the running time. An easy fix is to extendthe number of rounds of each phase i by a constant factor,say , in order to ensure that on expectation and with highprobability, the number of steps a robot moves through is atleast i when i ≥ n . For Stage 2 to occur, we need two robots to come intocontact with each other and be marked A and B . Since theprobability that two robots that were supposed to move throughthe same edge meet instead is / , on expectation, at least onesuch meeting occurs within phases of the first phase i where i ≥ n . Thus, on expectation after O ( n ) rounds are complete,Stage 1 is over and Stage 2 begins.Now, in Stage 2, we require either A or B to come intocontact with the third robot. Notice that this third robot isnot constrained to only move in one direction, but may movein both directions. Thus, it may only come into contact witheither A or B as a result of crossing an edge. Again, throughthe use of R ANDOM -M OVEMENT , it takes such attemptson expectation at edge crossing between the third robot andeither A or B before contact is made and the third robot gets The expectation is easy to see. The high probability bound can be seenby applying a simple Chernoff bound. C . Then the algorithm moves to Stage 3. Noticethat before the third robot becomes marked, it is possible that A and B meet again, thus sending the algorithm directly intoStage 4 (since A or B may miss to meet C as there is no edgecrossing detection).If the algorithm is in Stage 3, then the third robot has beenmarked C . Now, either A and B meet again or the adversaryblocks A and B at adjacent nodes and C moves back andforth between them. In the latter case, it takes O ( n ) roundswith high probability to move to Stage 4 and C , and one of A and B will know the exact value of n . In the former case,after some cn rounds, where c is a positive constant, A and B will meet on expectation. Thus, A and B will know an upperbound cn of n .In Stage 4, let us assume that without loss of generality, twoof the robots A and B learn an upper bound N on the valueof n , i.e., N = cn for some constant c . Now, either the thirdrobot is marked or it is not. Either way, our goal in this stageis to inform this third robot that exploration is complete. It ispossible that every interaction of A or B with the third robotis a situation where edge crossing would normally occur. Inthe event of one such interaction, the probability of the thirdrobot being informed is / . After N such interactions,the probability of the third robot being informed is at least − /n . Recall that in this stage, robots A and B usea counter and will stop after N rounds. If we change thecounter to end at N log N instead, then the third robot has N log N opportunities with high probability to interact witheither robot. Thus, with probability at least − /n the thirdrobot will interact with at least one of the robots and terminate,eventually resulting in explicit termination.Construct the new algorithm M ODIFIED -E XPLORE -D YNAMIC -R ING -3-R
OBOTS using the above mentionedmodifications to the stages and the use of R
ANDOM -M OVEMENT . Theorem V.1.
When the robots run M ODIFIED -E XPLORE -D YNAMIC -R ING -3-R
OBOTS , exploration of the ring with ex-plicit termination occurs with probability at least − /n in O ( n log n ) rounds on expectation.Proof Sketch. The running time is a result of the modificationsto Stage 4 adding O ( n log n ) rounds and the use of R ANDOM -M OVEMENT changing exact running time to expected runningtime.The change from explicit termination to explicit terminationwith high probability is a result of the modification to Stage 4.As we have two robots surely terminating after a certainnumber of rounds, we can only guarantee with probabilityat least − /n that the third robot will terminate as well. The high probability is a result of the use of R
ANDOM -M OVEMENT . It is possible that A and B may have crossed each other several timesbefore the adversary blocks them at adjacent nodes and the latter case occurs.In this case, C and the robot it finally interacts with will know an upperbound on n . Note that if A and B cross each other at least twice, then onexpectation they will meet, leading to the former case. Remark 1.
If we relax our termination condition to par-tial termination, we can eliminate Stage 4 of M ODIFIED -E XPLORE -D YNAMIC -R ING -3-R
OBOTS entirely and simplyhave robots terminate instead of moving to Stage 4. Then theexploration of the ring with partial termination occurs withhigh probability in O ( n ) rounds on expectation.B. Assigning Unique IDs Throughout this paper, we made the assumption that eachrobot was initially assigned a unique ID from the range [1 , k ] prior to the start of the algorithm, where k is the length ofthe ID bits. This assumption can be removed by having eachrobot pick an ID uniformly at random from a range of numbers [1 , l ] , where l is a parameter to the algorithm . It is easy tosee that the probability that all robots have unique IDs is (1 − / l )(1 − / l ) = 1 − O (1 / l ) . It should be noted that although l can be made arbitrarily large to improve the probability thateach robot has a different ID, a larger value of l possibly resultsin a longer runtime of the algorithm (refer to Lemma IV.4). Theorem V.2.
When robots run M ODIFIED -E XPLORE -D YNAMIC -R ING -3-R
OBOTS and choose IDs uniformly atrandom from the range [1 , l ] , exploration of the ring with ex-plicit termination occurs with probability at least (1 − /n )(1 − O (1 / l )) in O (( n + n · l ) log n ) rounds on expectation. VI. E
XPLORATION IN S EMI -S YNCHRONOUS S ETTING (SSYNC)In this section, we show how to extend our ideas to thepassive transport semi-synchronous model proposed in [7] inorder to achieve exploration with partial termination using 3robots even in the absence of a landmark or the knowledge of n . Recall that in the semi-synchronous setting, in every round,a subset of the robots are put to sleep by the adversary withthe restriction that the number of rounds any robot remainsasleep is finite. In this setting, passive transport relates to howthe robot moves given the following setup. Suppose a robot isawake and wants to travel along an edge e in a round i andthe adversary removed that edge in that round. Now, supposethe adversary subsequently puts the robot to sleep from round i + 1 until some round j . If e is present again for the first timein some round k : i + 1 ≤ k ≤ j , then the robot moves alongthe edge in round k even though it is asleep.In this setting, Di Luna et al. [7] showed that with 3 robotsand either the knowledge of an upper bound on n or thepresence of a landmark, they were able to achieve explorationwith partial termination. We show that it is possible for 3robots to achieve exploration with partial termination withouteither of the above two requirements, so long as the robotshave access to randomness and the ability of edge crossingdetection. We assume that robots have unique IDs, but thatrequirement can be removed through the use of randomnessas described in Section V-B. Since the number of robots is given to the robots, they can use it to seta value for l , e.g., l = 2 + 12 = 20 .
11e consider the four stage algorithm presented in Sec-tion IV and show how to modify it to achieve exploration withpartial termination in this passive transport semi-synchronousmodel. We first replace Stage 1 with the following zero roundprotocol. Each robot flips a coin and chooses which directionto move (until Stage 2 is reached) based on the result of thecoin toss. With probability / , two robots will move in onedirection while the third moves in the other direction. Stage 2proceeds as described in the original algorithm. Stage 3 ismodified as follows. Robot C will check for an additionalcondition before determining that the ring has been explored.If AtoB = BtoA , and A and B were both trying to move onan edge removed by the adversary, then C determines that thering has been explored. We explain below how C can detectthat A and B were trying to move on an edge. Note that it isnot necessary that A and B were awake when C visited, butmerely that they were attempting to move.The reasoning behind the above changes is that Stage 1and Stage 4 require robots to rely on counting the numberof rounds. While the simple trick of flipping coins to choosedirections solves the Stage 1 problem, there is no immediatefix to the problems present in Stage 4. For Stage 3, we requirethe above change in order to protect against the adversarysimply putting A and B to sleep while C moves back andforth between them. The condition ensures that C has to seethem both wanting to move (but not necessarily awake) andprevented to by the adversary before deciding to terminate.Since the adversary can only keep a robot asleep for a finitenumber of rounds and only remove at most one edge from thegraph, eventually, one of the robots will make progress on thering until either the condition is met or A and B meet.There is the following subtlety to take into account. Supposethat two robots cross the same edge in the same round (orend up co-located at the same node) and at least one ofthem is asleep. We need both of them to detect that suchan edge crossing (or meeting) occurred and furthermore, beable to swap data with one another. This data should includeinformation about whether one of the robots tried to movealong an edge while awake but was subsequently put to sleepbefore the move could be completed.With the above modifications, we get an algorithm with thefollowing properties. Theorem VI.1.
There exists an algorithm that correctly ex-plores a -interval connected dynamic (anonymous) ring ofsize n with probability / in O ( f n ) steps, where f is thelargest interval of time between two consecutive activationsof any robot, using robots with unique IDs that neither havecommon chirality, nor knowledge of an upper bound on n , noraccess to a landmark. Note that we measure number of steps moved and notrunning time. Furthermore, note that the number of steps is O ( f n ) and not O ( n ) . This is due to the fact that the adversarycan put A and B to sleep for an arbitrarily long time in Stage 3,but not an infinitely long time. VII. C ONCLUSIONS
In this paper, we looked into the problem of explorationof a dynamic ring in the presence of 1-interval connectivity.We first showed that exploration with explicit terminationsubject to some constraints with just two robots equippedwith unique IDs even with access to edge crossing detectionand randomness is impossible. Subsequently, we presenteda deterministic algorithm where three uniquely identifiablerobots with edge crossing detection capability explore any1-interval connected dynamic ring in optimal time. We alsoshowed how to remove the requirement of this capabilityand allow the robots to be anonymous while still achievingexplicit termination with high success probability through theuse of randomness. We finally extended our results to the semi-synchronous setting.There is an interesting line of future research. Our algo-rithms intimately used advance knowledge of the number ofrobots present in the system. If that knowledge is unknownand ≥ robots are present, is there an algorithm to solveexploration with explicit termination?R EFERENCES[1] A. Agarwalla, J. Augustine, W. K. Moses Jr., M. Sankar K., and A. K.Sridhar, “Deterministic dispersion of mobile robots in dynamic rings,”in
International Conference on Distributed Computing and Networking,ICDCN . ACM, 2018, p. 19.[2] S. Albers and M. R. Henzinger, “Exploring unknown environments,”
SIAM Journal on Computing , vol. 29, no. 4, pp. 1164–1188, 2000.[3] C. Avin, M. Kouck`y, and Z. Lotker, “How to explore a fast-changingworld (cover time of a simple random walk on evolving graphs),” in
International Colloquium on Automata, Languages, and Programming,ICALP . Springer, 2008, pp. 121–132.[4] S. Das, “Graph explorations with mobile agents,” in
Distributed Com-puting by Mobile Entities . Springer, 2019, pp. 403–422.[5] X. Deng and C. H. Papadimitriou, “Exploring an unknown graph,”
Journal of Graph Theory , vol. 32, no. 3, pp. 265–297, 1999.[6] G. A. Di Luna, “Mobile agents on dynamic graphs,” in
Distributed Com-puting by Mobile Entities, Current Research in Moving and Computing ,2019, pp. 549–584.[7] G. A. Di Luna, S. Dobrev, P. Flocchini, and N. Santoro, “Live explo-ration of dynamic rings,” in
International Conference on DistributedComputing Systems, ICDCS . IEEE, 2016, pp. 570–579.[8] G. A. Di Luna, P. Flocchini, L. Pagli, G. Prencipe, N. Santoro,and G. Viglietta, “Gathering in dynamic rings,”
Theoretical ComputerScience , 2018.[9] Y. Dieudonn´e and A. Pelc, “Deterministic network exploration byanonymous silent agents with local traffic reports,”
ACM Transactionson Algorithms , vol. 11, no. 2, pp. 10:1–10:29, 2014.[10] T. Erlebach, M. Hoffmann, and F. Kammer, “On temporal graphexploration,” in
International Colloquium on Automata, Languages, andProgramming, ICALP . Springer, 2015, pp. 444–455.[11] P. Flocchini, B. Mans, and N. Santoro, “On the exploration of time-varying networks,”
Theoretical Computer Science , vol. 469, pp. 53–68,2013.[12] P. Fraigniaud, D. Ilcinkas, G. Peer, A. Pelc, and D. Peleg, “Graphexploration by a finite automaton,”
Theoretical Computer Science , vol.345, no. 2-3, pp. 331–344, 2005.[13] T. Gotoh, P. Flocchini, T. Masuzawa, and N. Santoro, “Tight bounds ondistributed exploration of temporal graphs,” in
International Conferenceon Principles of Distributed Systems, OPODIS , 2019.[14] D. Ilcinkas, R. Klasing, and A. M. Wade, “Exploration of constantly con-nected dynamic graphs based on cactuses,” in
International Colloquiumon Structural Information and Communication Complexity, SIROCCO .Springer, 2014, pp. 250–262.[15] D. Ilcinkas and A. M. Wade, “On the power of waiting when exploringpublic transportation systems,” in
International Conference on Principlesof Distributed Systems, OPODIS . Springer, 2011, pp. 451–464.
16] ——, “Exploration of the t-interval-connected dynamic graphs: The caseof the ring,” in
International Colloquium on Structural Information andCommunication Complexity, SIROCCO . Springer, 2013, pp. 13–23.[17] F. Kuhn, N. Lynch, and R. Oshman, “Distributed computation indynamic networks,” in
ACM symposium on Theory of computing, STOC .ACM, 2010, pp. 513–522.[18] F. Kuhn and R. Oshman, “Dynamic networks: models and algorithms,”
SIGACT News , vol. 42, no. 1, pp. 82–96, 2011.[19] O. Michail and P. G. Spirakis, “Traveling salesman problems in temporalgraphs,”
Theoretical Computer Science , vol. 634, pp. 1–23, 2016.[20] R. O’Dell and R. Wattenhofer, “Information dissemination in highly dy-namic graphs,” in
Joint Workshop on Foundations of Mobile Computing,DIALM-POMC . ACM, 2005, pp. 104–110.[21] P. Panaite and A. Pelc, “Exploring unknown undirected graphs,”
Journalof Algorithms , vol. 33, no. 2, pp. 281–295, 1999., vol. 33, no. 2, pp. 281–295, 1999.