TY - JOUR AU1 - Devismes,, Stéphane AU2 - Lamani,, Anissa AU3 - Petit,, Franck AU4 - Raymond,, Pascal AU5 - Tixeuil,, Sébastien AB - Abstract We consider swarms of asynchronous oblivious robots evolving into an anonymous grid-shaped network. In this context, we investigate optimal (w.r.t. the number of robots) deterministic solutions for the terminating exploration problem. We first show lower bounds in the semi-synchronous model. Precisely, we show that at least three robots are required to explore any grid of at least three nodes, even in the probabilistic case. Then, we show that at least four (resp. five) robots are necessary to deterministically explore a |$\bf(2,2)$|-Grid (resp. a |$\bf(3,3)$|-Grid). We then propose deterministic algorithms in the asynchronous model. This latter being strictly weakest than the semi-synchronous model, all the aforementioned bounds still hold in that context. Our algorithms actually exhibit the optimal number of robots that is necessary to explore a given grid. Overall, our results show that except in two particular cases, three robots are necessary and sufficient to deterministically explore a grid of at least three nodes and then terminate. The optimal number of robots for the two remaining cases is four for the |$\bf(2,2)$|-Grid and five for the |$\bf(3,3)$|-Grid, respectively. 1. Introduction We consider swarms of autonomous robots that are endowed with motion actuators and visibility sensors. Many potential applications exist for such multi-robot systems in various contexts. For instance, patrolling in adversarial environments, environmental monitoring, exploration of awkward environments, intelligence activities, fighting fire in a rescue scenario and many other risky tasks for humans can be solved by robotic swarms. Those applications require that the robots collaborate to succeed in the task accomplishment that has been assigned to them. Devising distributed algorithms capable of coordinating robots without central control remains one of the main challenges to overcome [1]. In this paper, we address the problem of exploring a finite discrete space by autonomous mobile robots. Exploration is a basic building block for many applications. For instance, mapping an unknown area requires that the robots (collectively) explore the whole area. Similarly, to search and rescue people after a disaster, the swarm of robots potentially has to explore the whole area. The so-called ‘area’ is often considered as a finite number of locations represented by a graph, where nodes represent indivisible locations that can be sensed by the robots and where edges represent the possibility for a robot to move from one location to the other, e.g. a building, a town, a factory and more generally, zoned areas. In such settings, a continuous 2D Euclidean space is conveniently represented using a grid-shaped network. The exploration problem has been addressed in the distributed computing community considering dual settings: probabilistic [2] vs. deterministic [3] and perpetual [4] vs. terminating [3]. In this paper, we focus on deterministic terminating exploration. In this problem, all robots, initially placed at different places, have to collectively visit all nodes (i.e. every node to be visited by at least one robot) and then eventually stop. We consider the problem of performing the terminating exploration with the constraint of using as less resources as possible. By minimizing the resources, we first mean weakening as much as possible assumptions made on the robot capabilities. Actually, we assume robots that are uniform (all robots follow the same algorithm), anonymous (robots are identical), oblivious (robots do not remember the past), disoriented (robots have no mean to locally or globally orient themselves) and deaf mute (robots have no means of communicating together). However, robots are endowed with visibility sensors enabling to see robots located on nodes. Arguments justifying such assumptions are varied and numerous. Reducing manufacturing costs, design and operating expenses are some of them. Also, numerous realistic scenarios can easily be considered where devices are faulty, unusable or even non-existent, for instance, sensors and guidance systems like GPS or compass may be faulty, communications may be scrambled or forbidden and physical space aboard robots may not allow one to embed some devices, like sensors or storage memory. Another objective in assuming such robot weakness is to provide an answer to the following fundamental question: what is computational complexity required for robots to deterministically solve a given problem? (In our case the terminating exploration.) Since we are addressing distributed solutions, such issue must be addressed globally, i.e. over all the robots. In other words, the number of robots that are required to solve the problem is also a crucial parameter. 1.1. Related work With respect to the terminating exploration problem, minimizing the number of robots for exploring particular classes of graphs led to contrasted results. The only result available for terminating exploration in general graphs [5] considers that edges are labeled in such a way that the network configuration is asymmetric. In this extended model, three robots are not sufficient to explore all asymmetric configurations, and four robots are sufficient to explore all asymmetric configurations. Note that exploring the set of asymmetric configurations is strictly stronger than exploring the complete underlying graph, especially when the graph is highly symmetric. The rest of the literature is thus dedicated to a weaker model, where edges are not labeled. One extreme case in this weak model is the set of tree-shaped networks, as in general, |$\Omega (n)$| robots are necessary and sufficient to explore with termination a tree network of |$n$| nodes deterministically [6]. Flocchini et al. [3] have proven that no deterministic terminating ring exploration is possible in the asynchronous model when the number of robots |$k$| divides the number of nodes |$n$| (this impossibility was recently certified with Coq [7]). However, they have proposed a deterministic algorithm that solves the problem, still in the asynchronous model, using |$k \geq 17$| robots provided that |$n$| and |$k$| are co-prime. Lamani et al. [8] have proven that there exists no deterministic algorithm that can explore with termination an even-sized ring with |$k\leq 4$| robots, even in the semi-synchronous (SSYNC) model [9]. Impossibility results in the semi-synchronous model naturally extend to the asynchronous non-atomic model [10]. Lamani et al. [8] also provide an algorithm, working in the semi-synchronous model, which allows five robots to deterministically explore any ring whose size is co-prime with 5 and then terminate. By contrast, four robots are necessary and sufficient to probabilistically explore with termination any ring of size at least 4 in the semi-synchronous model [2]. The case of myopic (whose visibility sensors have limited range) and luminous (that can exchange a finite amount of information) robots for terminating ring exploration was recently investigated [11]. Ooshita and Tixeuil [11] showed that with a two-color light and distance one visibility, three robots are necessary and sufficient in the fully synchronous model, and four robots are necessary and sufficient in the semi-synchronous and asynchronous cases. In the oblivious robot case and in the semi-synchronous model, four robots are necessary and sufficient to probabilistically explore with termination any torus of size |$\ell \times L$|⁠, where |$7 \leq \ell \leq L$| [12]. Grid-shaped networks were considered in the context of anonymous and oblivious robot exploration [4, 13, 14] for a variant of the exploration problem where robots perpetually explore all nodes in the grid. The first two works [4, 13] consider robots that are endowed with a common sense of direction (that is, common, north, south, east and west directions), while the last paper [14] considers the same model as ours: in this case, perpetually exploring a grid is as difficult as perpetually exploring a ring, as three robots are necessary and sufficient in both cases. 1.2. Contribution In this paper, we propose optimal (w.r.t. the number of robots) solutions for the deterministic terminating exploration of an anonymous grid-shaped network by a swarm of |$k$| asynchronous oblivious robots in the asynchronous model. Moreover, our solutions are asymptotically optimal in time, as they require |$\Theta (n)$| moves to explore any grid of |$n$| nodes. In more detail, we first consider the semi-synchronous model. In this model, we show that it is impossible to explore with termination a grid of at least three nodes with less than three robots. Next, we show that it is impossible to explore with termination a |$(2,2)$|-Grid of less than four robots and a |$(3,3)$|-Grid with less than five robots, respectively. The two first results hold for both deterministic and probabilistic terminating explorations, while the latter holds only in the deterministic case. Note also that these impossibility results naturally extend to the asynchronous model. Then, we propose several deterministic algorithms in the asynchronous model that use the optimal number of robots allowing to explore with termination a given grid. Our results show that except in two particular cases, three robots are necessary and sufficient to deterministically explore a grid of at least three nodes and then terminate. The optimal number of robots for the two remaining cases is four for the |$(2,2)$|-Grid and five for the |$(3,3)$|-Grid, respectively. Our results are summarized in the following table. Optimal number of robots Algorithm Deterministic Probabilistic |$(2,2)$|-Grid 4 4 |$(3,3)$|-Grid 5 |$\geq\!\! 3$| Any other grid 3 3 Optimal number of robots Algorithm Deterministic Probabilistic |$(2,2)$|-Grid 4 4 |$(3,3)$|-Grid 5 |$\geq\!\! 3$| Any other grid 3 3 Open in new tab Optimal number of robots Algorithm Deterministic Probabilistic |$(2,2)$|-Grid 4 4 |$(3,3)$|-Grid 5 |$\geq\!\! 3$| Any other grid 3 3 Optimal number of robots Algorithm Deterministic Probabilistic |$(2,2)$|-Grid 4 4 |$(3,3)$|-Grid 5 |$\geq\!\! 3$| Any other grid 3 3 Open in new tab The above results show that, contrary to the case of perpetual exploration, exploring a grid and terminating is easier than exploring a ring and terminating. In the ring, deterministic solutions essentially require five robots [8] while probabilities enable solutions with only four robots [2]. In a grid, three robots are necessary and sufficient in all but two cases even for deterministic algorithms; the two latter cases, namely the |$(2,2)$|-Grid and the |$(3,3)$|-Grid, do require four or five robots, respectively. Also, deterministically exploring a grid and then terminating requires no primality condition while deterministically exploring a ring and then terminating expects the number |$k$| of robots to be co-prime with |$n$|⁠, the number of nodes. 1.3. Roadmap Section 2 presents the system model and the problem to be solved. Lower bounds are shown in Section 3. The deterministic general solution using three robots is given in Section 4; the special case with five robots is studied in Section 5. (Note that exploring a |$(2,2)$|-Grid using four robots is trivial, henceforth not considered in this paper.) Section 6 gives some concluding remarks. 2. Preliminaries 2.1. Distributed systems We consider systems of autonomous entities, called robots and equipped of motion actuators and visibility sensors. These robots evolve in a simple undirected connected graph|$G = (V,E)$|⁠, where |$V$| is a finite set of |$n$| nodes and |$E$| a finite set of edges. In |$G$|⁠, nodes represent locations that can be sensed by robots and edges represent the possibility for a robot to move from one location to another. We assume that |$G$| is an |$(\ell ,L)$|-Grid (or a Grid, for short) where |$\ell $| and |$L$| are two positive integers such that |$\ell \times L = n$|⁠, i.e. |$G$| satisfies the following condition: there exists an order on the nodes of |$V$|⁠, |$v_1, \ldots , v_n$|⁠, such that $\forall x \in [1..n]$⁠, $(x \bmod \ell ) \neq 0 \Rightarrow \{v_x,v_{x+1}\} \in E$⁠, and $\forall y \in [1..\ell \times (L-1)]$⁠, $\{v_y,v_{y+\ell }\} \in E$⁠. We denote by |$\delta (v)$| the degree of node |$v$| in |$G$|⁠. FIGURE 1. Open in new tabDownload slide The four borderlines of a |$(5,7)$|-Grid, given in bold. FIGURE 1. Open in new tabDownload slide The four borderlines of a |$(5,7)$|-Grid, given in bold. Nodes of the grid are anonymous. (We may use indices but for notation purposes only.) Moreover, given two adjacent nodes |$u$| and |$v$|⁠, there is no explicit or implicit labeling allowing the robots to determine whether |$u$| is either on the left, on the right, above or below |$v$|⁠. Remark that an |$(\ell ,L)$|-Grid and an |$(L,\ell )$|-Grid are isomorphic. Hence, as the nodes are anonymous, we cannot distinguish an |$(\ell ,L)$|-Grid from an |$(L,\ell )$|-Grid. So, without loss of generality, we always consider |$(\ell ,L)$|-Grids, where |$\ell \leq L$|⁠. Note also that any |$(1,L)$|-Grid is isomorphic to a chain. In this case, either the grid consists of one single node, or two nodes are of degree 1 and all other nodes are of degree 2. When |$\ell>1$|⁠, four nodes in the grid are of degree 2 and all other nodes are of degree either 3 or 4. In any grid, the nodes of smallest degree are called corners. In any |$(1,L)$|-Grid with |$L>1$|⁠, the unique chain linking the two corners is called the borderline. In any |$(\ell ,L)$|-Grid such that |$\ell>1$|⁠, there exist four chains |$v_1$|⁠, …, |$v_m$| of length at least 2 such that |$\delta (v_1) = \delta (v_m) = 2$|⁠, and |$\forall x, 1 < x < m$|⁠, |$\delta (v_x) = 3$|⁠; these chains are also called the borderlines; see Fig. 1 for an illustrative example. We call line (of the grid) any maximal path of the grid that is parallel to a borderline (including the borderline itself). We call |$L$|-borderline any borderline made of |$L$| nodes (n.b., there are four, two or one |$L$|-borderline depending on whether or not |$\ell>1$| and whether or not |$\ell = L$|⁠). 2.2. Robots Operating on the grid |$G$| are |$k \leq n$| robots. The robots do not communicate in an explicit way; however, they see the position of all other robots in their ego-centered coordinate system and can acquire knowledge from this information. We assume that the robots cannot remember any previous observation nor computation performed in any previous step. Such robots are said to be oblivious (or memoryless). Each robot operates according to its (local) program. In general setting, an algorithm is a collection of |$k$|programs, each one operating on one single robot. However, we assume here that robots are uniform and anonymous, i.e. they all have the same program using no local parameter (such as an identity) that could permit to differentiate them. The program of a robot consists in executing look–compute–move (LCM) cycles infinitely many times. That is, the robot first observes its environment (look phase). Then, based on its observation and according to its program, the robot then decides to move or stay idle (compute phase). When the robot decides to move, it moves from its current node to an adjacent node during the move phase. 2.3. Computational models We consider two models: the semi-synchronous (atomic) model [9, 15] (called SSYNC model in [1]) and the asynchronous (non-atomic) model [10] (called ASYNC model in [1]). In both models, time is represented by an infinite sequence of instants 0, 1, 2, … No robot has access to this global time. Every robot executes cycles infinitely many times. Each robot performs its own cycles in sequence. However, the time between two cycles of the same robot and the interleaving between cycles of different robots are decided by an adversary whose power depends on the considered model. We are interested in algorithms that correctly operate despite the choices of the adversary. In particular, our algorithms should also work even if the adversary forces the execution to be (fully) sequential or (fully) synchronous. In the semi-synchronous model, each LCM cycle execution is assumed to be atomic: every robot that is activated (by the adversary) at instant |$t$| instantaneously executes a full cycle between |$t$| and |$t+1$|⁠. In the asynchronous model, LCM cycles are performed asynchronously by each robot: the time between look, compute and move operations is finite yet unbounded and is decided by the adversary. The only constraint is that both move and look are instantaneous.1 Note that in both models, any robot performing a look operation sees all other robots on nodes and not on edges. However, in the asynchronous model, a robot |$\mathcal R$| may perform a look operation at some time |$t$|⁠, perceiving robots at some nodes, then compute a target neighbor at some time |$t^{\prime}>t$|⁠, and move to this neighbor at some later time |$t^{\prime\prime}>t^{\prime}$| while some robots are at different nodes from those previously perceived by |$\mathcal R$| because they have moved in the meantime. Hence, in the asynchronous model, robots may move based on significantly outdated perceptions. Of course, the semi-synchronous model is stronger than the asynchronous one. So, to be as general as possible, in this paper, our impossibility results are written assuming the semi-synchronous model, while our algorithms assume the asynchronous model. 2.4. Multiplicity We assume that during the look phase, each robot can perceive whether several robots are located on the same node or not. This ability is called multiplicity detection. We shall indicate by |$d_i(t)$| the multiplicity of robots present in node |$u_i$| at instant |$t$|⁠. We consider two kinds of (global) multiplicity detection: the weak and strong (global) multiplicity detections. Under the weak multiplicity detection, for every node |$u_i$|⁠, |$d_i$| is a function |${N} \mapsto \{\circ ,\bot ,\top \}$| defined as follows: |$d_i(t)$| is equal to either |$\circ $|⁠, |$\bot $| or |$\top $| according to |$u_i$| contains none, one or several robots at time instant |$t$|⁠. If |$d_i(t) = \circ $|⁠, then we say that |$u_i$| is free at instant |$t$|⁠; otherwise, |$u_i$| is said occupied at instant |$t$|⁠. If |$d_i(t) = \top $|⁠, then we say that |$u_i$| contains a tower at instant |$t$|⁠. Under the strong multiplicity detection, for every node |$u_i$|⁠, |$d_i$| is a function |${N} \mapsto {N}$| where |$d_i(t) = j$| indicates that there are |$j$| robots in node |$u_i$| at instant |$t$|⁠. If |$d_i(t) = 0$|⁠, then we say that |$u_i$| is free at instant |$t$|⁠; otherwise |$u_i$| is said occupied at instant |$t$|⁠. If |$d_i(t)> 1$|⁠, then we say that |$u_i$| contains a tower (of |$d_i(t)$| robots) at instant |$t$|⁠. As previously, to be as general as possible, our impossibility results are written assuming the strong multiplicity detection, while our algorithms assume the weak multiplicity detection. 2.5. Configurations and views To define the notion of configuration, we need to use an arbitrary order |$\prec $| on nodes. The system being anonymous, robots do not know this order. Let |$v_1, \ldots , v_n$| be the list of the nodes in |$G$| ordered by |$\prec $|⁠. The configuration at time |$t$| is |$d_1(t), \ldots , d_{n}(t)$|⁠. We denote by initial configurations the configurations whence the system may start at time 0. Every configuration where all robots stay idle forever is said to be terminal (i.e. in a terminal configuration there is no possibility, even probabilistic, for a robot to move). Two configurations |$d_1, \ldots , d_{n}$| and |$d_1^{\prime}, \ldots , d_{n}^{\prime}$| are indistinguishable (distinguishable otherwise) if there exists an automorphism |$f$| on |$G$| such that |$\forall v_i \in V$|⁠, we have |$d_i = d_j^{\prime}$| where |$v_j = f(v_i)$|⁠. The view of robot |$\mathcal R$| at time |$t$| is a labeled graph isomorphic to |$G$|⁠, where every node |$u_i$| is labeled by |$d_i(t)$|⁠, except the node where |$\mathcal R$| is currently located, this latter node |$u_j$| is labeled by |$d_j(t),\downarrow $|⁠. Indeed, the coordinate system is ego centered. Hence, from its view, a robot can compute the view of each other robot and decide whether some other robots have the same view as its own. Every decision to move is based on the view obtained during the last look action. However, it may happen that some edges incident to a node |$v$| currently occupied by the deciding robot look identical in its view, i.e. |$v$| lies on a symmetric axis of the configuration. In this case, if the robot decides to take one of these edges, then it may take any of them. As in related work (e.g. [3, 6, 8]), we assume the worst-case decision in such cases, i.e. the actual edge among the identically looking ones is chosen by the adversary. More generally, if several possible destinations are selected during the compute phase, then the final destination is also chosen by the adversary. 2.6. Execution We model the executions of our algorithm in |$G$| by the list of configurations whereby the system goes. So, an execution is a maximal list of configurations |$\gamma _0, \ldots , \gamma _i$| such that |$\forall j>0$|⁠, we have the following: $\gamma _{j-1} \neq \gamma _j$ (the transition from $\gamma _{j-1}$ to $\gamma _j$ is called a step), $\gamma _j$ is obtained from $\gamma _{j-1}$ after some robots move from their locations in $\gamma _{j-1}$ to an adjacent node and for every robot $\mathcal R$ that moves between $\gamma _{j-1}$ and $\gamma _j$⁠, there exists $0\leq j^{\prime}\leq j$⁠, such that $\mathcal R$ takes its decision to move according to its program and its view in $\gamma _{j^{\prime}}$⁠. (In semi-synchronous model, we necessarily have $j^{\prime}=j-1$⁠.) Let |$e = \gamma _0, \ldots , \gamma _i$| be an execution. |$e$| is said to be sequential if |$\forall j>0$|⁠, exactly one robot moves between |$\gamma _{j-1}$| and |$\gamma _j$|⁠. |$e$| is said to be synchronous if |$\forall j>0$|⁠, all robots execute a full LCM cycle between |$\gamma _{j-1}$| and |$\gamma _j$|⁠. An execution terminates if it eventually reaches a terminal configuration. 2.7. Terminating exploration We consider the terminating exploration problem, where |$k$| robots, initially placed at different nodes, collectively explore an |$(\ell ,L)$|-grid before stopping moving forever. By ‘collectively’ explore, we mean that every node is eventually visited by at least one robot. More formally, an algorithm |$\mathcal P$|deterministically (resp. probabilistically) solves the terminating exploration problem if every execution |$e$| of |$\mathcal P$| starting from a towerless configuration2 satisfies the following: $e$ terminates in finite time (resp. with probability 1), and every node is visited by at least one robot during $e$⁠. Observe that the terminating exploration problem is not defined for |$k> n$| and is straightforward for |$k=n$|⁠. (In this latter case, the exploration is already accomplished in the initial towerless configuration.) 3. Bounds In this section, for the purpose of generality, we assume that the model is semi-synchronous and the multiplicity is strong. Moreover, when it is possible, our results are extended to the case where algorithms can use randomization. In more detail, we first show that, except for the trivial case where |$k=n$|⁠, if the model is semi-synchronous and the multiplicity is strong, then at least three oblivious robots are necessary to solve the (probabilistic or deterministic) terminating exploration of any grid (Theorem 3.2). Moreover, in a |$(2,2)$|-Grid, four robots are necessary (Theorem 3.3). Finally, at least 5 robots are necessary to solve the deterministic terminating exploration of a |$(3,3)$|-Grid (Theorem 3.8). In the two next sections, we show that all these bounds are also sufficient to solve the deterministic terminating exploration in the asynchronous model. Given that robots are oblivious, if there are more nodes than robots, then any terminal configuration should be distinguishable from any possible initial (towerless) configuration. So, we have the following: Remark 3.1. Any terminal configuration of any (probabilistic or deterministic) terminating exploration algorithm for any graph of |$n$| nodes using |$k1$| oblivious robots for a |$(3,3)$|-Grid, if there exists an execution of |$\mathcal P$||$e=\gamma _0\ldots \gamma _x\ldots $| where |$\gamma _x$| contains a tower of |$k$| robots, then there exists an execution |$e^{\prime}$| starting with the prefix |$e=\gamma _0\ldots \gamma _x$| such that at most one new node can be visited after |$\gamma _x$|⁠. Proof. Assume the existence of an execution of |$\mathcal P$||$e=\gamma _0\ldots \gamma _x\ldots $| where |$\gamma _x$| contains a tower of |$k$| robots. Then, |$\gamma _x$| is different from |$\gamma _0$|⁠. Furthermore, |$\gamma _x$| is indistinguishable from one of the three configurations depicted in Fig. 2 (symbols inside the circles represent the multiplicity of the node and numbers next the circle are node labels to help explanations only). Without loss of generality, assume that |$\gamma _x$| is either configuration |$(a)$|⁠, |$(b)$| or |$(c)$|⁠. To visit a new node, one of the robots should eventually decide to move. Moreover, in |$\gamma _x$|⁠, all robots have the same view. So, the adversary can choose any of them to move. (1) Consider configuration |$(a)$|⁠. Then, all possible destinations for the robots are symmetric. So, the adversary can activate the robots in a way we retrieve configuration |$\gamma _{x-1}$|⁠. Then, it can activate robots in a way that the system return to |$\gamma _x$| and so on. Hence, in this case, there exists a possible execution of |$\mathcal P$| that is infinite, a contradiction. So, from |$(a)$|⁠, |$\mathcal P$| cannot try to visit a new node. (2) Consider configuration |$(b)$|⁠.If robots synchronously move to node 5, then node 5 may be unvisited. So, it is possible to visit a new node, but then we retrieve Case |$(1)$|⁠. So, we can conclude that in this case from |$(b)$| only one new node can be visited.If robots synchronously move to node 1 (resp. 7), then this node may be unvisited. So, it is possible to visit a new node. However, in node 1, all possible destinations for the robots are symmetric. So, the adversary can activate the robots in a way that we retrieve the previous configuration, if we want to visit another node. So, as for Case |$(1)$|⁠, we can conclude that no new node can be visited that is from |$(b)$| only one new node can be visited. (3) Using a reasoning similar to case |$(1)$|⁠, we can conclude that from |$(c)$|⁠, |$\mathcal P$| cannot try to visit a new node. FIGURE 2. Open in new tabDownload slide Three possible configurations in a |$(3,3)$|-Grid with a tower of |$k$| robots. FIGURE 2. Open in new tabDownload slide Three possible configurations in a |$(3,3)$|-Grid with a tower of |$k$| robots. Proving Lemma 3.6 below is particularly tedious and error prone because many cases must be considered (positions of robots, symmetry classes, etc.). The proof was thus completed as automatically as possible, by using model-checking techniques. The method is briefly sketched here, a detailed presentation, together with the source code and the necessary tools can be found on the web.4 Lemma 3.6. Assume that there exists a deterministic terminating exploration algorithm |$\mathcal P$| in the semi-synchronous model using three oblivious robots for a |$(3,3)$|-Grid. Consider any suffix |$\gamma _w,\ldots ,\gamma _z$| of any sequential execution of |$\mathcal P$| where |$\bullet $| For every |$x,y$| with |$w\leq x3$| is given in Subsection 4.1. The particular case of the |$(2,3)$|-grid is solved in Subsection 4.2. 4.1. The main algorithm 4.1.1. Overview Our algorithm works according to the following successive three phases: Set-Up phase: starting from the initial (towerless) configuration, this phase aims at reaching a particular configuration called Set-Up, without creating any tower during the process.A configuration is of type Set-Up if there is a single line of robots starting at a corner and along one of the $L$-borderlines of the grid; see Fig. 4. Orientation phase: starting from a Set-Up configuration, this phase aims at giving an orientation to the grid. To achieve this, the robot that is at the corner moves to its adjacent occupied node creating then a tower. The position of the tower establishes a common coordinate system; see Fig. 5. The resulting configuration is called an Oriented configuration. Exploration phase: this phase starts from an Oriented configuration where exactly one node is occupied by one single robot, called Explorer. Based on the coordinate system defined during the Orientation phase, the explorer visits all the nodes, except three already visited ones; see Fig. 6. FIGURE 4. Open in new tabDownload slide Configuration Set-Up. FIGURE 4. Open in new tabDownload slide Configuration Set-Up. FIGURE 5. Open in new tabDownload slide Coordinate system built by the Orientation phase. FIGURE 5. Open in new tabDownload slide Coordinate system built by the Orientation phase. FIGURE 6. Open in new tabDownload slide Exploration phase. FIGURE 6. Open in new tabDownload slide Exploration phase. We now describe the above three phases in more detail. We start with the two last ones. We focus then on the first phase, which is the most critical part of the algorithm. 4.1.2. Orientation phase This phase follows the Set-Up phase and consists of a single movement where the robot that is at the corner move to its adjacent occupied node. Once it has moved, a tower is created. The resulting configuration is called an Oriented configuration, where the robots agree on a common coordinate system as shown in Fig. 5. The node with coordinates |$(0,0)$| is the unique corner that is the closest to the tower. The |$x$|-axis is given by the vector linking the node |$(0,0)$| to the node where the tower is located. The |$y$|-axis is given by the vector linking the node |$(0,0)$| to its neighboring node that does not contain the tower. It follows Lemma 4.1. Starting from a configuration of type Set-Up, the Orientation phase allows to reach a configuration of type Oriented in 1 move. 4.1.3. Exploration phase This phase starts from an Oriented configuration. Note that, once this configuration is reached, nodes of coordinates |$(0,0)$|⁠, |$(1,0)$| and |$(2,0)$| have been necessarily visited. So, the goal is to visit all remaining nodes. To ensure that the exploration phase remains distinct from the previous phases and keep the coordinate system, we only authorize the robot that does not belong to the tower to move. This robot is called the explorer. To explore all remaining nodes, the explorer should order all coordinates in such a way that (i) |$(0,0)$| and |$(0,1)$| are before its initial position (that is |$(0,2)$|⁠) and all other coordinates are after, and (ii) for all non-maximum coordinates |$(x,y)$|⁠, if |$(x^{\prime},y^{\prime})$| are successor of |$(x,y)$| in the order, then the nodes of coordinates |$(x,y)$| and |$(x^{\prime},y^{\prime})$| are neighbors. An example of such an order is |$\preceq $|⁠, defined as follows: |$(x,y) \preceq (x^{\prime},y^{\prime}) \overset{{\tt{def}}}{=} yx^{\prime})].$| Using |$\preceq $|⁠, the explorer moves as follows: while the explorer is not located at the node having the maximum coordinates according to |$\preceq $|⁠, the explorer moves to the neighboring node whose coordinates are successors of the coordinates of its current position, as described in Fig. 6. The following lemma is straightforward: Lemma 4.2. Starting from an Oriented configuration, the Exploration phase is done in |$n-4$| moves and once terminated all nodes have been visited. 4.1.4. Set-up phase Assuming |$L>3$|⁠, the Set-Up phase aims at reaching a Set-Up configuration from any towerless configuration, without creating any tower during the process. To that goal, we split the set of all non-Set-Up towerless configurations into several classes. The behavior of the robots is mainly determined according to these classes. Beforehand, we define some terms and notations used in the sequel. Definitions. We denote by |$\|x,y\| $| the Manhattan distance between nodes |$x$| and |$y$|⁠. By a slight abuse of notation, we also denote by |$\|\mathcal{R}_1,y\| $|⁠, |$\|x,\mathcal{R}_2\| $| or |$\|\mathcal{R}_1,\mathcal{R}_2\| $| the Manhattan distance |$\|x,y\| $| whenever |$\mathcal{R}_1$| is a robot located on |$x$| and |$\mathcal{R}_2$| is a robot located on |$y$|⁠. In any configuration, we denote by |${\tt{dc}}_{min}$| the minimal distance between a robot and any of the four corners. For any robot |$\mathcal{R}$|⁠, we denote by |$\#CC(\mathcal{R})$| the number of corners at distance |${\tt{dc}}_{min}$| from |$\mathcal{R}$|⁠. Conversely, we denote by |$\#CR(c)$| the number of robots that are at distance |${\tt{dc}}_{min}$| from |$c$|⁠, for every corner |$c$|⁠. When we say ‘the robot |$\mathcal{R}$| moves toward a node |$x$| (resp. toward a robot |$\mathcal{R}^\star $|⁠)’ we mean that |$\mathcal{R}$| moves to a neighboring node that is on a shortest path (in terms of Manhattan distance) linking the location of |$\mathcal{R}$| to |$x$| (resp. to the location of |$\mathcal{R}^\star $|⁠). When we say ‘the robot |$\mathcal{R}$| moves toward the borderline |$bl$|’ we mean that |$\mathcal{R}$| moves to a neighboring node that is on a shortest path (in terms of Manhattan distance) linking the location of |$\mathcal{R}$| to a closest node that belongs to |$bl$|⁠. Classes. Let TL be the set of all possible towerless configurations. We now split TL|$\setminus $|Set-Up into several classes as follows: Class B encompasses every towerless configuration not of type Set-Up, where all robots are located on the same $L$-borderline.5 In this case, we denote by $EBL$ (for ‘Elected BorderLine’) the borderline that contains the three robots. We distinguish two subsets in ${\tt{B}} $⁠: $\bullet $B$^{**}$ contains the configurations where a corner and its neighbor on $EBL$ are occupied; the second corner of $EBL$ may be occupied too; $\bullet $B$^{*}$ includes configurations such that - either a unique corner is occupied, but its neighbor on $EBL$ is free, or - the special case where $L = 5$ and $EBL$ has two robots located on its extremities and the third one located on its middle node. Let B$^{-}$ = B$\setminus $ (B$^{**}$$\cup $B$^{*}$⁠). Class C$_0$ contains every towerless configuration not of type B, where all corners are free. Class C$_1$ includes every towerless configuration neither of type Set-Up nor B, where exactly one corner is occupied. Among the configurations of C$_1$⁠, we distinguish the subclass C$_1^*$ where, a second robot is on a $L$-borderline having an occupied corner, but not the third one. Let C$_1^-$ = C$_1$$\setminus $C$_1^*$⁠. Class C$_2$ contains every towerless configuration not of type B, where exactly two corners are occupied. Among the configurations of C$_2$⁠, we distinguish the subclass C$_2^*$ where the two occupied corners are extremities of the same $L$-borderline. Let C$_2^-$ = C$_2$$\setminus $C$_2^*$⁠. Class C$_3$ characterizes every towerless configuration, where three corners are occupied. Notice that Class C$_3$ is not empty if and only if $\ell> 1$⁠. Recall that a partition of a set |$X$| is a set of subsets |$\{S_1, \ldots , S_k\}$| such that |$X = \bigcup _{i \in \{1, \ldots , k\}} S_i$| and |$\forall i,j \in \{1, \ldots , k\}$| such that |$i \neq j$|⁠, we have |$S_i \cap S_j = \emptyset $|⁠. By definition of the classes, we have the following lemma. Lemma 4.3. |$\{\tt{Set-Up},\tt{B},\tt{C}_0,\tt{C}_1,\tt{C}_2,\tt{C}_3\}$| is a partition of TL, the set of towerless configurations. Proof. We begin our proof with the following two observations: Observation 4.4. Since |$L> 3$|⁠, exactly one corner is occupied in any Set-Up configuration. Observation 4.5. By definition, at most two corners are occupied in any B configuration. We now show that every towerless configuration belongs to at least one of the subsets Set-Up, B, C|$_0$|⁠, C|$_1$|⁠, C|$_2$| or C|$_3$|⁠. Let |$\gamma \in{\tt{TL}} $|⁠. Let |$c \leq 3$| be the number of occupied corners in |$\gamma $|⁠. From Observations 4.4 and 4.5, follows |$\bullet $| If |$c = 0$|⁠, then |$\gamma \in $|B|$\cup $|C|$_0$|⁠. |$\bullet $| If |$c = 1$|⁠, then |$\gamma \in $|Set-Up|$\cup $|B|$\cup $|C|$_1$|⁠. |$\bullet $| If |$c = 2$|⁠, then |$\gamma \in $|B|$\cup $|C|$_2$|⁠. |$\bullet $| If |$c = 3$|⁠, then |$\gamma \in $|C|$_3$|⁠. We now show that the intersection between any pair of distinct subsets Set-Up, B, C|$_0$|⁠, C|$_1$|⁠, C|$_2$| and C|$_3$| is empty. |$\bullet $|Set-Up|$\cap $|B|$= \emptyset $| since B|$\subseteq $|TL|$\setminus $|Set-Up, by definition. |$\bullet $|C|$_0$|⁠, C|$_1$|⁠, C|$_2$| and C|$_3$| are pairwise disjoint since the number of occupied corners is different in each of these classes. |$\bullet $| The intersection between Set-Up and any subset C|$_i$| with |$i \in \{0,1,2,3\}$| is empty. Indeed, Set-Up|$\cap $|C|$_i = \emptyset $| for |$i \in \{0,2,3\}$|⁠, by Observation 4.4. Moreover, by definition, C|$_1$||$\subseteq $|TL|$\setminus $|Set-Up. |$\bullet $| The intersection between B and any subset C|$_i$| with |$i \in \{0,1,2,3\}$| is empty. Indeed, B|$\cap $|C|$_3$||$= \emptyset $|⁠, by Construction 4.5. Then, B|$\cap $|C|$_i = \emptyset $| for |$i \in \{0,1,2\}$| since, by definition, C|$_i \subseteq $|TL|$\setminus $|B for |$i \in \{0,1,2\}$|⁠. Hence, |$\{\tt{Set-Up},\tt{B},\tt{C}_0,\tt{C}_1,\tt{C}_2,\tt{C}_3\}$| is a partition of TL. To simplify the design, we express below the algorithm of the Set-Up phase as a set of prioritized rules, i.e. Rule |$(i)$| can be executed only if no Rule |$(j)$| with |$j < i$| is enabled. To prevent both missing cases and ambiguities, the rules are discriminated according to the class where they apply. To accommodate the non-atomicity of the model, we try to prevent, as far as possible, situations where more than one robot is engaged to move. Remark 4.6. Our terminating exploration algorithm never engage more than two robots simultaneously. Furthermore, there are only two cases when two robots can be engaged simultaneously: the first cases of Rule (2) and Rule (16), respectively given in page 2 and 16. From Remark 4.6, it follows that the three robots always move sequentially (i.e. one after another), except in the above two cases. However, even these two cases, we implement a ‘ quasi-synchronous’ behavior as follows: Remark 4.7. When two robots |$\mathcal{R}_1$| and |$\mathcal{R}_2$| are engaged in a configuration |$\gamma $|⁠, but only one robot, say |$\mathcal{R}_1$| moves, then in the reached configuration |$\gamma ^{\prime}$|⁠, no robot except |$\mathcal{R}_2$| is engaged. Moreover, the only reachable configuration from |$\gamma ^{\prime}$| is the same as the configuration reached from |$\gamma $| when both |$\mathcal{R}_1$| and |$\mathcal{R}_2$| move simultaneously. Following Remarks 4.6 and 4.7, the correctness is established by showing that our algorithm actually implements the transition system given in Fig. 7. FIGURE 7. Open in new tabDownload slide Transition system of the Set-Up phase. States represent classes of configurations, where R|$_i$| denote the class of configurations where Rule |$(i)$| is enabled. Each weighted arrow represents the possibility of migrating from a class to another within a number of moves satisfying the bound given as weight. FIGURE 7. Open in new tabDownload slide Transition system of the Set-Up phase. States represent classes of configurations, where R|$_i$| denote the class of configurations where Rule |$(i)$| is enabled. Each weighted arrow represents the possibility of migrating from a class to another within a number of moves satisfying the bound given as weight. Remark 4.8. The transition system shown in Fig. 7 is acyclic and contains only one sink. According to Remark 4.8, it remains to show that during the Set-Up phase, the system always progresses until it reaches a configuration of type Set-Up. We provide a global view of the mechanisms involved to achieve this. Overview of phase Set-Up. During the Set-Up phase, robot movements are driven by the aforementioned classes. More details are given below. B: when the current configuration belongs to the class B, the Set-Up phase is in its final stage: using Rules (1)–(7), the three robots move along the elected borderline to eventually form a Set-Up configuration. Then, the other rules are classified according to the number of occupied corners. C$_0$⁠: in C$_0$ (Rules (8)–(14)), robots move sequentially only. We use Rule 8, a special rule that forms the Set-Up configuration in at most two moves, when the configuration is close enough to a Set-Up configuration (in particular, when robots are really close to each other). Except this particular case, the goal is to elect one robot so that it moves to reach $\bullet $ either a configuration of type B, whence robots eventually sharp a Set-Up configuration, as explained before, or $\bullet $ a configuration of type C$_1$⁠, where the problem is easier to solve. Indeed, in this latter class, the unique robot located on a corner is used either as a beacon to guide the movements of the two other robots or to break a symmetric situation by moving in one direction. C$_1$⁠: Rules (15)–(21) may be enabled in this class. Rule (15) is used to reach a configuration of type Set-Up or B from a configuration of the subclass C$_1^*$⁠. Basically, the robot not located on the $L$-borderline containing the two others moves to that borderline. (N.b., from B, the system converges to Set-Up, as explained above.) Then, we consider cases where the grid is a square (i.e. when $\ell = L$⁠). In particular, Rules (16) and (17) allow one to manage specific cases where the two robots not located on a corner are at the same distance from the unique occupied corner. $\bullet $ Rule (16) allows to reach a configuration Set-Up within at most five moves. Precisely, in three moves, the system reaches a configuration C$_0$ where Rule (8) is enabled. From this latter configuration, the Set-Up configuration is formed within at most two moves, as explained above. $\bullet $ Rule (17) is more intricate: the unique robot located at a corner moves to break a symmetry. This movement makes the system migrate to a configuration of Class C$_0$ where Rule (9) is enabled. From that configuration, the system goes back to a configuration $\gamma $ of C$_1$ after several moves. However, from $\gamma $⁠, Rule (17) remains disabled forever, preventing the system from looping forever. Still when the grid is a square, we consider the case where the two robots not located at a corner are on a borderline having the unique occupied corner as extremity. Notice that these two robots are at different distance from the unique occupied corner since such cases are managed by Rules (16) and (17). We use this asymmetry to make only one of them leaving its borderline (Rule (19)). Hence, the system reaches in one move a configuration of type C$_1^*$⁠, whence we already know a configuration of type Set-Up is eventually reached. Using Rules (18), (20) and (21), either one or two of the robots not located at a corner moves. However, we prevent those two robots from moving simultaneously. The idea is to discriminate one of them, say $\mathcal{R}$⁠, and make it move (using Rules (18) and (21)) to a $L$-borderline having one occupied extremity so that the system reaches either C$_1^*$ or C$_2^*$⁠. Notice that, before, the other robot may have to move once (using Rule (20)) in order to clear the path that $\mathcal{R}$ follows to the targeted $L$-borderline. Notice also that from C$_2^*$⁠, the system migrates to B (as explained below) and then to Set-Up (as explained above). C$_2$⁠: if the configuration is of type C$_2^*$⁠, then a configuration of type B is eventually reached by making the only robot not located at a corner move to the $L$-borderline having two occupied extremities; see Rule (22). Then, from B, the system eventually converges to Set-Up, as explained before. In all other cases (Rules (23)–(25)), the system reaches within at most 3 moves a configuration of type C$_1$⁠. Precisely, the robot not located at a corner is used to break ties so that one of the two other robots eventually leaves its corner. Then, the system eventually converges to a configuration of type Set-Up, as explained before. C$_3$⁠: in this last class, using Rule (26), one robot leaves its corner so that the system reaches a configuration of type C$_2$⁠, whence we already know eventually reaches a Set-Up configuration. Correctness and time complexity of phase Set-Up. $$\begin{equation*} Class {\tt{B}} \end{equation*}$$ When the current configuration belongs to this class, the Set-Up phase is in its final stage: the system leaves this class within |$O(L)$| moves, and when it does, the reached configuration is of type Set-Up. Rule(1): if the configuration is of type B$^{**}$⁠, then let $c$ be the corner and $x$ its neighbor such that both $c$ and $x$ are occupied, the robot that is located neither on $c$ nor on $x$ moves toward $x$ (on $EBL$⁠). By definition of Rule (1), we immediately obtain the following lemma. Lemma 4.9. If the configuration is of type B|$^{**}$|⁠, then a configuration Set-Up is reached within at most |$L-3$| moves and no tower is created during the process. Then, we have a special case that applies only if |$L$| is odd (in this case, |$L \geq 5$|⁠). This special case is described in Figs 8 and 9 and solved by Rule (2). It allows one to obtain a useful property used by Rules (5)–(7). Rule(2): if the configuration is of type B, $L$ is odd and the node $m$ in the middle of $EBL$ is in one of the two situations described in Figs 8 and 9, then apply the movements depicted in the corresponding figure. FIGURE 8. Open in new tabDownload slide Case 1 for Rule (2). FIGURE 8. Open in new tabDownload slide Case 1 for Rule (2). FIGURE 9. Open in new tabDownload slide Case 2 for Rule (2). FIGURE 9. Open in new tabDownload slide Case 2 for Rule (2). Remark 4.10. If Rule (2) is enabled, then the system reaches within at most two moves the configuration described in Fig. 10 where robots on |$x$| and |$y$| are not engaged and no tower is created during the process. FIGURE 10. Open in new tabDownload slide Result of Rule (2). FIGURE 10. Open in new tabDownload slide Result of Rule (2). Rule(3): if the configuration is of type B$^{*}$⁠, then the robot not located on a corner that is closest from an occupied corner moves toward a closest occupied corner (on $EBL$⁠). Lemma 4.11. If the configuration is of type B|$^{*}$|⁠, then a configuration B|$^{**}$| is reached within at most |$\max (2, L-4)$| moves, without creating any tower during the process. Proof. Assume a configuration of type B|$^{*}$| with |$L = 5$|⁠. Then, the configuration corresponds to one of the situations described in Figs 9 and 10 (n.b., the configuration described in Fig. 8 is not of type B|$^{*}$|⁠). So, within at most one move, a configuration of type B|$^{*}$| like in Fig. 10 is reached (if necessary, case 2 of Rule (2) is executed). Next, the robot |$m$| located at the middle node moves using Rule (3) (its destination is chosen by the adversary), and then a configuration B|$^{**}$| is reached. No tower is created during these moves. Assume now a configuration of type B|$^{*}$| with |$L> 5$|⁠. Using Rule (3), a configuration B|$^{**}$| is reached within at most sequential |$L-4$| moves and without creating any tower during the process. Rule(4): if the configuration is of type B$^{-}$⁠, no corner (of $EBL$⁠) is occupied and a robot $\mathcal{R}$ is the unique robot at distance ${\tt{dc}}_{min}$ from a corner,6 then $\mathcal{R}$ moves (on $EBL$⁠) toward its closest corner. If Rule 4 is enabled, |${\tt{dc}}_{min} \leq \frac{L}{2}-2$|⁠, hence, by definition of Rule 4, follows. Lemma 4.12. If Rule 4 is enabled, then a configuration B|$^{*}$| is reached within at most |$\frac{L}{2}-2$| moves and no tower is created during the process. We consider now the case where the configuration is of type B|$^{-}$| and Rule (4) is disabled, whereas two robots are, each of them, at distance |${\tt{dc}}_{min}$| from a corner (including the case where those robots are located on the corners of |$EBL$|⁠). In such a case, the third robots |$\mathcal{R}$| allow to break ties. First, consider the case where |$\mathcal{R}$| is equidistant from the two corners of |$EBL$|⁠. Notice that in that case, the two neighboring nodes of |$\mathcal{R}$| are free since Rule (2) is disabled. Moreover, |$\mathcal{R}$| can move to one of those free nodes without risking to create a tower, by Remark 4.10. Rules (5)–(7) below are, each of them, executed at most once. Rule (5) is followed by either Rule (6) or Rule (7). Rules (6) and (7) are mutually exclusive in the whole execution. Rule(5): if the configuration is of type B$^{-}$⁠, two robots are, each of them, at distance ${\tt{dc}}_{min} \geq 0$ from a corner (of $EBL$⁠) and the other robot $\mathcal{R}$ is equidistant from the two corners of $EBL$⁠, then $\mathcal{R}$ moves to any adjacent node on $EBL$ (the destination node is chosen by the adversary). Rule(6): if the configuration is of type B$^{-}$⁠, two robots $\mathcal{R}_1$ and $\mathcal{R}_2$ are, each of them, located on a corner (of $EBL$⁠) and the other robot $\mathcal{R}_3$ satisfies $\|\mathcal{R}_3,\mathcal{R}_1\| < \|\mathcal{R}_3,\mathcal{R}_2\| $⁠, then $\mathcal{R}_2$ moves to its adjacent (free) node on $EBL$⁠. Rule(7): if the configuration is of type B$^{-}$⁠, two robots $\mathcal{R}_1$ and $\mathcal{R}_2$ are, each of them, at distance ${\tt{dc}}_{min}> 0$ from a corner (of $EBL$⁠) and the other robot $\mathcal{R}_3$ satisfies $\|\mathcal{R}_3,\mathcal{R}_1\| < \|\mathcal{R}_3,\mathcal{R}_2\| $⁠, then $\mathcal{R}_1$ moves (on $EBL$⁠) toward its closest corner. Lemma 4.13. For any configuration B|$^{-}$|⁠, a configuration of type B|$^{*}$| is reached within at most |$\frac{L}{2}+2$| moves, without creating any tower during the process. Proof. Let |$\gamma $| be any configuration of type B|$^{-}$|⁠. If Rule 4 is enabled, then we are done by Lemma 4.12. Otherwise, consider the following two cases: 1 Assume that two corners are occupied in |$\gamma $|⁠. Then, |$L> 5$| and a configuration of type B|$^{*}$| is reached within at most two moves (i.e. Rule (6), maybe preceded by Rule (5)). 2 Assume that two robots are, each of them, at distance |${\tt{dc}}_{min}> 0$| from a corner in |$\gamma $|⁠. Then, within at most four moves (n.b., the worst case consists in the following sequence: Rule (2) twice, Rule (5) and finally Rule (7)), either a configuration of type B|$^{*}$| or a configuration where Rule (4) is enabled is reached. In the latter case, up to |$\frac{L}{2}-2$| moves may be necessary to reach a configuration of type B|$^{*}$|⁠, by Lemma 4.12. In all cases, no tower is created during the process, thanks to the property given in Remark 4.10. $$\begin{equation*} Class {\tt{C}}_0 \end{equation*}$$ Except for Rule (8) that allows one to directly reach a configuration Set-Up, the rules below aim at migrating to either Class C|$_1$|⁠, Class B|$^{-}$| or B|$^{*}$|⁠, within at most |$\frac{\ell +L}{2}+1$| moves. We begin by considering two special cases (Rules (8) and (9)) that help to solve the convergence from Class C|$_1$| when |$\ell = L$| (n.b., in that case, |$\ell \geq 4$|⁠); refer to Rules (16) and (17). FIGURE 11. Open in new tabDownload slide Case 1 for Rule (8) (⁠|$\ell = L$|⁠). FIGURE 11. Open in new tabDownload slide Case 1 for Rule (8) (⁠|$\ell = L$|⁠). FIGURE 12. Open in new tabDownload slide Case 2 for Rule (8) (⁠|$\ell = L$|⁠). FIGURE 12. Open in new tabDownload slide Case 2 for Rule (8) (⁠|$\ell = L$|⁠). Rule(8): if the configuration is of type C$_0$⁠, $\ell = L$ and robots are placed like one the two situations described in Figs 11–14, apply the movement depicted in corresponding figure. FIGURE 13. Open in new tabDownload slide Case 3 for Rule (8) (⁠|$\ell = L$|⁠). FIGURE 13. Open in new tabDownload slide Case 3 for Rule (8) (⁠|$\ell = L$|⁠). FIGURE 14. Open in new tabDownload slide Case 4 for Rule (8) (⁠|$\ell = L$|⁠). FIGURE 14. Open in new tabDownload slide Case 4 for Rule (8) (⁠|$\ell = L$|⁠). Notice that in Cases 1–3, the execution of Rule (8) leads to a configuration where Case 4 applies, hence follows. Lemma 4.14. If Rule (8) is enabled, then a configuration Set-Up is reached within at most two moves and no tower is created during the process. The following rule can be executed at most once. Rule(9): if the configuration is of type C$_0$⁠, $\ell = L$ and exactly one robot $\mathcal{R}_1$ is a distance 1 from a corner, say $c$⁠, and $\|\mathcal{R}_2,c\| = \|\mathcal{R}_3,c\| $ where $\mathcal{R}_2$ and $\mathcal{R}_3$ are the two other robots, then the robot, among $\mathcal{R}_2$ and $\mathcal{R}_3$⁠, which is the closest from the borderline containing $\mathcal{R}_1$⁠, moves toward $c$ (if there are several shortest paths to $c$⁠, then adversary breaks ties). We now discriminate the remaining configurations C|$_0$| according to the number of robots at distance |${\tt{dc}}_{min}$| from a corner. Rule(10): If the configuration is of type C$_0$ and there is a unique robot $\mathcal{R}$ at distance ${\tt{dc}}_{min}$ from a corner, then $\mathcal{R}$ moves toward a closest corner (the adversary breaks ties, if necessary). Lemma 4.15. After an execution of Rule (9), either a configuration C|$_1^*$| or a configuration C|$_1^-$| where both Rules (16) and (17) are disabled is reached within one move. Proof. If Rule (9) is enabled, then Rule (8) is disabled and so both |$\mathcal{R}_2$| and |$\mathcal{R}_3$| are at distance at least 3 from |$c$|⁠, and consequently, all their neighboring nodes are free. After the execution of Rule (9), Rule (10) is executed and the system reaches either a configuration C|$_1^*$| or a configuration C|$_1^-$|⁠. Now, if the reached configuration is of type C|$_1^-$|⁠, then |$\bullet $| the two robots that are not located on the unique occupied corner |$c$| are at different distances from |$c$| thanks to Rule (9), so Rule (17) is disabled, and |$\bullet $| one of them is at least at distance 3 from |$c$| as explained before, so Rule (16) is disabled. Finally, since the two aforementioned movements are sequential, we can see that no tower is created during the process. The following four rules are executed at most once. More precisely, Rule (11) is necessarily followed by Rule (12), Rule (12) is necessarily followed by Rule (13) and Rules (11)–(13) and Rule (14) are mutually exclusive in the whole execution. If exactly two robots are at distance |${\tt{dc}}_{min}$| from a corner, then the third robot is used to break ties. Rule(11): if the configuration is of type C$_0$⁠, there are exactly two robots $\mathcal{R}_1$ and $\mathcal{R}_2$ at distance ${\tt{dc}}_{min}$ from a corner, $\mathcal{R}_1$ and $\mathcal{R}_2$ are on the same line and the third robot $\mathcal{R}_3$ is neighbor of both $\mathcal{R}_1$ and $\mathcal{R}_2$⁠, then $\mathcal{R}_3$ moves to a neighboring free node (the adversary breaks ties, if necessary). Rule(12): if the configuration is of type C$_0$⁠, there are exactly two robots $\mathcal{R}_1$ and $\mathcal{R}_2$ at distance ${\tt{dc}}_{min}$ from a corner and $\|\mathcal{R}_1,\mathcal{R}_3\| = \|\mathcal{R}_2,\mathcal{R}_3\| $⁠, where $\mathcal{R}_3$ is the third robot, then $\mathcal{R}_3$ moves to a neighboring free node $x$ such that $\|\mathcal{R}_1,x\| \neq \|\mathcal{R}_2,x\| $ (the adversary breaks ties, if necessary). Rule(13): if the configuration is of type C$_0$⁠, there are exactly two robots $\mathcal{R}_1$ and $\mathcal{R}_2$ at distance ${\tt{dc}}_{min}$ from a corner, but one of them, say $\mathcal{R}_1$⁠, satisfies $\|\mathcal{R}_1,\mathcal{R}_3\| < \|\mathcal{R}_2,\mathcal{R}_3\| $⁠, where $\mathcal{R}_3$ is the third robot, then $\mathcal{R}_1$ moves toward its closest corner (the adversary breaks ties, if necessary). If the three robots are at distance |${\tt{dc}}_{min}$| from a corner, we use |$\#CC()$| and |$\#CR()$| to ‘elect’ one robot using Function |$Leader()$| given in Algorithm 1. In this case, |$\#CC(\mathcal{R}) \geq 1$| for every robot |$\mathcal{R}$|⁠. Notice also that the configuration being towerless, |$\#CC(\mathcal{R}) \leq 2$| for every robot |$\mathcal{R}$|⁠. Moreover, by definition, |$\#CR(c) \leq 3$| for every corner |$c$|⁠. Rule(14): if the configuration is of type C$_0$ and all robots are at distance ${\tt{dc}}_{min}$ from a corner, then $Leader()$ (see Algorithm 1) moves toward its closest corner. Lemma 4.16. If the configuration is of type C|$_0$| and Rules (8) and (9) are disabled, then one of the two following situations occurs. A configuration |$\gamma $| of type either C|$_1$|⁠, B|$^{-}$| or B|$^{*}$| is reached within at most |$\frac{\ell +L}{2}+1$| moves. Moreover, in |$\gamma $|⁠, if |$\ell = L$|⁠, then the two robots |$\mathcal{R}_1$| and |$\mathcal{R}_2$| that are not on the unique occupied corner |$c$| satisfy |$\|\mathcal{R}_1,c\| \neq \|\mathcal{R}_2,c\| $|⁠. Consequently, Rule (17) is disabled in |$\gamma $|⁠. A configuration of type C|$_0$| where Rule (9) is enabled is reached within at most |$\frac{\ell +L}{2}-2$| moves. In both cases, no tower is created during the process. Proof. In Class C|$_0$|⁠, robot moves are sequentially only. So, if the system exits from C|$_0$|⁠, then it reaches either C|$_1$|⁠, B|$^{-}$| or B|$^{*}$| without creating tower during the process, by definition of Rules (8)–(14). Moreover, Rules (11)–(13) and Rule (14) are mutually exclusive, all of them always preceded Rule (10). Assume Rule (13) is eventually executed. Then, Rule (13) may be preceded by at most two moves (Rules (11)–(12)). After Rule (13), Rule (10) becomes enabled and |${\tt{dc}}_{min} \leq \frac{\ell +L}{2}-2$|⁠. Executing Rule (10), some robot |$\mathcal{R}$| moves and Rule (9) cannot become enabled because Rule (13) has been executed before Rule (10), meaning the two robots other than |$\mathcal{R}$| are always at different distance from the corner targeted by |$\mathcal{R}$|⁠. So, after at most |$\frac{\ell +L}{2}-2$| moves of Rule (10), a configuration of type either C|$_1$|⁠, B|$^{-}$| or B|$^{*}$| is reached: Case 1 of the lemma is satisfied. Assume Rule (13) is never executed. Rule (14) may be executed once before Rule (10) becomes enabled. When Rule (10) is enabled, |${\tt{dc}}_{min} \leq \frac{\ell +L}{2}-2$|⁠. Executing Rule (10), some robot |$\mathcal{R}$| moves and a configuration where Rule (9) is enabled may be reached one move before a robot reaches a corner. So, either Rule (9) becomes enabled after at most one move of Rule (14) and at most |$\frac{\ell +L}{2}-3$| moves of Rule (10): Case 2 of the lemma is satisfied. Or, Rule (9) never becomes enabled, meaning the two robots other than |$\mathcal{R}$| are always at different distance from the corner targeted by |$\mathcal{R}$|⁠, and after at most one move of Rule (14) and at most |$\frac{\ell +L}{2}-2$| moves of Rule (10): a configuration of type either C|$_1$|⁠, B|$^{-}$| or B|$^{*}$| is reached: Case 1 of the lemma is satisfied. $$\begin{equation*} Class {\tt{C}}_1 \end{equation*}$$ In this class, we have two particular cases. The first one (Rule (16)) allows one to reach a configuration Set-Up within at most five moves. The second one (Rule (17)) is more intricate. Indeed, using Rule (17), the system migrates within one move to Class C|$_0$| and then goes back to a configuration |$\gamma $| of C|$_1$| within |$O(\ell + L)$| moves; however, from |$\gamma $| Rule (17) remains disabled forever. All other rules allow the system to migrate to Classes either Set-Up, B|$^{*}$|⁠, B|$^{**}$| or C|$_2^*$| within |$O(\ell )$| moves (from this latter class, a configuration B is reached within |$O(\ell )$| moves). Rule(15): if the configuration is of type C$_1^*$⁠, then the robot that is not on the $L$-borderline $lbl$ containing two robots moves a neighboring free non-corner node toward the closest free non-corner node on $lbl$ (the adversary breaks ties, if necessary). Lemma 4.17. From Class C|$_1^*$|⁠, the system reaches either Class Set-Up, Class B|$^{*}$| or Class B|$^{**}$| within at most |$\ell +1$| moves and without creating any tower during the process. Proof. Using Rule (15), always the same robot moves toward free nodes, without creating any tower until a configuration of either Class Set-Up, Class B|$^{*}$| or Class B|$^{**}$| is reached. Moreover, the robot may have to circumvent a robot on |$lbl$|⁠, so in the worst case at most |$\ell +1$| moves are necessary to reach a configuration of either Class B|$^{*}$| or Class B|$^{**}$|⁠. We now consider two special cases when |$\ell = L$| (in this case, |$L \geq 4$|⁠). FIGURE 15. Open in new tabDownload slide Case 1 for Rule (16) (⁠|$\ell = L$|⁠). FIGURE 15. Open in new tabDownload slide Case 1 for Rule (16) (⁠|$\ell = L$|⁠). Rule(16): if the configuration is of type C$_1^-$⁠, $\ell = L$ and robots are placed like one the two situations described in Figs 15–17, apply the movement depicted in corresponding figure. FIGURE 16. Open in new tabDownload slide Case 2 for Rule (16) (⁠|$\ell = L$|⁠). FIGURE 16. Open in new tabDownload slide Case 2 for Rule (16) (⁠|$\ell = L$|⁠). FIGURE 17. Open in new tabDownload slide Case 3 for Rule (16) (⁠|$\ell = L$|⁠). FIGURE 17. Open in new tabDownload slide Case 3 for Rule (16) (⁠|$\ell = L$|⁠). Notice that in Case 3 (Fig. 17), the symmetric is broken by the adversary. From the definition of Rule (16), we immediately deduce the following lemma. Lemma 4.18. If Rule (16) is enabled, then a configuration C|$_0$| where Rule (8) (Case 1) is enabled is reached within at most three moves and no tower is created during the process. The following rule can be executed at most once. Rule(17): if the configuration is of type C$_1^-$⁠, $\ell = L$ and $\|\mathcal{R}_3,\mathcal{R}_1\| = \|\mathcal{R}_2,\mathcal{R}_1\| $ where $\mathcal{R}_1$ is the unique robot located at a corner and $\mathcal{R}_2$ and $\mathcal{R}_3$ are the two other ones, then $\mathcal{R}_1$ moves to a neighboring node (the adversary breaks the symmetry). Notice that, since Rule (16) is disabled, if Rule (17) is enabled, then the two robots not located on the unique occupied corner |$c$| are at least at distance 3 from |$c$|⁠. In particular, the two neighbors of |$c$| are free. From the definition of Rule (17), we immediately deduce the following lemma. Lemma 4.19. If Rule (17) is enabled, then a configuration C|$_0$| where Rule (9) is enabled is reached within 1 move and no tower is created during the process. Rules (18)–(20) below are executed, each of them, at most once. Moreover, they are mutually exclusive in the whole execution. Rule(18): if the configuration is of type C$_1^-$⁠, $\ell < L$ and $\|\mathcal{R}_3,\mathcal{R}_1\| = \|\mathcal{R}_2,\mathcal{R}_1\| $ where $\mathcal{R}_1$ is the unique robot located at a corner and $\mathcal{R}_2$ and $\mathcal{R}_3$ are the two other ones, then the robot, among $\mathcal{R}_2$ and $\mathcal{R}_3$⁠, which is the closest from the $L$-borderline $lbl$ having $\mathcal{R}_1$ located at one corner, moves to a neighboring free node toward the closest free node of $lbl$⁠. If Rule (18) is enabled, then within one move the system reaches either Class C|$_1^*$|⁠, Class C|$_2^*$| or a configuration of type C|$_1^-$| where Rule (21) is enabled. Rule(19): if the configuration is of type C$_1^-$ and $\|\mathcal{R}_3,\mathcal{R}_1\|> \|\mathcal{R}_2,\mathcal{R}_1\| $ where $\mathcal{R}_1$ is the unique robot located at a corner and $\mathcal{R}_2$ and $\mathcal{R}_3$ are the two other ones, but both $\mathcal{R}_2$ and $\mathcal{R}_3$ are on two $L$-borderlines having an occupied corner,7 then $\mathcal{R}_2$ moves to its neighboring node outside any borderline. An execution of Rule (19) leads to a configuration is type C|$_1^*$|⁠. Rule(20): if the configuration is of type C$_1^-$ and the robots are in the situation described in Fig. 18, then apply the move depicted in the figure. FIGURE 18. Open in new tabDownload slide Rule (20), the configuration is of type C|$_1^-$|⁠. FIGURE 18. Open in new tabDownload slide Rule (20), the configuration is of type C|$_1^-$|⁠. FIGURE 20. Open in new tabDownload slide Exploration starting from |$\bigcirc \!\!\!\!\! \scriptsize{20}$|⁠. Hatched areas show visited nodes. FIGURE 20. Open in new tabDownload slide Exploration starting from |$\bigcirc \!\!\!\!\! \scriptsize{20}$|⁠. Hatched areas show visited nodes. If Rule (20) is enabled, then |$\ell> L$| and the borderline |$bl$| containing only one robot is a |$L$|-borderline (otherwise, the configuration is of type C|$_1^*$|⁠), and consequently |$bl$| contains at least four nodes ensuring that the destination exists. Rule(21): if the configuration is of type C$_1^-$ and $\|\mathcal{R}_3,\mathcal{R}_1\|> \|\mathcal{R}_2,\mathcal{R}_1\| $ where $\mathcal{R}_1$ is the unique robot located at a corner and $\mathcal{R}_2$ and $\mathcal{R}_3$ are the two other ones, then $\mathcal{R}_2$ moves to a free neighboring node $x$ such that (i) $\|\mathcal{R}_3,\mathcal{R}_1\|> \|x,\mathcal{R}_1\| $ and (ii) $x$ is on a shortest path (in terms of Manhattan distance) to a closest free node on a $L$-borderline having an occupied corner (the adversary breaks ties, if necessary). Lemma 4.20. From any configuration C|$_1^-$| where both Rule (16) and Rule (17) are disabled, a configuration of type either C|$_1^*$| or C|$_2^*$| is reached within, respectively, at most |$\ell $| moves and at most |$\ell -1$| moves. Moreover, no tower is created during the process. Proof. Consider any configuration |$\gamma $| of type C|$_1^-$| where both Rule (16) and Rule (17) are disabled and study the following cases: |$\bullet $|Assume Rule (18) is enabled in |$\gamma $|⁠. After the execution of Rule (18), the system is either in Class C|$_1^*$|⁠, Class C|$_2^*$| or a configuration of type C|$_1^-$| where Rule (21) is enabled. In the latter case, the fact that Rule (19) is disabled and the configuration is of type C|$_1^-$| implies that neither |$\mathcal{R}_2$| nor |$\mathcal{R}_3$| are on a |$L$|-borderline having one occupied corner. Moreover, since Rule (20) is disabled, there is a free node |$x$| satisfying Conditions (a) and (b) of Rule (21). So, the unique robot that moves using Rule (21) always move to a free node and is at distance at most |$\ell -2$| from a free node of the |$L$|-borderline having an occupied corner. Hence, overall, in at most |$\ell -1$| moves, the system reaches a configuration of type either C|$_1^*$| or C|$_2^*$|⁠, without creating any tower during the process. |$\bullet $|Assume Rule (19) is enabled in |$\gamma $|⁠. Within the next move, the system reaches a configuration of type C|$_1^*$| and we are done. |$\bullet $|Assume Rule (20) is enabled in |$\gamma $|⁠. In this case, |$\ell \geq 3$| and in three sequential movements (Rule (20) followed by Rule (21) twice), the system reaches a configuration of type C|$_1^*$| without creating any tower during the process, and we are done. |$\bullet $|Assume Rule (21) is enabled in |$\gamma $|⁠. In this case, the fact that Rule (19) is disabled and the configuration is of type C|$_1^-$| implies that neither |$\mathcal{R}_2$| nor |$\mathcal{R}_3$| are on a |$L$|-borderline having one occupied corner. Moreover, since Rule (20) is disabled, there is a free node |$x$| satisfying Conditions (a) and (b) of Rule (21). So, until a configuration of type C|$_1^*$| or C|$_2^*$| is reached, the same robot moves using Rule (21) toward a free node, so no tower is created until a configuration of type C|$_1^*$| or C|$_2^*$|⁠. Moreover, we have two cases: either the final destination of the moving robot is a corner and in this case, a configuration of type C|$_2^*$| is reached within at most |$\ell -1$| moves; otherwise, a configuration of type C|$_1^*$| is reached within at most |$\ell $| moves (the robot may have to circumvent an occupied corner). $$\begin{equation*} Class {\tt{C}}_2 \end{equation*}$$ The aim here is to migrate to either C|$_1$| (within at most 3 moves) or B (within at most |$\ell $| moves). Rule(22): if the configuration is of type C$_2^*$⁠, then the robot that is not located on a corner moves to a free neighboring node toward the closest free node located on the $L$-borderline having two occupied corners. By definition of Rule (22), we obtain the following lemma. Lemma 4.21. If the configuration is of type C|$_2^*$|⁠, then a configuration of type Class B is reached within at most |$\ell -1$| moves, without creating any tower during the process. In the remaining cases, the robot that is not on a corner allows one to break ties. Rule(23): if the configuration is of type C$_2^-$ and $\|\mathcal{R}_3,\mathcal{R}_1\| = \|\mathcal{R}_3,\mathcal{R}_2\| $ where $\mathcal{R}_1$ and $\mathcal{R}_2$ are the two robots located on a corner and $\mathcal{R}_3$ the other one and $\mathcal{R}_3$ is neighbor of two corners, then $\mathcal{R}_3$ moves to its unique non-corner neighbor. Rule(24): if the configuration is of type C$_2^-$ and $\|\mathcal{R}_3,\mathcal{R}_1\| = \|\mathcal{R}_3,\mathcal{R}_2\| $ where $\mathcal{R}_1$ and $\mathcal{R}_2$ are the two robots located on a corner and $\mathcal{R}_3$ the other one, then $\mathcal{R}_3$ moves to a neighboring free node $x$ such that $x$ is not a corner and $\|x,\mathcal{R}_1\| \neq \|x,\mathcal{R}_2\| $ (the adversary breaks ties, if necessary). Rule(25): if the configuration is of type C$_2^-$ and $\|\mathcal{R}_3,\mathcal{R}_1\| \neq \|\mathcal{R}_3,\mathcal{R}_2\| $ where $\mathcal{R}_1$ and $\mathcal{R}_2$ are the two robots located on a corner and $\mathcal{R}_3$ the other one, then the robot, among $\mathcal{R}_1$ and $\mathcal{R}_2$⁠, which is the farthest from $\mathcal{R}_3$ moves to a neighboring non-corner free node (the adversary breaks ties if necessary). FIGURE 19. Open in new tabDownload slide Set-Up built over |$U$|⁠, a maximal set of distinguishable towerless configurations. FIGURE 19. Open in new tabDownload slide Set-Up built over |$U$|⁠, a maximal set of distinguishable towerless configurations. FIGURE 20. Open in new tabDownload slide Exploration starting from the configurations |$\bigcirc \!\!\!\!\! \scriptsize{12}$|⁠, |$\bigcirc \!\!\!\!\! \scriptsize{13}$| and |$\bigcirc \!\!\!\!\! \scriptsize{19}$|⁠. Hatched areas show visited nodes. FIGURE 20. Open in new tabDownload slide Exploration starting from the configurations |$\bigcirc \!\!\!\!\! \scriptsize{12}$|⁠, |$\bigcirc \!\!\!\!\! \scriptsize{13}$| and |$\bigcirc \!\!\!\!\! \scriptsize{19}$|⁠. Hatched areas show visited nodes. FIGURE 21. Open in new tabDownload slide Exploration from Configuration |$\bigcirc \!\!\!\!\! \scriptsize{22}$|⁠. FIGURE 21. Open in new tabDownload slide Exploration from Configuration |$\bigcirc \!\!\!\!\! \scriptsize{22}$|⁠. FIGURE 22. Open in new tabDownload slide Exploration starting from |$\bigcirc \!\!\!\!\! \scriptsize{14}$| and |$\bigcirc \!\!\!\!\! \scriptsize{23}$|⁠. Hatched areas show visited nodes. FIGURE 22. Open in new tabDownload slide Exploration starting from |$\bigcirc \!\!\!\!\! \scriptsize{14}$| and |$\bigcirc \!\!\!\!\! \scriptsize{23}$|⁠. Hatched areas show visited nodes. FIGURE 23. Open in new tabDownload slide Exploration from |$\bigcirc \!\!\!\!\! \scriptsize{20}$|⁠. Hatched areas show visited nodes. FIGURE 23. Open in new tabDownload slide Exploration from |$\bigcirc \!\!\!\!\! \scriptsize{20}$|⁠. Hatched areas show visited nodes. FIGURE 24. Open in new tabDownload slide Exploration from |$\bigcirc \!\!\!\!\! \scriptsize{15}$|⁠. Hatched areas show visited nodes. FIGURE 24. Open in new tabDownload slide Exploration from |$\bigcirc \!\!\!\!\! \scriptsize{15}$|⁠. Hatched areas show visited nodes. Lemma 4.22. If the configuration is of type C|$_2^-$|⁠, then a configuration of type C|$_1$| where Rule (16) is disabled is reached within at most 3 moves, without creating any tower during the process. Proof. Each of the three rules (23), (24) and (25) is executed at most once and consists of only the movement of a single robot. So, from their definition, we can deduce that their execution does not create any tower. Moreover, Rule (23) is necessarily followed by Rule (2), and Rule (24) is necessarily followed by Rule (25). Finally, after executing these rules, the reached configuration is necessarily of type C|$_1$| since the configuration were not of type C|$_2^*$| and one robot left an occupied corner to a non-corner node (in particular, the reached configuration cannot be of type B). Moreover, in this latter configuration, Rule (16) is disabled. Indeed, if |$\ell = L$|⁠, then the two previously occupied corners were not extremities of the same borderline (since otherwise the configuration would be of type C|$_2^*$|⁠) and so the unique robot that occupies a corner after at most the three moves remains at distance at least 5 from the robot that has just left a corner. $$\begin{equation*} Class {\tt{C}}_3 \end{equation*}$$ The aim here is to migrate in one move to Class C|$_2^-$|⁠. Rule (26): if the configuration is of type C$_3$⁠, then the robot located on the occupied corner $c$ that is the common extremity of two borderlines, each one having its two extremities occupied, moves toward an adjacent free node (the adversary breaks ties, if necessary). By definition of Rule (26), follows. Lemma 4.23. If the configuration is of type C|$_3$|⁠, then a configuration of type C|$_2^-$| is reached within 1 move, without creating any tower during the process. The transition system given in Fig. 7 summarizes Lemmas 4.9–4.23. Its states represent a partition of the set of all towerless configurations; see Lemma 4.3. Moreover, this system is acyclic and contains only one sink: the class Set-Up (Remark 4.8). So, we can deduce from any towerless configuration the system reaches within a finite number of moves a configuration of type Set-Up. Finally, we can remark that the weight of any directed path to Set-Up is in |$O(\ell +L)$|⁠. Hence, we obtain the following lemma. Lemma 4.24. Starting from any towerless configuration, the Set-Up phase allows one to converge to a configuration of type Set-Up in |$O(\ell +L)$| moves. By Lemmas 4.9-4.23, no tower is created during the Set-Up phase; hence, phases Set-Up, Orientation and Exploration are unambiguous, and by Lemmas 4.1–4.24, we can deduce the following theorem. Theorem 4.25. The three phases Set-Up, Orientation and Exploration allows one to deterministically explore (with termination) any |$(\ell ,L)$|-Grid such that |$L>3$| in |$\Theta (n)$| moves using three robots, where |$n = \ell \times L$| is the size of the grid. 4.2. Solution for a (2,3)-Grid The idea for the |$(2,3)$|-Grid is quite simple. Consider the two |$L$|-borderlines of the grid. Since there are initially three isolated robots on the grid, there exists one of the two |$L$|-borderlines, say |$lbl$|⁠, that contains either all the robots or exactly two robots. In the second case, the robot that is not part of |$lbl$| moves to the adjacent free node toward the free node of |$lbl$|⁠. Thus, the three robots are located on |$lbl$| after at most three moves. Next, the robot not located at any corner moves to one of its two neighboring occupied nodes. (The destination is chosen by the adversary.) Thus, a tower is created after one additional move. Once the tower is created, the grid is oriented. Then, the single robot moves to the adjacent free node in the |$L$|-borderline that does not contain the tower. Next, it explores the nodes of this line by moving along the line toward the tower. When it becomes neighbor of the tower (after 3 moves), it stops and all the nodes of the |$(2,3)$|-Grid have been explored. Theorem 4.26. In the asynchronous model, the deterministic terminating exploration of a |$(2,3)$|-Grid can be solved in at most seven moves by three oblivious robots. 5. Deterministic solution for a (3,3)-grid using 5 robots In this section, we propose an algorithm that explores a |$(3,3)$|-Grid using five oblivious asynchronous robots and assuming weak multiplicity detection. The algorithm works within two phases executed in sequence: the Set-Up phase, followed by the Exploration phase. 5.1. Set-Up phase The Set-Up phase starts from any towerless configuration. Let |$U$| be a maximal set of towerless configurations such that every two configurations of |$U$| are distinguishable. First, since the number of robots and the size of the grid are small, we have automatically computed the set |$U$| of |$\binom{9}{5} = 126$| possible towerless configurations. Then, for every pair of configurations |$g_1$| and |$g_2$| in |$U$|⁠, we have removed |$g_2$| from |$U$| if |$g_1$| and |$g_2$| are indistinguishable. This process led to the set of |$23$| configurations shown in Fig. 19.8 Figure 19 also shows the transition diagram of the Set-Up phase, with the robot moves. The goal of Set-Up is to reach one of the configurations in |${\tt{P\hbox{-}E}} \subseteq U$|⁠. They are called Pre-Exploration configurations. From them, the actual Exploration phase starts. |${\tt{P\hbox{-}E}} $| is actually the set |$\{\bigcirc \!\!\!\!\! \scriptsize{12},$||$\bigcirc \!\!\!\!\! \scriptsize{13}$|⁠, |$\bigcirc \!\!\!\!\! \scriptsize{14}$|⁠, |$\bigcirc \!\!\!\!\! \scriptsize{15}$|⁠, |$\bigcirc \!\!\!\!\! \scriptsize{19}$|⁠, |$\bigcirc \!\!\!\!\! \scriptsize{20}$|⁠, |$\bigcirc \!\!\!\!\! \scriptsize{22}$|⁠, |$\bigcirc \!\!\!\!\! \scriptsize{23}\}$|⁠, where each |$\bigcirc \!\!\!\!\! \textit{x}$| represents the ID of the configuration in Fig. 19. In the figure and the rest of the section, the configurations in gray belong to |${\tt{P\hbox{-}E}} $|⁠, the set of Pre-Exploration configurations. The little arrows represent the possible movements. When several destinations are possible, the choice is left to the adversary. Transitions from a configuration to another are shown with dashed arrows. A single head arrow |$\dashrightarrow $| (resp. double head arrow |$\dashrightarrow \mathrel{\mkern -18mu}\dashrightarrow $|⁠) shows a transition with only one robot (resp., two robots) moving. Remark 5.1. Starting from any towerless configuration, the Set-Up phase leads to a configuration in |${\tt{P\hbox{-}E}} $| in at most three moves. 5.2. Exploration phase There are five different sequences to explore the |$(3,3)$|-grid, depending on the Pre-Exploration configuration where the Set-Up phase terminated. The five sequences are shown from Figs 20–24. Explorations proposed in Figs 20 and 21 are, respectively, distinct from all other explorations thanks to the position of the unique tower. For the other explorations in Figs 22and 24, the positions of the robots relative to the unique tower make all configurations of these explorations distinguishable from each other. So, explorations given in Figs 20– 24 are unambiguous and follow. Remark 5.2. Any configuration used during the Exploration phase appears only once and each of the five exploration sequences terminates after at most 9 moves. Theorem 5.3. In the asynchronous model, the deterministic terminating exploration of a |$(3,3)$|-Grid can be solved in at most |$12$| moves by |$5$| oblivious robots. 6. Conclusion We presented necessary and sufficient conditions for the terminating exploration of an anonymous grid by a swarm of |$k$| asynchronous oblivious robots. Our results show, perhaps surprisingly, that exploring a grid and then terminating is easier than exploring a ring and then terminating. In the ring, deterministic (respectively, probabilistic) solutions essentially require five (resp., four) robots. In the grid, three robots are necessary (even in the probabilistic case) and sufficient (even in the deterministic case) in the all but two cases, while the two remaining instances, namely the |$(2,2)$|-Grid and the |$(3,3)$|-Grid, do require four and five robots, respectively. Note that the general algorithm given in that paper requires exactly three robots to solve the problem in |$\Theta (n)$| moves, where |$n$| is the number of nodes in the grid. It is worth investigating whether the terminating exploration of a grid of |$n$| nodes can be achieved using a number |$k$| of robots with |$3> k \geq n-1$|⁠, in particular when |$k$| is even. Footnotes 1 " As explained in [16], this assumption is not restrictive, rather a way to simplify the reasoning. 2 " Obliviousness requires the set of initial configurations to be a proper subset of the set of all configurations to make termination possible in our model; following the literature [3] we assume that every possible initial configuration is towerless. 3 " By definition, if we consider a deterministic terminating exploration, then all executions should terminate; while if we consider a probabilistic terminating exploration, some executions may not terminate, although the overall probability that such executions occur should be 0. 4 " http://www-verimag.imag.fr/∼devismes/robots/ 5 " If |$\ell = 1$|⁠, then all non-Set-Up towerless configurations belong to Class B. 6 " This corner is necessarily on |$EBL$|⁠. 7 " This case can only occur if |$\ell = L$|⁠. 8 " The source code, written is C, can be found at http://www-verimag.imag.fr/∼devismes/robots/. References 1 Flocchini , P. , Prencipe , G. and Santoro , N. ( 2000 ) Distributed Computing by Oblivious Mobile Robots . Morgan & Claypool , Williston, USA . Google Scholar Google Preview OpenURL Placeholder Text WorldCat COPAC 2 Devismes , S. , Petit , F. and Tixeuil , S. ( 2013 ) Optimal probabilistic ring exploration by semi-synchronous oblivious robots . Theoret. Comput. Sci. , 498 , 10 – 27 . Google Scholar Crossref Search ADS WorldCat 3 Flocchini , P. , Ilcinkas , D., Pelc , A. and Santoro , N. ( 2013 ) Computing without communicating: ring exploration by asynchronous oblivious robots . Algorithmica , 65 , 562 – 583 . Google Scholar Crossref Search ADS WorldCat 4 Baldoni , R. , Bonnet , F., Milani , A. and Raynal , M. ( 2008 ) Anonymous graph exploration without collision by mobile robots . Inform. Process. Lett. , 109 , 98 – 103 . Google Scholar Crossref Search ADS WorldCat 5 Chalopin , J. , Flocchini , P., Mans , B. and Santoro , N. ( 2010 ) Network Exploration by Silent and Oblivious Robots . In Thilikos, D. M. (ed.) Graph Theoretic Concepts in Computer Science—36th Int. Workshop, WG 2010 (Revised Papers) , Zarós, Crete, Greece, June 28–30 . Lecture Notes in Computer Science, Vol. 6410 , pp. 208 – 219 . Springer . Google Scholar Crossref Search ADS Google Scholar Google Preview WorldCat COPAC 6 Flocchini , P. , Ilcinkas , D., Pelc , A. and Santoro , N. ( 2010 ) Remembering without memory: tree exploration by asynchronous oblivious robots . Theoret. Comput. Sci. , 411 , 1583 – 1598 . Google Scholar Crossref Search ADS WorldCat 7 Balabonski , T. , Pelle , R., Rieg , L. and Tixeuil , S. ( 2018 ) A Foundational Framework for Certified Impossibility Results with Mobile Robots on Graphs . In Bellavista, P. and Garg, V. K. (eds) , Proc. 19th Int. Conf. Distributed Computing and Networking, ICDCN 2018 , Varanasi, India, January 4–7 , pp. 5:1 – 5:10 . ACM . Google Scholar Google Preview OpenURL Placeholder Text WorldCat COPAC 8 Lamani , A. , Potop-Butucaru , M.G. and Tixeuil , S. ( 2010 ) Optimal Deterministic Ring Exploration with Oblivious Asynchronous Robots . In Patt-Shamir, B. and Ekim, T. (eds) , 17th Int. Colloquium on Structural Information and Communication Complexity (SIROCCO) , Sirince, Turkey, June 7–11 . Lecture Notes in Computer Science, Vol. 6058 , pp. 183 – 196 . Springer . Google Scholar Crossref Search ADS Google Scholar Google Preview WorldCat COPAC 9 Suzuki , I. and Yamashita , M. ( 1999 ) Distributed anonymous mobile robots: formation of geometric patterns . SIAM J. Comput. , 28 , 1347 – 1363 . Google Scholar Crossref Search ADS WorldCat 10 Prencipe , G. ( 2001 ) Instantaneous Actions vs. Full Asynchronicity: Controlling and Coordinating a Set of Autonomous Mobile Robots . In Theoretical Computer Science, 7th Italian Conference (ICTCS 2001) , Berlin, Heidelberg, October . Lecture Notes in Computer Science, Vol. 2202 , pp. 154 – 171 . Springer , Berlin Heidelberg . Google Scholar Crossref Search ADS Google Scholar Google Preview WorldCat COPAC 11 Ooshita , F. and Tixeuil , S. ( 2018 ) Ring Exploration with Myopic Luminous Robots . In Izumi, T. and Kuznetsov, P. (eds) , Stabilization, Safety, and Security of Distributed Systems—20th Int. Symposium, SSS 2018 , Tokyo, Japan, November 4–7 . Lecture Notes in Computer Science, Vol. 11201 , pp. 301 – 316 . Springer . Google Scholar Crossref Search ADS Google Scholar Google Preview WorldCat COPAC 12 Devismes , S. , Lamani , A., Petit , F. and Tixeuil , S. ( 2019 ) Optimal torus exploration by oblivious robots . Computing , 101 , 1241 – 1264 . Google Scholar Crossref Search ADS WorldCat 13 Baldoni , R. , Bonnet , F., Milani , A. and Raynal , M. ( 2008 ) On the Solvability of Anonymous Partial Grids Exploration by Mobile Robots . In Baker, T. P., Bui, A. and Tixeuil, S. (eds) , Principles of Distributed Systems, 12th Int. Conf., OPODIS 2008 , Luxor, Egypt, December 15–18 . Lecture Notes in Computer Science, Vol. 5401 , pp. 428 – 445 . Springer . Google Scholar Crossref Search ADS Google Scholar Google Preview WorldCat COPAC 14 Bonnet , F. , Milani , A., Potop-Butucaru , M. and Tixeuil , S. ( 2011 ) Asynchronous Exclusive Perpetual Grid Exploration Without Sense of Direction . In Anta, A. F., Lipari, G., and Roy, M. (eds) Principles of Distributed Systems—15th Int. Conf., OPODIS 2011 , Toulouse, France, December 13–16 . Lecture Notes in Computer Science, Vol. 7109 , pp. 251 – 265 . Springer . Google Scholar Crossref Search ADS Google Scholar Google Preview WorldCat COPAC 15 Efrima , A. and Peleg , D. ( 2009 ) Distributed algorithms for partitioning a swarm of autonomous mobile robots . Theoret. Comput. Sci. , 410 , 1355 – 1368 . Google Scholar Crossref Search ADS WorldCat 16 D’Angelo , G. , Stefano , G.D., Navarra , A., Nisse , N. and Suchan , K. ( 2013 ) A Unified Approach for Different Tasks on Rings in Robot-Based Computing Systems . In IPDPS Workshops , Cambridge, MA, USA, May 20–24 , pp. 667 – 676 . IEEE . Google Scholar Google Preview OpenURL Placeholder Text WorldCat COPAC 17 Halbwachs , N. , Caspi , P., Raymond , P. and Pilaud , D. ( 1991 ) The synchronous dataflow programming language lustre . Proc. IEEE , 79 , 1305 – 1320 . Google Scholar Crossref Search ADS WorldCat 18 Raymond , P. ( 2008 ) Synchronous Program Verification with Lustre/Lesar . In Mertz, S. and Navet, N. (eds) , Modeling and Verification of Real-Time Systems , pp. 171 – 206 . ISTE/Wiley, Hoboken , New Jersey, USA . Google Scholar Crossref Search ADS Google Scholar Google Preview WorldCat COPAC © The British Computer Society 2020. All rights reserved. For permissions, please email: journals.permissions@oup.com This article is published and distributed under the terms of the Oxford University Press, Standard Journals Publication Model (https://academic.oup.com/journals/pages/open_access/funder_policies/chorus/standard_publication_model) TI - Terminating Exploration Of A Grid By An Optimal Number Of Asynchronous Oblivious Robots JF - The Computer Journal DO - 10.1093/comjnl/bxz166 DA - 2020-05-14 UR - https://www.deepdyve.com/lp/oxford-university-press/terminating-exploration-of-a-grid-by-an-optimal-number-of-asynchronous-Iu3kXkyiJs SP - 1 VL - Advance Article IS - DP - DeepDyve ER -