Asynchronous Rendezvous of Anonymous Deterministic Mobile Automata in the Plane
Abstract
Two mobile agents, modeled as points moving in the plane, have to meet at some point. Computationally, agents are identical deterministic finite automata. Each agent has a compass showing the cardinal directions. Agents start at two different points, chosen by the adversary. Each agent makes a series of moves. Before each move it takes a snapshot, which is the disc of radius 1 centered at the current position of the agent. This snapshot is an input that causes the automaton to possibly change state and make the next move in a chosen direction at a chosen distance. Moves of the agents are asynchronous: the adversary controls the possibly variable speed of an agent during each move. Without the possibility of leaving marks, meeting is often impossible, e.g. if agents start simultaneously at a distance larger than 1 and move at the same speed. Hence we allow the agents to use movable pebbles. All pebbles used by an agent are identical and they differ between the agents. A pebble of an agent can be dropped by it, and later possibly picked up again.
Our main result shows that, using a constant number of pebbles, deterministic rendezvous is always possible, regardless of the actions of the asynchronous adversary. The cost of a rendezvous algorithm executed by the agents is the worst-case length of the trajectory of both agents, over all adversary’s decisions. We show that our rendezvous algorithm has cost , if the initial positions of the agents are at a distance at most . This complexity is optimal.
As a by-product, we obtain the solution of the leader election problem between two anonymous agents modeled as automata asynchronously navigating in the plane.
Keywords and phrases:
Asynchronous, rendezvous, deterministic finite automaton, pebble, plane, mobile agentFunding:
Andrzej Pelc: Partially supported by NSERC discovery grant RGPIN-2024-03767 and by the Research Chair in Distributed Computing at the UQO.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Distributed algorithmsEditors:
George B. Mertzios and Andréa W. RichaSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The Background.
Meeting of mobile agents in some point of the environment is a classic task, called rendezvous or gathering, studied in distributed mobile agents computing. Agents are mobile entities that may represent software agents or mobile robots, and the environment may be a communication network or a terrain in the plane. The aim of rendezvous may be exchanging information between the agents, or planning future collaborative actions. Since mobile agents are often relatively simple devices, it is natural to model them computationally as deterministic finite automata.
The Model and the Problem.
There are two mobile agents, modeled as points moving in the plane, and starting at two different points, chosen by the adversary. The actions of the agents are modeled by the same deterministic finite automaton, i.e., agents are anonymous and identical. Each agent has a compass showing the cardinal directions. Each agent makes a series of steps. At the beginning of each step, it takes a snapshot, which is the disc of radius 1 centered at the current position of the agent. Intuitively, the agent “sees” the part of the plane at distance 1 from its current position. The information contained in the snapshot (to be specified below) is an input that causes the automaton to possibly change state and make the next move in a chosen direction at a chosen distance. Moves of the agents are asynchronous: the adversary controls the possibly variable speed of an agent during each move. Without the possibility of leaving marks, meeting is often impossible, even if agents were modeled by identical Turing machines. Indeed, if agents start simultaneously at a distance larger than 1 and move at the same speed, then their trajectories are shifts of each other, and they could never meet. Hence we allow the agents to use movable pebbles. All pebbles used by an agent are identical and they differ between the agents. A pebble of an agent can be dropped by it, and later possibly picked again. In each snapshot taken by an agent, the location of all pebbles of the agent (called domestic pebbles) in , all pebbles of the other agent (called foreign pebbles) in , and (possibly) the location of the other agent in are the input of the agent in the current step.
In any step, the agent is in some state , and it is located in some point of the plane. The snapshot taken by the agent gives it the input , where is the set of coordinates of the domestic pebbles within , is the set of coordinates of the foreign pebbles within , and is the at most one-element set of coordinates of the other agent within , with respect to the current position of the agent. Each of the sets , , and may be empty. In particular, if there is a (domestic or foreign) pebble at the current position of the agent, we say that the agent hits this pebble. The input causes the agent to transit from state to some state . Also, an agent in state with input produces an output , where is a pebble action, is a distance, and is an angle. This output causes the following behavior of the agent in the given step.
First we describe the pebble action . If the agent hits a domestic pebble then it may either pick it or perform the action leave, not changing the pebble configuration. If the agent hits a foreign pebble then it must perform the action leave, not changing the pebble configuration. If the agent does not hit a pebble at its current position , it may either drop a pebble in point , or perform the action leave, not changing the pebble configuration. (The agent cannot drop a pebble if there is already a pebble at its current position, and it cannot pick up a foreign pebble). The other two parameters of the output describe the move of the agent in the current step. The agent goes to the point at distance in the direction given by angle with respect to North. At the beginning of the next step, the agent is at point in state . The trajectory of the agent is the sequence of above described steps until rendezvous.
It should be stressed that the output of the agent and the state to which it transits depend both on the current input and the current state. It is important to explain the dependence on the input, i.e., on the current snapshot. Suppose that the agent is at a point and there is a single foreign pebble in the snapshot, located at point . Then the agent can get to point by measuring the distance between and , the angle between North and the vector and outputting . Now suppose that the agent wants to return to point . However, if it didn’t drop any pebble at , such a return is not possible, as the agent does not have any way to specify point standing at : there is nothing in its current snapshot to distinguish , and, in general, the position of cannot be “remembered” in some state to which the agent might transit. Of course, a finite number of vectors can be “remembered” using prepared states but, as the location of the foreign pebble at could not be predicted at the time of the automaton design, there may be no state of the automaton allowing it to return from to . Thus, in order to guarantee a return to , the agent should drop a pebble at and then use the snapshot at to get back to .
We now formalize the above intuitive description. Let be the family of all possible inputs which are triples , where and are finite sets of points and is a set of points of size at most 1, within a disc of radius 1. Each of these points is represented by cartesian coordinates of the respective points in the system of coordinates with origin at the current position of the agent. Let be the set of three possibilities for the current position of the agent: indicates that there is no pebble in ( is empty), indicates that there is a domestic pebble in , and indicates that there is a foreign pebble in . Let .
The actions of the mobile agent are formalized as a finite deterministic Mealy automaton . is the input alphabet, is the output alphabet, where denotes the set of positive reals. is a finite set of states with two special states: called initial and called final. The automaton starts in state . is the state transition function, and is the output function.
The meaning of the input and output symbols is the following. In each step of its functioning, the agent is in some point of the plane, in some state . It gets the input , from the snapshot at the current point. In particular, from this input , it learns the value , concerning the presence or absence of a (domestic or foreign) pebble in . Given the state and the input , the agent outputs the symbol with the following meaning. The first term indicates the pebble action performed by the agent in the current step. The second and third term indicate the distance at which the agent should go and the angle between North and the move direction, respectively.
Since we imposed restrictions on pebble actions, we have the following restrictions on the possible values of the output function . Let , let be the value learned from , and let .
-
if (there is a pebble at the current position of the agent) then (the agent cannot drop a pebble if there is already a pebble at its current position);
-
if (there is no pebble at the current position of the agent) then (the agent cannot pick up a pebble from an empty point);
-
if (there is a foreign pebble at the current position of the agent) then (the agent cannot pick up a foreign pebble);
Given the input symbol and being in a current state , the agent makes the changes indicated by the output function (it possibly drops or picks up a pebble as indicated, and goes to the indicated point of the terrain), and transits to state . The agent starts in the initial state , and its starting point is empty. In some step, the agent transits to the final state , halts and remains in this state forever. If rendezvous occurs “accidentally” before at least one of the agents transits to the final step, both agents instantly recognize this event, and they stop.
Our Results.
Our main result shows that, using finitely many pebbles, asynchronous rendezvous of identical anonymous agents modeled by a deterministic finite automaton is always possible, regardless of the actions of the adversary. While we did not try to minimize the number of pebbles used, in our solution each agent uses at most 8 pebbles. The cost of a rendezvous algorithm executed by the agents is the worst-case length of the trajectory of both agents, over all adversary’s decisions. We show that our rendezvous algorithm has cost , if the initial positions of the agents are at distance at most . We observe in Section 5 that this cost is optimal.
As a by-product, we obtain the solution of the leader election problem between two anonymous agents modeled as automata asynchronously navigating in the plane. In this problem, one of the identical agents must become a leader, and the other a non-leader.
Related Work.
The fundamental task of getting several mobile agents to the same place in some environment, called rendezvous or gathering, has been thoroughly investigated in distributed computing literature. The environment where agents operate may be either a network modeled as a graph, or a terrain in the plane. In the graph scenario, it is often assumed that nodes do not have distinct identities, and agents cannot mark nodes, although rendezvous was also considered in labeled graphs [7, 15], or when agents can mark nodes using tokens [13, 14]. A survey of randomized rendezvous in various models of the environment is provided in [1], while deterministic rendezvous in graphs has been surveyed in [16].
A large part of the literature on rendezvous in graphs assumed the synchronous scenario, where agents move in rounds. In [17], the authors presented rendezvous algorithms with time polynomial in the size of the graph and the length of agents’ labels. The amount of memory required by the agents to achieve deterministic rendezvous was investigated in [8] for arbitrary finite graphs. The authors showed that memory is necessary and sufficient to meet in all graphs with at most nodes.
Synchronous rendezvous was also studied in infinite graphs. Under this scenario, it was usually assumed that agents have distinct identities but cannot mark the visited nodes. In [7], the authors considered rendezvous in infinite trees and grids, assuming that the agents know their location in the environment. In [4], the authors presented a rendezvous algorithm working for arbitrary, even infinite, graphs. In the above papers, agents were modeled as Turing machines, without any memory limitations. Gathering several agents modeled as deterministic finite automata navigating in an infinite line was studied in [11].
Rendezvous in the infinite oriented grid is particularly important because it is closely related to the problem of approach in the plane, in which agents equipped with compasses start in arbitrary points of the plane, and have to get at a distance at most 1. Rendezvous in the grid implies approach in the plane, hence it was studied by many authors under various scenarios [3, 5, 12]. In [12], the authors assumed that agents are anonymous but they leave a trace after visiting each previously not visited node.
Asynchronous rendezvous was considered both in graphs and in the plane. In graphs, the agent chooses the edge to traverse, but the adversary controls the speed of the agent, and agents are permitted to meet inside an edge. In [3], the authors proposed almost optimal algorithms for asynchronous rendezvous in infinite multidimensional grids, under a strong assumption that an agent knows its position in the grid. In [5, 9] the authors used a much weaker assumption that agents have distinct identities. In [5], a polynomial-cost algorithm was designed for the infinite oriented two-dimensional grid, and in [9] – for arbitrary finite graphs.
The problem of gathering and of approach in the plane was considered under various scenarios. In [5], approach was considered under the assumption of total asynchrony. Agents could not mark nodes but they had distinct labels. In [6, 10] the authors considered asynchronous gathering of many mobile agents in the plane, according to the Look-Compute-Move model, where decisions of the agents may depend only on the current snapshot. In [10], the agents have limited visibility, and in [6] they can see all other agents. In the above cited papers, the computational capacity of the agent was not limited. To the best of our knowledge, the problem of asynchronous rendezvous in the plane of anonymous agents modeled as deterministic finite automata, has never been investigated before.
2 Elementary Procedures and Conditions
As usual in the literature on automata navigating in graphs or terrains, we will describe the behavior of the agents by designing algorithms that can be executed by a finite deterministic automaton, rather than formally describing the construction of an automaton by defining its output and state transition functions.
We define three basic instructions that will be used in our algorithms: drop, pick, and . The first two implement the pebble actions drop and pick, respectively, as defined in the formalization of the automaton. The third instructs the agent to go at distance in direction forming angle with direction North (where ). Thus, for example, means “go South at distance 1” and means “go East at distance 2/3”.
As the angles used in our algorithms will be most often multiples of , we will use the more descriptive (semi-)cardinal directions North, North-West, West, South-West, South, South-East, East and North-East, instead of angles , , , , , , and , respectively, writing, e.g., instead of and instead of . Call directions cardinal and directions diagonal. Since distance 2/3 will be used most often for cardinal directions, and distance will be used most often for diagonal directions, in order to abbreviate even further, we will write instead of if is a cardinal direction, and instead of if is a diagonal direction.
Using the instruction , we define the simple procedure go-to , where is some point in the current input of the agent, as usual, given by its Cartesian coordinates with respect to the current position of the agent.
For two points and in a snapshot, denotes the distance between and .
Moreover, in our algorithms, we will often use the following conditions regarding the current input of the agent. Condition domestic hit means that there is a domestic pebble at the current location of the agent. Condition foreign hit means that there is a foreign pebble at the current location of the agent. These conditions can be verified in each step of the algorithm.
Consider the system of Cartesian coordinates with origin at the current position of the agent, the -axis pointing East and the -axis pointing North. For two points and , we say that dominates if or ( and ). Clearly, domination is a linear order among points in the plane.
3 The Algorithm
The main idea of Algorithm Automata Rendezvous is to mark the starting point of the agent in an unambiguous way, then to systematically explore the plane until a similarly marked starting point of the other agent is found, decide which of the two starting points is dominating, go to the dominating one and stop.111Hence, our algorithm is designed so that rendezvous normally occurs at the starting point of one of the agents. However, agents could also meet “accidentally” in other points, due to the asynchronous nature of their navigation. In such case, agents become instantly aware of this fact and the algorithm is interrupted, as rendezvous has been achieved. There are, however, several challenging problems with implementing this general idea. The first one concerns unambiguous marking. This can only be done with pebbles. However, pebbles must be also used to explore the plane: there is no way to explore it by an automaton without pebbles (cf. [2]). Hence, it must be guaranteed that the other agent will not confuse the starting point of a given agent with one of its pebbles used for exploration. Second, exploration must be conducted in a way guaranteeing that at some point the agent will find the starting point of the other agent in its snapshot, and be able to decide which of the two starting points is dominating. The third and, perhaps, the most important problem is due to the asynchronous nature of agents’ navigation. It could happen that an agent gets near the starting point of the other agent , before this agent marks its starting point as required. Thus, agent cannot know yet that it sees the starting point of . Further exploration of the plane by agent would cause getting farther from the starting point of , and risk never getting close to it after it becomes correctly marked. Finally, each agent must guarantee the possibility of getting back to its starting point, if it happened to be dominating.
In this section, we explain the high-level idea of how to overcome these obstacles. Due to lack of space, the detailed description of the algorithm is omitted.
3.1 High-Level Idea of the Algorithm
Algorithm Automata Rendezvous consists of two parts. The aim of the first part, called Creating the base, is the unambiguous marking of the starting point. This is done using two pebbles. The agent drops a pebble at its starting point, then goes North-East at distance , drops another pebble, and comes back to its starting point. The choice of the small distance and of the direction North-East will guarantee that this marking of the starting point is unambiguous: such a configuration of pebbles of this agent, called its base, will never happen again.
The aim of the second part, expansion, is systematic exploration of the plane, until the base of the other agent is found. The agent initiates it by dropping four pebbles at distance from its starting point, in the four cardinal directions: North, West, South and East. These pebbles are called, respectively, , , and (as mentioned in the model description, they all look identical). Expansion proceeds in phases, each of which starts with the agent at pebble . Each phase consists of two parts. In the first part of a phase, the agent first moves South-West by steps of length until it sees a domestic pebble (it is its pebble ), then moves South-East by steps of length until it sees a domestic pebble (it is its pebble ), then moves North-East by steps of length until it sees a domestic pebble (it is its pebble ), and finally moves North-West by steps of length until it sees a domestic pebble (it is again its pebble ). In the second part of a phase, the agent “pushes” the pebble at distance North, gets to pebble , first going South at distance and then South-West, pushes the pebble at distance West, gets to pebble , pushes this pebble at distance South, gets to pebble , pushes it at distance East, and then gets back to pebble .
During the first part of each phase, the agent updates a variable specifying in which quadrant of the plane (with respect to its initial position) the agent is currently situated: values of this variable can be , , , or . By definition, the North-West quadrant includes its border half-line North, the South-West quadrant includes its border half-line West, the South-East quadrant includes its border half-line South, and the North-East quadrant includes its border half-line East. The value of the variable will help to determine the dominance between the initial positions of the agents.
Expansion proceeds until one of the following events:
-
Base: the foreign base is in the snapshot of the agent;
-
Agent: the foreign base is not in the snapshot of the agent, and the other agent is in the snapshot of the agent.
We will show that one of these two events must eventually occur. If the event Base occurs then the agent decides which of the two points, its own starting point or the starting point of the other agent (which is the southwestern pebble of the foreign base), is dominating. In the first case, the agent goes to the most recent domestic pebble, then to its own starting point and stops. In the second case, the agent goes to point and stops.
We now explain how the dominance between and is decided. This depends on the quadrant in which the agent was when the event Base occurred, and on the current snapshot . Without loss of generality, assume that this was quadrant , and that the position of the agent (in the segment between pebbles and ) was (see Fig. 1). Notice that if the agent is neither at its pebble nor at the first step of its journey towards the pebble then, regardless of where the point is situated in the snapshot , its -coordinate with respect to is negative because the -coordinate of with respect to is at most . Hence, in this case, is dominating. Thus, it remains to consider the cases when the agent is at its pebble and when it is at distance South-West from it.
If the agent is at its pebble , the decision is easy. If the -coordinate of with respect to is positive then is dominating, and if it is negative then is dominating. If it is 0, i.e., the point is on the vertical line passing through , then the -coordinate decides. If the agent cannot see its own starting point (the pebble is too far from ) then must be above and hence is dominating. If the agent can see its own starting point then it compares which of the points or is farther North and this is the dominating point among them.
If the agent is at distance South-West from its pebble then the decision is made as follows. If the -coordinate of with respect to is at most 0 then is dominating. Otherwise, let be the distance between and , and let be the angle between the segment and the half-line originating at and going East. The distance from to the vertical line passing through is . Consequently, if then the -coordinate of with respect to is negative, and thus is dominating; if then the -coordinate of with respect to is positive, and thus is dominating. If , this means that point is on the vertical line passing through . In this case, the -coordinate decides, and this can be done similarly as in the case when the agent is at its pebble .
If the event Agent occurs, the situation is more complicated. This event can be due to two reasons: either the other agent has already created its base (which is not in the snapshot, although a part of it may be in it), or the other agent has not yet created its base. The procedure Clarification, called when event Agent occurs, is devoted to clarify which of the two reasons actually holds.
Suppose that the other agent , seen in the snapshot, is at the point at distance of the current location of . Agent drops a pebble in , provided that no domestic pebble already exists at this position (in the latter case, that pebble would be one of the pebbles , , or , depending on the quadrant). It then goes to the point towards at distance from , drops a pebble at , and then goes from on the line passing through and , in the direction opposite to , to the target point at distance , where is the distance between and (cf. Fig. 2). (Recall that, at the time when the agent is at , the previous snapshot is not available anymore, so the decision must be taken on the basis of the current snapshot.) This target point is of course . The reason of this complex behavior (instead of going straight to ) is to guarantee a possible return to . Dropping a pebble there is not enough, as there may be (accidentally) more than one domestic pebbles when agent will want to return to . The precaution of dropping pebbles in and will permit to unambiguously determine the pebble in , as and there are no domestic pebbles at distance at most , apart from and .
Due to asynchrony, agent may or may not be still in when agent takes its snapshot at . There are four possible cases:
-
1.
Agent is in .
-
2.
Agent is not in and a foreign base is in .
-
3.
Agent is not in , there is no foreign base in , and there is a foreign pebble in .
-
4.
Agent is not in , there is no foreign base in , and there is no foreign pebble in .
In the first case, the agents meet and the algorithm is interrupted.
In the second case, let be the point where the southwestern pebble of the foreign base is located. Agent determines which of the two points, its own starting point or the starting point of agent is dominating. If is dominating, agent goes to and stops. If is dominating then agent returns to (using pebbles at and to determine ), picks up pebbles at and for later use, and then returns to its own starting point as in event Base.
In the third case, agent goes to point North-East from at distance . On its way, it may meet agent (e.g., catching it if also goes in the same direction but is slower). If this happens, rendezvous is achieved and the algorithm is interrupted. If not, there are two subcases. Either agent hits a foreign pebble in or not. In the first subcase, and form a foreign base, and agent behaves similarly as in event Base. In the second subcase, it becomes clear that the base of is already created but it is elsewhere, and agent was at its pebble in during its navigation after creating its base. Then agent goes back to (which is South-West of at distance from it), returns to (using pebbles at and to determine and picking up these pebbles for later use), returns to its own starting point as in event Base, and goes North to reach its pebble . At this time, agent knows that the base of agent is already created but has not seen it yet. In order to find this base, agent resumes consecutive phases of expansion (recall that, at the beginning of each phase, the agent is at its pebble ) until the foreign base is found. When this happens, agent behaves like in the event Base.
In the fourth case, agent learns that the base of is already created but it is elsewhere (otherwise there would be a foreign pebble in ) and has not seen it yet. Agent returns to and then behaves as in the second subcase of case 3. This concludes the high-level idea of the algorithm. Its detailed description is omitted due to lack of space..
As a by-product of our algorithm, we obtain the solution of the leader election problem between two anonymous agents modeled as automata asynchronously navigating in the plane. In this problem, one of the identical agents must become a leader, and the other a non-leader. The implication is straightforward: the agent whose starting point is dominating becomes a leader, and the other agent a non-leader.
4 Correctness and Complexity
In this section, we prove the correctness and establish the complexity of Algorithm Automata Rendezvous. Define a stick to be any segment of length with one endpoint North-East of the other. Hence the base of any of the agents has pebbles at the extremities of a stick. The following lemma implies that during an uninterrupted execution of the first phases of the algorithm, the stick corresponding to the foreign base will be in the snapshot of an agent.
Lemma 1.
Consider any stick whose southwestern endpoint is at distance at most from the starting point of an agent executing Algorithm Automata Rendezvous. Then there exists an integer such that if phases of the algorithm were executed without interruption, then would be included in some snapshot of the agent.
Proof.
Consider the squares that are traversed by the agent in the first parts of two consecutive phases of the algorithm. Define a frame to be the subset of the plane between those squares. The frame consists of four corner squares with diagonals joining, respectively, the northern, eastern, southern and western corners of the squares forming the frame, and of four side rectangles between consecutive corner squares (see Fig. 3). Thus any stick satisfies at least one of the following conditions:
-
1.
intersects one of the corner squares of a frame ,
-
2.
is included in some side rectangle of a frame ,
-
3.
crosses a side of a side rectangle that does not share with any corner square.
Fix a stick . First note that if intersects a corner square then is in the snapshot of the agent when this agent is at one of the vertices of this square. Hence, we may assume that either condition 2 or 3 is satisfied. There are two cases. If is the southwestern or the northeastern side rectangle then is perpendicular to the southwestern and northeastern sides of , and if is the northwestern or the southeastern side rectangle then is parallel to the northwestern and southeastern sides of . We will consider these cases separately and prove that, in each of them, the stick will be in some snapshot of the agent during its traversal of one of the squares limiting the frame .
Case 1.
is the southwestern or the northeastern side rectangle.
Without loss of generality, suppose that is the southwestern side rectangle. is perpendicular to the southwestern and northeastern sides of . Either is included in or crosses the southwestern or the northeastern side of . In the first case, let be the southwestern side of the smaller square limiting the frame , and in the second case let be the side of crossed by . Suppose that is not included in any snapshot of the agent during its traversal of .
Let be the endpoint of farther from . Let be intersection of with the line perpendicular to , passing through . Then there are two consecutive steps in the traversal of by the agent, such that, in those steps, the agent is on different sides of , in points and , respectively, and both distances and are larger than 1 (the agent cannot see the point ). Let and . We have: (the length of one step on ). The inequality ( is the width of the frame) implies: , and . Hence,
which is a contradiction.
Case 2.
is the northwestern or the southeastern side rectangle.
Without loss of generality, suppose that is the northwestern side rectangle. Now is parallel to the northwestern and the southeastern sides of . Let be the northwestern side of the smaller square limiting the frame , and let and be, respectively, the southwestern and northeastern endpoints of . Let and be the intersections of with the lines perpendicular to , passing through and , respectively.
Two subcases are possible.
Subcase A.
There are two consecutive steps in the traversal of by the agent, such that, in those steps, the agent is on different sides of the segment , in points and , respectively (cf. Fig. 4 (A)).
Suppose that both distances and are larger than 1 (the agent cannot see the respective points). Let and . We have (the length of one step on plus the length of the stick). As before, the inequality ( is the width of the frame) implies: , and . Hence,
which is a contradiction.
Subcase B.
There is a step in the traversal of by the agent, in which the agent is in a point in the segment (cf. Fig. 4 (B)).
Suppose that both distances and are larger than 1 (the agent cannot see the respective points). However, for we have , which is a contradiction.
Hence we have shown that during the traversal of the square in the first part of some phase of the algorithm (if the phases were not interrupted before), is included in some snapshot of the agent. It remains to estimate the phase when this happens. By assumption, the southwestern endpoint of the stick is at distance at most from the starting point of the agent executing the algorithm. Since sides of squares traversed in consecutive phases increase by the constant summand , and they are all centered at the starting point of the agent, it follows that the stick is included in the square traversed in some phase , and hence is included in some snapshot of the agent by the end of phase .
Using Lemma 1 we can now prove the main result of this section.
Theorem 2.
Suppose that starting points of two agents executing Algorithm Automata Rendezvous are at distance at most . Then agents meet at some point of the plane and stop. The sum of lengths of the trajectories of the agents is . Algorithm Automata Rendezvous can be executed by agents modeled by a deterministic finite automaton, each agent using at most 8 pebbles.
Proof.
Consider either of the two agents, call it . Let be the other agent. Let be the starting point of and the starting point of . By the description of the algorithm, agent iterates procedure Phase until one of the two events, Base or Agent, happens. By Lemma 1, there exists a phase such that, if phases were not interrupted earlier by one of the above events, the stick with southwestern endpoint would be in some snapshot of agent by the end of phase . At this time, either the base of agent has been already created, which means that event Base happened, or agent is in the process of creating its base and is in the snapshot of , which means that event Agent happened. This implies that, by the end of phase , one of the above events must happen (if agents haven’t accidentally met before).
If event Base happened then agent decides which of the two points, or is dominating, goes to the dominating point and stops. In any case, the remaining part of the trajectory of agent has length . If event Agent happened, there are two possibilities. Either agent discovers the base of after making some additional constant-length traversal and then acts as in the case of event Base (goes to the dominating starting point and stops after an additional traversal of length ), or it discovers that it has not seen the base of yet, and executes some traversal of length to get to the current location of its pebble . In the latter case, agent continues iterating procedure Phase. It can be interrupted again by one of the above events, but eventually the interruption must be because of event Base, and it must happen by the end of phase .
To summarize, event Base must happen by the end of phase , unless agents have met accidentally before. After event Base, agent goes to the dominating point among and and stops. This guarantees the meeting of the agents, as executes the same algorithm. As for cost, the trajectory of the agent in each phase has length , hence the length of the trajectory until the end of phase is which is . Thus the total length of the trajectory of agent is . The same is true for agent , which implies cost .
Since all actions of an agent prescribed by Algorithm Automata Rendezvous (such as moving in one of the eight directions at a prescribed distance, and moving to a given point in the snapshot) require remembering a bounded number of bits plus using the input provided by the current snapshot, the algorithm can be executed by agents modeled by a deterministic finite automaton. Each agent uses two pebbles to mark its base, four pebbles to perform expansion in phases, and (possibly) two additional pebbles when executing procedure Clarification, if Condition Agent occurs. These two latter pebbles can be reused at each call of procedure Clarification, if Condition Agent occurs, because the agent always picks up these pebbles after using them. Hence the total number of pebbles used by each agent is at most eight.
5 Conclusion
We showed that asynchronous rendezvous in the plane can be accomplished by two identical agents modeled by a deterministic finite automaton, starting at arbitrary, adversarially chosen positions, each agent using at most eight pebbles. If the initial positions of the agents are at a distance at most , then the cost of rendezvous is . This cost is clearly optimal. Indeed, the adversary can delay one of the agents until it is found by the other, which reduces the problem to the exploration of a disc of radius , a task that requires cost .
In this paper, we didn’t try to minimize the constant number of pebbles used by each agent. Finding this minimum number may be considered an open problem. For example, it follows from [2] that one pebble per agent is not enough, because the trajectory of any deterministic finite automaton navigating in the plane using one pebble is contained between two parallel lines, and thus such trajectories of identical agents would be far apart, for appropriately chosen starting points.
We assumed that, while all pebbles used by an agent are identical, agents have the ability to differentiate between their pebbles and the pebbles of the other agent. If all the pebbles of both agents were identical, an additional difficulty would be created because an agent might confuse, e.g., its own pebbles used for expansion with the pebbles of the other agent. Hence, it is natural to ask if our problem of asynchronous rendezvous of identical deterministic finite automata still has a positive solution if all pebbles used by both agents are identical. We conjecture that the answer is yes.
References
- [1] Steve Alpern and Shmuel Gal. The Theory of Search Games and Rendezvous. International Series in Operations Research and Management Science. Kluwer Academic Publisher, 2002.
- [2] Mohamed Anouar Baaziz and Andrzej Pelc. Exploration of convex terrains by a deterministic automaton with pebbles. In Proc. 32nd International Colloquium on Structural Information and Communication Complexity (SIROCCO 2025), LNCS, pages 74–91. Springer, 2025. doi:10.1007/978-3-031-91736-3_5.
- [3] Evangelos Bampas, Jurek Czyzowicz, Leszek Gasieniec, David Ilcinkas, and Arnaud Labourel. Almost optimal asynchronous rendezvous in infinite multidimensional grids. In Proc. 24th International Symposium on Distributed Computing (DISC 2010), volume 6343 of LNCS, pages 297–311. Springer, 2010. doi:10.1007/978-3-642-15763-9_28.
- [4] Subhash Bhagat and Andrzej Pelc. How to meet at a node of any connected graph. In Proc. 36th International Symposium on Distributed Computing (DISC 2022), volume 246 of LIPIcs, pages 11:1–11:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.DISC.2022.11.
- [5] Sébastien Bouchard, Marjorie Bournat, Yoann Dieudonné, Swan Dubois, and Franck Petit. Asynchronous approach in the plane: a deterministic polynomial algorithm. Distributed Computing, 32:317–337, 2019. doi:10.1007/S00446-018-0338-2.
- [6] Mark Cieliebak, Paola Flocchini, Giuseppe Prencipe, and Nicola Santoro. Distributed computing by mobile robots: Gathering. SIAM Journal on Computing, 41:829–879, 2012. doi:10.1137/100796534.
- [7] Andrew Collins, Jurek Czyzowicz, Leszek Gasieniec, Adrian Kosowski, and Russell Martin. Synchronous rendezvous for location-aware agents. In Proc. 25th International Symposium on Distributed Computing (DISC 2011), volume 6950 of LNCS, pages 447–459. Springer, 2011. doi:10.1007/978-3-642-24100-0_42.
- [8] Jurek Czyzowicz, Adrian Kosowski, and Andrzej Pelc. How to meet when you forget: Log-space rendezvous in arbitrary graphs. Distributed Computing, 25:165–178, 2012. doi:10.1007/S00446-011-0141-9.
- [9] Yoann Dieudonné, Andrzej Pelc, and Vincent Villain. How to meet asynchronously at polynomial cost. SIAM Journal on Computing, 44:844–867, 2015. doi:10.1137/130931990.
- [10] Paola Flocchini, Giuseppe Prencipe, Nicola Santoro, and Peter Widmayer. Gathering of asynchronous robots with limited visibility. Theoretical Computer Science, 337:147–168, 2005. doi:10.1016/J.TCS.2005.01.001.
- [11] Younan Gao and Andrzej Pelc. Gathering teams of deterministic finite automata on a line. In Proc. 28th International Conference on Principles of Distributed Systems (OPODIS 2024), volume 319 of LIPIcs, pages 11:1–11:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.OPODIS.2024.11.
- [12] Younan Gao and Andrzej Pelc. Sniffing helps to meet: Deterministic rendezvous of anonymous agents in the grid. Theoretical Computer Science, 1050:115395, 2025. doi:10.1016/J.TCS.2025.115395.
- [13] Evangelos Kranakis, Danny Krizanc, and Euripides Markou. Deterministic symmetric rendezvous with tokens in a synchronous torus. Discrete Applied Mathematics, 159(9):896–923, 2011. doi:10.1016/J.DAM.2011.01.020.
- [14] Evangelos Kranakis, Danny Krizanc, Nicola Santoro, and Cindy Sawchuk. Mobile agent rendezvous in a ring. In Proc. 23rd International Conference on Distributed Computing Systems (ICDCS 2003), pages 592–599. IEEE Computer Society, 2003. doi:10.1109/ICDCS.2003.1203510.
- [15] Avery Miller and Andrzej Pelc. Fast deterministic rendezvous in labeled lines. In Proc. 37th International Symposium on Distributed Computing (DISC 2023), volume 281 of LIPIcs, pages 29:1–29:22. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.DISC.2023.29.
- [16] Andrzej Pelc. Deterministic rendezvous algorithms. In Paola Flocchini, Giuseppe Prencipe, and Nicola Santoro, editors, Distributed Computing by Mobile Entities, volume 11340 of LNCS, pages 99–118. Springer, 2019.
- [17] Amnon Ta-Shma and Uri Zwick. Deterministic rendezvous, treasure hunts and strongly universal exploration sequences. ACM Transactions on Algorithms, 10:12:1–12:15, 2014. doi:10.1145/2601068.
