Crash-Tolerant Exploration of Trees by Energy-Sharing Mobile Agents
Abstract
We consider the problem of graph exploration by energy sharing mobile agents that are subject to crash faults. More precisely, we consider a team of two agents where at most one of them may fail unpredictably, and the considered topology is that of connected acyclic graphs (i.e. trees). We consider both the asynchronous and the synchronous settings, and we provide necessary and sufficient conditions about the energy.
Keywords and phrases:
Mobile Agents, Distributed Algorithms, Energy sharingFunding:
Toshimitsu Masuzawa: This work is supported in part by JSPS KAKENHI 20KK0232.Copyright and License:
![[Uncaptioned image]](x1.png)
2012 ACM Subject Classification:
Theory of computation Distributed algorithms ; Computing methodologies Mobile agentsEditors:
Silvia Bonomi, Letterio Galletta, Etienne Rivière, and Valerio SchiavoniSeries and Publisher:

1 Introduction
Swarm robotics research has focused on the capabilities of groups of autonomous mobile robots, or agents, with limited individual abilities. These agents collaborate to achieve complex tasks such as pattern formation, object assembly, search, and exploration. Collaboration provides several benefits, including accelerated task completion, fault tolerance potential, reduced construction costs, and energy efficiency compared to larger, more complex agents. This paper investigates the collective exploration of a known edge-weighted graph by mobile agents originating from arbitrary nodes. The objective is to traverse every edge at least once, with edge weights indicating their lengths. Each agent possesses a battery with an initial energy level (that may differ among agents). An agent’s battery is depleted by when it travels a distance of .
A recently examined collaboration mechanism among agents is energy sharing, which permits one agent to transfer energy to another upon encountering them. This ability introduces new possibilities for tasks that can be accomplished. Energy-sharing capabilities facilitate graph exploration in scenarios where it would otherwise be unattainable. Conversely, an exploration algorithm incorporating energy sharing must assign trajectories to agents to collectively explore the entire graph and schedule feasible energy transfers, making it more intricate to design. This paper also considers the possibility for an agent to crash, or cease functioning indefinitely and unpredictably. An exploration algorithm must now account for not only the feasibility of energy sharing, but also the feasibility of any plan that considers an agent crashing at any point during its prescribed algorithm.
1.1 Energy-constrained agents
Chalopin et al. [5] study mobile agents with limited energy that must collaboratively deliver data from network sources to a central repository. It turns out that the decision problem is NP-hard for a single source, and they present a 2-approximation algorithm to find the minimum energy assignable to each agent to deliver data. In a follow-up paper, Chalopin et al. [6] study mobile agents with limited energy on a straight line that must collectively deliver data from source point to target point , and show that deciding if agents can deliver data is (weakly) NP-complete. Bärtschi et al. [3] study delivering messages between source-target pairs in an undirected graph using mobile agents initially at distinct nodes. Anaya et al. [1] study the problem of broadcast and convergecast with energy aware mobile agents. In the centralized setting, they give a linear-time algorithm to compute optimal battery power and strategy for convergecast and broadcast on a line. Finding the optimal battery power for trees is NP-hard. They also give a polynomial algorithm for 2-approximation for convergecast and 4-approximation for broadcast in arbitrary graphs. Czyzowicz et al. [9] studied broadcast and exploration in trees, and give an time algorithm to solve the problem in a -nodes tree . If the number of agents is at least equal to the number of leaves of , their approach results in an time algorithm. Bärtschi et al. [2] consider the possibility of gathering energy-constrained mobile agents in an undirected edge-weighted graph. The authors study three variants of near-gathering to minimize: (i) the radius of a ball containing all agents, (ii) the maximum distance between any two agents, or (iii) the average distance between agents. They prove that (i) is polynomial-time solvable, (ii) has a polynomial-time 2-approximation with matching NP-hardness lower bound, and (iii) admits a polynomial-time -approximation but no FPTAS unless P=NP. Czyzowicz et al. [11] studied the exit search problem for two robots on an infinite line, starting at the origin. Time-energy trade-offs for this evacuation problem are studied. Contrary to all aforementioned works, the energy consumption of a robot traveling a distance at speed is measured as .
1.2 Energy transfer
Energy transfer by mobile agents was previously considered by Czyzowicz et al. [8]. Agents travel and spend energy proportional to distance traversed. Some nodes have information acquired by visiting agents. Meeting agents may exchange information and energy. They consider communication problems where information held by some nodes must be communicated to other nodes or agents. They deal with data delivery and convergecast problems for a centralized scheduler with full knowledge of the instance. With energy exchange, both problems have linear-time solutions on trees. For general undirected and directed graphs, these problems are NP-complete. Then, Czyzowicz et al. [7] consider the gossiping problem in tree networks. In an edge-weighted tree network, agents spend energy while traveling and collect copies of data packets from visited nodes. They deposit copies of possessed data packets and collect copies of data packets present at the node. Czyzowicz et al. [7] prove that gossiping can be solved in time for an -node tree network with agents.
Most related to our paper are the works by Czyzowicz et al. [10], Sun et al. [12], and Bramas et al. [4]. On the one hand, Czyzowicz et al. [10] study the collective exploration of a known -node edge-weighted graph by mobile agents with limited energy and energy transfer capability. The goal is for every edge to be traversed by at least one agent. For an -node path, they give an time algorithm to find an exploration strategy or report that none exists. For an -node tree with leaves, they provide an algorithm to find an exploration strategy if one exists. For general graphs, deciding if exploration is possible by energy-sharing agents is NP-hard, even for 3-regular graphs. However, it’s always possible to find an exploration strategy if the total energy of agents is at least twice the total weight of edges; this is asymptotically optimal. Next, Sun et al. [12] examines circulating graph exploration by energy-sharing agents on an arbitrary graph. They present the necessary and sufficient energy condition for exploration and an algorithm to find an exploration strategy if one exists. The exploration requires each node to have the same number of agents before and after. Finally, Bramas et al. [4] considered the problem of exploring every weighted edge of a given ring-shaped graph using a team of two mobile energy-sharing agents. They introduce the possibility for one of the two agents to fail unpredictably and cease functioning permanently (i.e., crashing). In this context, Bramas et al. [4] considered two scenarios: asynchronous (where no limit on the relative speed of the agents is known), and synchronous (where the two agents have synchronized clocks and operate at the same speed).
1.3 Our Contribution
We consider the problem of graph exploration by energy-sharing mobile agents that are subject to crash faults. More precisely, we consider a team of two agents where at most one of them may fail unpredictably, and the considered topology is that of connected acyclic graphs (i.e. trees). We assume that agents initially know the entire topology, as well as their starting locations. Under these strong assumptions, the lower-bounds we provide are interesting, as they also apply to more general case settings. The algorithms we present for the same setting demonstrate that the lower bounds are tight for path graphs, and almost tight for general trees. In the following, and denote the initial energy of the first and second agents, respectively. Also, denotes the initial distance between the agents.
On the positive side, we show that, two asynchronous agents can explore a weighted tree with diameter and total weight if (Theorem 7):
On the negative side, we provide a lower bound (Theorem 1) on the total energy for weighted star graphs (each edge has a weight , ): cannot be in .
In the synchronous case, a sufficient condition (Theorem 9) is:
On the other hand (Theorem 2), we show that there exists an infinite family of trees such that the required total energy is at least .
We also provide tight bounds for the case of path graphs, regardless of the initial locations of agents. The algorithms we provide when agents are not initially collocated assume that the agents may initially exchange information, and we discuss the trade-off between the amount of information exchanged and the solvability of the problem in this case. Due to space constraints, some proofs are omitted from the conference version of this paper.
2 Model
Our model is similar to that proposed by Bramas et al. [4]. We are given a weighted graph where is a set of nodes, is a set of edges, and each edge is assigned a positive integer , denoting its weight (or length). We have mobile agents (or agents for short) respectively placed at some of the nodes of the graph. We allow more than one agent to be located in the same place. Each agent initially possesses a specific amount of energy for its moves. An agent has the ability to travel along the edges of graph in any direction. It can pause its movement if necessary and can change its direction either at a node or while traveling along an edge. The energy consumed by a moving agent is equal to the distance it moved. An agent can move only if its energy is greater than zero. Now, the distance between two agents (that is, the minimum sum of the weights for all the paths connecting them) is the smallest amount of energy needed for them to meet at some point.
In our setting, agents can share energy with each other. When two agents, and , meet at a vertex or edge, can take some energy from . If their energy levels at meeting time are and , then can take an amount of energy from . After the transfer, their energy levels are and , respectively.
Each agent adheres to a pre-established trajectory until encountering another agent. At this point, the agent determines if it acquires energy, and calculates its ensuing trajectory. The definition of a trajectory depends on the synchrony model:
-
In the synchronous model, a trajectory is a sequence of pairs , where is a node, and denotes the time at which the agent should reach . For each , , and is either equal to (i.e., the agent waits at between and ), or is adjacent to (i.e., the agent leaves at time and arrives at at time ). For simplicity, we assume in our algorithm that the moving speed is always one (it takes time to travel distance , so if and the weight of edge is , then ).
-
In the asynchronous model, a trajectory is just a sequence of nodes , being adjacent to for each , and the times at which it reaches the nodes are determined by an adversary.
In other words, in the synchronous model, the agent controls its speed and its waiting time at nodes, while an adversary decides them in the asynchronous model.
The computation of the trajectory and the decision to exchange energy is based on a deterministic localized algorithm (that is, an algorithm executed by the agent). In a given execution, the configuration, which consists of each agent’s location and remaining energy, at time is denoted by .
Localized algorithm.
A localized algorithm executed by an agent at time takes as input the pasts of and its collocated agents, and returns (i) its ensuing trajectory and (ii) the amount of energy taken from each collocated agent . The past of at time corresponds to the path already traversed by union the pasts of all the previously met agents. More formally:
A set of localized algorithms is valid for a given initial configuration if, for any execution starting from , agents that are ordered to move have enough energy to do so and when an agent takes energy from an agent at time , then does not take energy from at .
In this paper, we consider the possibility of agent crashes. At any point in the execution, an agent may crash and stop operating forever. However, if has remaining energy , then other agents meeting may take energy from (and are still able to read its memory without knowing it is crashed). Now, a set of localized algorithms is -crash-tolerant if it is valid even in executions where at most agents crash.
We are interested in solving the problem of -crash-tolerant collaborative exploration:
-crash-tolerant collaborative exploration.
Given a weighted graph and mobile agents together with their respective initial energies and positions in the graph, find a valid set of localized algorithms that explore (or cover) all edges of the graph despite the unexpected crashes of at most agents.
This paper focuses on the -crash-tolerant collaborative exploration of trees by two agents.
3 Lower Bounds
In this section, we present two lower bounds, one for the case of asynchronous unweighted stars, and one for the case of synchronous trees. The lower bound for stars is asymptotically tight even considering more general trees, as it matches the complexity of our algorithm solving the exploration in arbitrary asynchronous trees. Only the factor in front of the logarithmic term is different. In the synchronous case, the lower bound is also tight for the factor , but the coefficient of in from of the logarithmic term in our algorithm’s complexity is larger by a factor of 2.
3.1 Asynchronous Stars
For asynchronous stars, we first show a lower bound of the total energy consumption.
Theorem 1.
Consider a star of size where the weight of each edge is . If two asynchronous agents start at the center of the star, then the total energy consumption of any algorithm cannot be in , where (i.e., the total weight).
Proof.
Assume for the purpose of contradiction that there exists an algorithm that explores any such star of degree with total energy in the worst case, with a non-decreasing function in (also as we know is a trivial lower bound)111It is equivalent to say that there exists in and in such that the algorithm uses , and then define .
Consider a -star and assume the total amount of energy is . If it is possible for the scheduler to ensure that the two agents, following the paths dictated by the algorithm, never meet, then each agent must have enough energy to explore the whole star, i.e., . Thus, the total amount of energy is , which is a contradiction. This means that the two paths chosen by the algorithm for the two agents correspond to two walks, with opposite directions, on the same cycle covering a sub-star. The scheduler can ensure that the agents meet at a leaf node. When this happens, then energy has been spent, where is the number of edges in . The agents have explored a star of degree at most . Since, before they start, they must each have enough energy to explore the entire cycle, it follows that . Before using the complexity of the algorithm recursively on the remaining star, we can ensure that the degree of the star that the agents have explored is close to the upper bound (which is in fact the best case for the agents). This can be done by activating one agent until the degree of the star explored by the agent is (with
(1) |
The remaining unexplored edges form a -star. The agents must first move towards this new star, which uses energy. So the total remaining energy is
Then, by using the same algorithm, this star is explored, in the worst case using
energy. We show that there exists a large enough so that the remaining energy is not enough to explore the remaining star in the worst case.
Replace by its computed value (thanks to Equation (1)) and we obtain that in the worst case, the energy required to explore the remaining star is at least (for large enough)
where the in the denominator can be removed because it is smaller than when is large enough. Hence, the previous value is equal to
To show the contradiction, it is sufficient to show that, for a value large enough, the factor inside the logarithm is strictly greater than 1. Indeed, this implies that the amount of energy required in the worst case is strictly more than , a contradiction. Assume that
for all , in particular for for all . Then,
This is bounded as the product series converges, contradicting that is in .
3.2 Synchronous Trees
We now present a lower bound on the total energy for exploring a weighted tree with the total weight and a diameter .
Theorem 2.
There exists an infinite family of trees such that the required total energy by two synchronous agents is at least
Proof.
In the proof, we assume trees are unweighted, that is, for each edge . The theorem for weighted trees is obtained by setting the weight of each edge to some appropriate value so that the total cost becomes .
Let and consider the sequence such that . Let be the following tree of diameter :
By convention, let be the perfect binary tree of height 2 (visible in the figure as the bottom-sub-tree rooted at ).
Assume both agents are initially located at . We show by induction on that exploring requires a total of , where
If , then one can see that if an agent crashes at a leaf, then the required total energy is . Indeed, if an agent crashes at a leaf, the energy to reach the leaf where the crashed agent is 2, which has been consumed twice (by the crashed and by the non-crashed agent). Then, all the other edges are explored twice except for the path to the last leaf (of length 2), so in total it is .
Now assume that the result is true for any such that , then we prove the result for .
We consider two cases, depending on whether is visited before at least one of the nodes below , or if the nodes below are all visited before (or at the same time as).
If the nodes below are explored before node (or at the same time), then, if the total energy is at most , we can show that the first bottom-edge of has been traversed by the two agents (hence 4 times). Indeed, one agent cannot explore alone the bottom-sub-tree of since it requires energy to be visited (and come back to ) and the other agent needs to keep energy in case the first one crashes. So it requires at least but the total amount of energy available is at most , which is less than when . So the exploration of the bottom-sub-tree of and of the edge costs at least . The remaining tree is exactly , rooted at , and we know by induction that the exploration of requires . The energy consumed to explore the tree is at least the sum of the energy consumed to explore each sub-tree so in total, the energy consumed is at least
Now consider the case where is visited first, say by . If the agents remain together, then the path is traversed 4 times. Otherwise, when the two agents split, is left with energy and with . Consider for simplicity that split before an agent travels edge (if the agents travel together a path then in the end this path is traversed four times, and the remaining result holds).
Before the agents meet again, is exploring a subtree containing with at most edges, and we know that because contains . Let be the smallest index such that the tree below contains a leaf that is not in . If does not crash, it has to meet with again, before all the leaves below are explored, so an agent has to traverse the path again to explore the unexplored leaves below . So in the end, the path , of length , is traversed at least three times. In total, at least energy is consumed when the exploration is complete.
Now consider that crashes at . When realizes that is crashed, it can explore some edges and it then eventually reaches (it has to do so, at least to confirm the exploration of the tree). Let be the largest index such that the sub-tree below contains a leaf that is not explored by before reaches . After visiting , has to visit a leaf below so the path , of length , is traversed at least three times. So in total, at least energy is consumed when the exploration is complete. So in the worst case, in total, at least energy is consumed.
Assume (otherwise the theorem is proved). We now prove that . Indeed, if we assume for the sake of contradiction that , it means that, when crashes while exploring a subtree that includes , and when realizes that is crashed, then visits all the subtrees below , , and then has to be able to visit all the subtrees below , since can be crashed in any of these nodes. If , this means that must be able to visit the entire tree, so . Since , we obtain , a contradiction.
Hence we have , so either , which implies and , or , which implies and . Hence the Theorem is proved.
4 Crash-tolerant algorithms for two energy-sharing agents in trees
Our algorithms are presented as a set of rules. Each rule is composed of a condition (that must be true to execute the rule action) and an action (the rest of the rule, that is executed when the condition is satisfied). Each action can be:
-
A move in a prescribed direction toward a node or an agent. For example, in the line topology, “ ” prescribes the agent to go left until node is reached, while “” prescribes the agent to go right until agent is met.
-
A sequence of actions, two consecutive actions being separated by a semicolon “;”. Sometimes, a sequence is given a name for brevity. For example, (resp. ) performs a clockwise Eulerian (resp. a counter clockwise Eulerian) tour of tree .
-
An alternation of actions, depending on a Boolean condition. For example, “if c then else ” prescribes that action should be executed if condition is satisfied, while action should be executed otherwise. The condition can be related to the topology (e.g., the agent is closer to a point than a point ) or be related to a collocated agent and its past (e.g., the collocated agent is coming from a given edge). In the line, we consider only three conditions: (i) returns true if agent was going left, and false otherwise; (ii) returns true if agent was going right, and false otherwise; and (iii) returns true if is closer to the observing agent than , and false otherwise.
-
When agent are synchronous, a waiting instruction, that is stopped either if the other agent is met, or after a given number of time instants. For example, “wait time units for then timeout ” prescribes the agent to wait at most time instants for agent to meet at the current position. If the agent meets , then execute , otherwise execute .
Before presenting our algorithms for trees, we show two general Lemmas that hold regardless of the topology, and give necessary conditions about the initial energy of the agents. The third Lemma presents two general properties of crash-tolerant exploration algorithms on trees.
Lemma 3.
Let be a connected graph to be explored by two agents and . If the initial distance between and is , then and are necessary for exploring .
Lemma 4.
Let be a connected graph to be explored by two agents and . If the total weight of is , then is necessary for exploring .
Lemma 5.
In any crash-tolerant exploration algorithm by two agents on a tree , the following holds:
-
1.
Each agent has to eventually move unless it confirms the completion of exploration.
-
2.
Each agent confirms the completion of exploration only when, for each leaf , is visited by or meets the other agent that already visited leaf .
4.1 Asynchronous trees
We now consider the case of two asynchronous agents in trees. Let be a weighted tree of nodes, and let be the weighted diameter of . First, we construct a family of connected non-empty subtrees of named , where and forms a partition of . At the beginning, the agents meet to share energy. Then the agents repeat a procedure for all from 1 to . The procedure assumes that the agents are initially at the same location (possibly on an edge), and ensure that after execution the agents are at the same location (not necessarily the same as the initial one) if (when the agents can terminate anywhere on completion of the exploration).
Agent (resp. ) executing first moves to the closest node of , executes (resp. ), and moves back to its initial location, until it meets the other agent, and is explored. If the agents meet before ending this sequence of moves and is explored, then the procedure terminates. This occurs during the exploration of the Eulerian tour from , or when one of the agents comes back from to its initial location after completing its Eulerian tour while the other has not started it (it is still moving towards from the location where it started executing ).
Since the length of the Eulerian tour is (where denotes the weight of ) and the distance to from their initial location is in the worst case, each agent must have, at the beginning of the procedure, the energy of at least if (to terminate even when the other agent remains at the initial location), at least if . When the procedure terminates the total energy consumed during the procedure is at most (because every edge traversed in the procedure is traversed exactly twice if , and at most twice if ).
Consequently, to complete all , for every , sequentially, our algorithm requires that the total remaining energy at the beginning of the procedure is as follows, where is the initial distance between the agents:
-
-
-
where is the initial weighted distance between the agents.
Moreover, the total energy consumption for exploring is at most .
We now have to construct the partition of so that should be small to reduce the number of calls to , but each should not be too large to avoid increasing the energy required at the beginning of . A good partition could be to have and , which results in . In general trees, such a partition does not exist, but we can obtain a similar result using the centroid-based partition recursively.
Let be a weighted tree with total weight . The centroid of is defined as follows. In the following, for a tree and a node of , can be regarded as a rooted tree, denoted by , rooted at . For the root and its neighbor , let be the subtree of rooted at .
-
1.
When there exists an edge satisfying and , the centroid of is the point on edge such that . We call the edge centroid.
-
2.
When there exists a node satisfying for each neighbor of , the centroid of is node . We call the node centroid.
Lemma 6.
Any weighted tree has a unique centroid.
We now construct a new tree from by inserting nodes onto edges when necessary to simplify the construction of the partition. Observe that exploring the edges of is equivalent to exploring the edges of , as exploring the two edges obtained after adding a node is equivalent to exploring the initial edge.
To construct and obtain of subgraphs of , we recursively use the centroid-based partition of a tree. Let temporally and be the centroid of . If is an edge centroid on an edge , is updated by inserting a node at to partition into two edges. We denote the inserted node as . So now, is the node centroid of . Consider the subtrees for each neighbor of .
We can show that there exists a subset of neighbors of such that . Let be the connected subtree of consisting of nodes and edges among them, where denotes the set of nodes in . Hence satisfies
(2) |
Temporary tree is further updated (if necessary) and is obtained by applying the same method to the remaining tree consisting of the node set . Trees are obtained by recursively applying the same method until the weight of the remaining tree becomes one or smaller, where the last subtree is the remaining tree. Each time the method is applied, the weight of the remaining tree is reduced by at least , which implies the method is applied at most times. Thus, the initial amount of the total energy should be at least . Actually, we can derive the following sufficient condition on the initial amount of the energy.
-
:
The following shows the actions of the agents. It is assumed that subtrees are a priori determined by the recursive centroid-based partitions.
- Step 0:
-
The agents meet on the shortest path between their initial locations. (This is executed only once at the beginning of the execution.) Set .
- Step 1:
-
When they meet at a point, say (possibly on an edge), they evenly share the remaining energy.
- Step 2
-
Agent (resp. ) performs the following sequence of moves: move to the nearest node of ; traverse along a Eulerian tour of in the clockwise direction (resp. the counter-clockwise direction) until the agent (i) meets the other, or (ii) completes the Eulerian tour traversal without meeting the other; move toward until the agent meets the other in case of ii) if ; If , set be the meeting point, set , and continue from Step 1.
Theorem 7.
If condition holds, then if at most one agent crashes, two asynchronous agents executing the localized algorithms prescribed above explore the entire tree.
Notice that in unweighted stars of degree , hence with , we have holds for the number of the subtrees and the closest node of is the center node of the star graph for each . Consequently, the sufficient condition is refined and becomes tight.
Corollary 8.
The prescribed algorithm explores the entire unweighted star of degree when the following condition is satisfied:
4.2 Synchronous trees
We now present an upper bound for synchronous tree exploration. Our proof is constructive, as we present an algorithm to solve the problem. Our strategy for exploring is as follows. First, the two agents meet at the initial location of agent , then they execute that orders one agent to explore all the subtrees , rooted at the children of , except with the largest weight. When only is unexplored, the agents both move towards its root and execute recursively . If the exploring agent crashes, the other one can reach it to retrieve the remaining energy and explore the remaining edges on its own. The pseudo-code of is given in Algorithm 1 and is illustrated by Figure 2.
We now give a more formal description of the algorithm. First, the two agents meet at the node where agent is initially located. If is the initial distance between the two agents, waits for until the time , the time should take to reach without crashing. If does not reach by the time, moves toward the initial location of until it meets . When the agents are collocated, a total of energy is consumed. If is crashed, retrieves all the energy from and explores the entire tree using at most energy.
If both agents are in , then the agents execute as follows. Consider as a tree rooted at and let be the subtree rooted at a child of , and let . Without loss of generality, assume that is the largest among all . Then, we explain how to explore (subtrees except for ) one by one, followed by the exploration of in a recursive way.
To explore , the agents first evenly share energy so that each has the energy of at least , which is sufficient to solely complete the exploration of and come back to . Agent moves to the root of , traverses along an Eulerian tour, and then comes back to . While explores , is waiting at . If does not come back to in time after leaving for (which implies crashes during the traversal), explores along the same Eulerian tour of but in the opposite direction until it meets and is completely explored. When meets , it gets all the remaining energy from , comes back at and explores all the remaining part by itself. The energy consumption for exploring is with additionally at most (the diameter) if crashes during the exploration (but this can occur at most once). If does not crash and completes the exploration of , then the agents share their energy and explores in a similar way. If agent explores , then the agents evenly share the remaining energy, move to the root of , and explore using the same algorithm .
The remarkable point is that the edge between and the root of is traversed by the two agents together but is never traversed afterward. Hence each edge is traversed exactly twice if no crash occurs. If a crash occurs, each edge is traversed at most twice, except for a path of length at most that is traversed three times. Thus, the total energy consumption for exploring is at most ; moving to and for exploring the tree.
The condition for the above method is as follows.
-
:
Theorem 9.
If condition holds, then if at most one agent crashes, two synchronous agents executing the localized algorithms prescribed above explore the entire unweighted tree.
5 Optimal algorithms in lines
5.1 Asynchronous Lines
Let be a path graph (called line thereafter) such that and . We consider that is on the left of and says, for example, “an agent moves left”. Let be the weight of edge . For each node , let be the weighted distance from to , that is, , and let be the total weight of , that is, . Consider that agents and are initially located at nodes and respectively. For convenience, we assign and , and assume without loss of generality that and 222If , one can reverse the order of the nodes on the line, exchange the positions of and , and the condition is satisfied in the new graph.. Figure 3 illustrates these notations.
Let and be the initial energy of agents and respectively. The four conditions for the rules are:
-
:
-
:
-
:
-
:
The corresponding actions are denoted by , .
-
:
-
: ;
-
:
; if then ; else
-
:
-
:
; if then ; else -
: ;
-
:
-
: ; ;
-
: ;
-
:
-
:
; if then ; else ; -
:
; if then ; else ;
In the above algorithms, when two agents meet, they share energy equally. In more detail, if the energy levels when meeting are and with , then takes an amount of energy from . After the transfer, their energy levels are both .
Lemma 10.
For , if is satisfied and is executed, then asynchronous exploration completes if at most one agent crashes.
In the following, we show that satisfying at least one of the conditions or is necessary for two asynchronous agents to complete exploration of lines. We first state some general facts about asynchronous line exploration in the following Lemma.
Lemma 11.
Any line exploration algorithm for two asynchronous agents satisfies:
-
1.
Consider the configuration that two agents meet. Suppose (resp. ) is unvisited although (resp. ) is already visited by either of the agents, each agent has to have enough energy to visit (resp. ).
-
2.
Consider the configuration that two agents meet and both and are unvisited by either of the agents. Then each agent has to have enough energy to visit and (the amount of energy required is plus the distance to the closest extremity).
Lemma 12.
If for every , is not satisfied, then asynchronous exploration assuming at most one agent crashes is impossible.
For two agents without energy sharing, the following lemma shows the amounts of the initial energy of the agents necessary and sufficient for exploration of lines.
Lemma 13.
If and don’t share energy, then exploring the line assuming at most one crash is possible if and only if and hold.
5.2 Synchronous Lines
In this subsection, we consider synchronous lines. We assume that two agents start execution at the same time, and it takes time for each agent to travel distance . A remarkable feature of synchronous lines is that an agent can detect the crash of the other when it does not show up as scheduled. This feature enables energy saving with respect to the asynchronous case. We consider four possible conditions that enable exploration:
-
:
-
:
-
:
-
:
The corresponding actions are denoted by , in Figure 4.
In the synchronous setting, when two agents meet, each agent can detect whether the other agent is crashed or not (the other agent is considered crashed if a timeout occurs). Upon meeting, if the other agent is not crashed (yet), the agents share energy so that both have the same amount. Otherwise, if an agent crashes, then the other agent takes all the remaining energy from .
As for the asynchronous line, we now prove that the four conditions are necessary and sufficient for the synchronous line in the two following Lemmas.
Lemma 14.
For , if is satisfied and is executed, then synchronous exploration completes if at most one agent crashes.
Lemma 15.
If for every , is not satisfied, then synchronous exploration assuming at most one agent crashes is impossible.
6 Conclusion
We characterized the solvability of exploration with two crash-prone energy-sharing mobile agents in the case of tree topologies, both in the synchronous and in the asynchronous settings. Obvious open questions include further closing the gap between necessary and sufficient conditions for the initial amounts of energy in the case of trees that are not reduced to a line, solving the problem with more than two agents, and considering other topologies, such as grid, tori, and general graphs.
Also, our model for energy transfer is very simple (all energy can be transferred instantaneously between two agents, at no cost). It would be interesting to study non-linear battery models (where the capacity decreases faster if more instantaneous current is drawn, and the capacity increases less if faster charge is executed) in this context.
References
- [1] Julian Anaya, Jérémie Chalopin, Jurek Czyzowicz, Arnaud Labourel, Andrzej Pelc, and Yann Vaxès. Convergecast and broadcast by power-aware mobile agents. Algorithmica, 74(1):117–155, 2016. doi:10.1007/s00453-014-9939-8.
- [2] Andreas Bärtschi, Evangelos Bampas, Jérémie Chalopin, Shantanu Das, Christina Karousatou, and Matús Mihalák. Near-gathering of energy-constrained mobile agents. Theor. Comput. Sci., 849:35–46, 2021. doi:10.1016/j.tcs.2020.10.008.
- [3] Andreas Bärtschi, Jérémie Chalopin, Shantanu Das, Yann Disser, Daniel Graf, Jan Hackfeld, and Paolo Penna. Energy-efficient delivery by heterogeneous mobile agents. In Heribert Vollmer and Brigitte Vallée, editors, 34th Symposium on Theoretical Aspects of Computer Science, STACS 2017, March 8-11, 2017, Hannover, Germany, volume 66 of LIPIcs, pages 10:1–10:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.STACS.2017.10.
- [4] Quentin Bramas, Toshimitsu Masuzawa, and Sébastien Tixeuil. Brief announcement: Crash-tolerant exploration by energy sharing mobile agents. In Shlomi Dolev and Baruch Schieber, editors, Stabilization, Safety, and Security of Distributed Systems – 25th International Symposium, SSS 2023, Jersey City, NJ, USA, October 2-4, 2023, Proceedings, volume 14310 of Lecture Notes in Computer Science, pages 380–384. Springer, 2023. doi:10.1007/978-3-031-44274-2_28.
- [5] Jérémie Chalopin, Shantanu Das, Matús Mihalák, Paolo Penna, and Peter Widmayer. Data delivery by energy-constrained mobile agents. In Paola Flocchini, Jie Gao, Evangelos Kranakis, and Friedhelm Meyer auf der Heide, editors, Algorithms for Sensor Systems – 9th International Symposium on Algorithms and Experiments for Sensor Systems, Wireless Networks and Distributed Robotics, ALGOSENSORS 2013, Sophia Antipolis, France, September 5-6, 2013, Revised Selected Papers, volume 8243 of Lecture Notes in Computer Science, pages 111–122. Springer, 2013. doi:10.1007/978-3-642-45346-5_9.
- [6] Jérémie Chalopin, Riko Jacob, Matús Mihalák, and Peter Widmayer. Data delivery by energy-constrained mobile agents on a line. In Javier Esparza, Pierre Fraigniaud, Thore Husfeldt, and Elias Koutsoupias, editors, Automata, Languages, and Programming – 41st International Colloquium, ICALP 2014, Copenhagen, Denmark, July 8-11, 2014, Proceedings, Part II, volume 8573 of Lecture Notes in Computer Science, pages 423–434. Springer, 2014. doi:10.1007/978-3-662-43951-7_36.
- [7] Jurek Czyzowicz, Dariusz Dereniowski, Robert Ostrowski, and Wojciech Rytter. Gossiping by energy-constrained mobile agents in tree networks. Theor. Comput. Sci., 861:45–65, 2021. doi:10.1016/j.tcs.2021.02.009.
- [8] Jurek Czyzowicz, Krzysztof Diks, Jean Moussi, and Wojciech Rytter. Communication problems for mobile agents exchanging energy. In Jukka Suomela, editor, Structural Information and Communication Complexity – 23rd International Colloquium, SIROCCO 2016, Helsinki, Finland, July 19-21, 2016, Revised Selected Papers, volume 9988 of Lecture Notes in Computer Science, pages 275–288, 2016. doi:10.1007/978-3-319-48314-6_18.
- [9] Jurek Czyzowicz, Krzysztof Diks, Jean Moussi, and Wojciech Rytter. Energy-optimal broadcast and exploration in a tree using mobile agents. Theor. Comput. Sci., 795:362–374, 2019. doi:10.1016/j.tcs.2019.07.018.
- [10] Jurek Czyzowicz, Stefan Dobrev, Ryan Killick, Evangelos Kranakis, Danny Krizanc, Lata Narayanan, Jaroslav Opatrny, Denis Pankratov, and Sunil M. Shende. Graph exploration by energy-sharing mobile agents. In Tomasz Jurdzinski and Stefan Schmid, editors, Structural Information and Communication Complexity – 28th International Colloquium, SIROCCO 2021, Wrocław, Poland, June 28 – July 1, 2021, Proceedings, volume 12810 of Lecture Notes in Computer Science, pages 185–203. Springer, 2021. doi:10.1007/978-3-030-79527-6_11.
- [11] Jurek Czyzowicz, Konstantinos Georgiou, Ryan Killick, Evangelos Kranakis, Danny Krizanc, Manuel Lafond, Lata Narayanan, Jaroslav Opatrny, and Sunil M. Shende. Time-energy tradeoffs for evacuation by two robots in the wireless model. Theor. Comput. Sci., 852:61–72, 2021. doi:10.1016/j.tcs.2020.11.014.
- [12] X. Sun, N. Kitamura, T. Izumi, and T. Masuzawa. Circulating exploration of an arbitrary graph by energy-sharing agents. In Proc. of the 2023 IEICE General Conference, pages 1–2, 2023.