Graph Exploration: The Impact of a Distance Constraint
Abstract
A mobile agent, starting from a node of a simple undirected connected graph , has to explore all nodes and edges of using the minimum number of edge traversals. To do so, the agent uses a deterministic algorithm that allows it to gain information on as it traverses its edges. During its exploration, the agent must always respect the constraint of knowing a path of length at most to go back to node . The upper bound is fixed as being equal to , where is the eccentricity of node (i.e., the maximum distance from to any other node) and is any positive real constant. This task has been introduced by Duncan et al. [15] and is known as distance-constrained exploration.
The penalty of an exploration algorithm running in is the number of edge traversals made by the agent in excess of . In [20], Panaite and Pelc gave an algorithm for solving exploration without any constraint on the moves that is guaranteed to work in every graph with a (small) penalty in . Hence, a natural question is whether we can obtain a distance-constrained exploration algorithm with the same guarantee as well.
In this paper, we provide a negative answer to this question. We also observe that an algorithm working in every graph with a linear penalty in cannot be obtained for the task of fuel-constrained exploration, another variant studied in the literature.
This solves an open problem posed by Duncan et al. in [15] and shows a fundamental separation with the task of exploration without constraint on the moves.
Keywords and phrases:
exploration, graph, mobile agentCategory:
Track A: Algorithms, Complexity and GamesCopyright and License:
![[Uncaptioned image]](x1.png)
2012 ACM Subject Classification:
Theory of computation Design and analysis of algorithmsFunding:
This work has been partially supported by the ANR project SkyData (ANR-22-CE25-0008).Editors:
Keren Censor-Hillel, Fabrizio Grandoni, Joël Ouaknine, and Gabriele PuppisSeries and Publisher:

1 Introduction
1.1 Background
Exploring an unknown environment is a fundamental task with numerous applications, including target localization, data gathering, and map construction. The considered environments can vary considerably in type: they may be terrains, networks, three-dimensional spaces, etc. In hazardous situations, it is generally more appropriate to delegate exploration to a mobile artificial entity, hereinafter referred to as an agent, which could be an autonomous robot or a vehicle remotely controlled by a human.
In this paper, we focus our attention on the task of exploration by a mobile agent of a network modeled as a graph, and more specifically on a variant where the agent must always know a path from its initial node to its current node that does not exceed a given upper bound. This requirement finds its justification in applications where the agent needs to always keep the possibility of returning quickly to its base or to always maintain a certain distance to ensure ongoing communication with its base.
1.2 Model and Problem Definition
An agent is assigned the task of exploring a simple111In [15], where the task of distance-constrained exploration that we will study has been introduced, the authors do not mention explicitly whether they consider simple graphs or multigraphs. A closer look at their work can reveal, though, that their results hold for multigraphs. However, it is important to note that, in the context of the impossibility proof that we will conduct, the choice of focusing only on simple graphs does not lead to a loss of generality. In fact, it broadens the scope of our result, ensuring that it holds for both simple graphs and multigraphs. finite undirected graph , starting from a node , called the source node. The exploration requires visiting (resp. traversing) at least once every node (resp. every edge). Thus, is supposed to be connected. We denote by the degree of a node in , and by (resp. ) the order (resp. size) of .
We make the same assumption as in [15] which states that the agent has unbounded memory and can recognize already visited nodes and traversed edges. This is formalized as follows. Nodes of have arbitrary pairwise distinct labels that are positive integers. The label of will be denoted by . Distinct labels, called port numbers and ranging from to , are arbitrarily assigned locally at each node to each of its incident edges. Hence, each edge has two ports, one per endpoint, and there is no a priori relationship between these two ports. At the beginning, the agent located at node learns only its degree and its label. To explore the graph, the agent applies a deterministic algorithm that makes it act in steps: at each step, the algorithm selects a port number at the current node (on the basis of all information that has been memorized so far by the agent) and then asks the agent to traverse the edge having port at . At that point, the agent traverses the given edge at any finite positive speed and, once it enters the adjacent node, it learns (only) its degree, its label as well as the incoming port number. Afterwards, the agent starts the next step, unless the algorithm has terminated.
Roughly speaking, the memory of the agent is the total information it has collected since the beginning of its exploration. We formalize it as follows: the memory of the agent, after the first edge traversals, is the sequence , where is the information of the agent at its start and is the information acquired right after its th edge traversal. Precisely, the initial memory is represented by the 4-tuple , where and correspond to the label of the source node and its degree respectively. Then, if , is the 4-tuple where is the identifier of the occupied node after the th edge traversal, the degree of that node, is the port by which the agent has left the node to make the th edge traversal, and the port by which the agent entered node via its th edge traversal.
Without any constraint on the moves, the task of exploration in the above model is called unconstrained exploration. However, in this paper, we study a variant introduced in [15] and called distance-constrained exploration. In this variant, the agent must deal with the additional constraint of always knowing a path (i.e., a sequence of already explored edges) of length at most from its current location to node . The value is fixed to , where and respectively correspond to the eccentricity of node and an arbitrary positive real constant. In [15], two scenarios are considered: one where both and are initially known to the agent, and another where only is known. In this paper, we adopt the more challenging scenario from a proof-of-impossibility perspective, where both and are initially known to the agent, in order to give our result a greater impact.
An instance of the problem is defined as the tuple . We will denote by the set of all instances such that the eccentricity of the source node (of label ) in is .
An important notion involved in this paper is that of penalty incurred during exploration. First discussed by Pelc and Panaite in [20], the penalty of an exploration algorithm running in is the number of edge traversals in excess of made by the mobile agent. In their seminal paper [20], Panaite and Pelc gave an algorithm for solving unconstrained exploration, which is guaranteed to work in every connected graph with a (small) penalty of . In the light of this result, an intriguing question naturally arises:
Would it be possible to design a distance-constrained exploration algorithm working in every graph with a penalty of ?
1.3 Our Results
In this paper, we provide a negative answer to the above question. This negative answer is strong as we show that for any positive real and every integer , there is no algorithm that can solve distance-constrained exploration for every instance , where is a connected simple graph, of with a penalty of .
Moreover, we observe that the impossibility result remains true for another variant of constrained exploration studied in the literature, known as fuel-constrained exploration. In this variant, which was introduced by Betke et al. in [6], the context remains the same, except that now the agent must face a slightly different constraint: it has a fuel tank of limited size that can be replenished only at its starting node . The size of the tank is , where is any positive real constant and is the eccentricity of . The tank imposes an important constraint, as it forces the agent to make at most edge traversals before having to refuel at node , otherwise the agent will be left with an empty tank and unable to move, preventing further exploration of the graph. The underlying graph and node are chosen so that (if not, fuel-constrained exploration is not always feasible).
Through our two impossibility results, we show a fundamental separation with the task of unconstrained exploration. We also solve an open problem posed by Duncan et al. in [15], who asked whether distance-constrained or fuel-constrained exploration could be achieved with a penalty of in every graph.222In [15], the authors also investigated a third variant known as rope-constrained exploration, but they did not include it in their open problem. This point is further detailed at the end of the related work section.
Due to lack of space, many technical results and formal proofs have been omitted. All details are available in the full version of the paper [12].
1.4 Related Work
The problem of exploring unknown graphs has been the subject of extensive research for many decades. It has been studied in scenarios where exploration is conducted by a single agent and in scenarios where multiple agents are involved. In what follows, we focus only on work related to the former case (for the latter case, a good starting point for the curious reader is the survey of Das [10]).
In the context of theoretical computer science, the exploration problem was initially approached by investigating how to systematically find an exit in a maze (represented as a finite connected subgraph of the infinite 2-dimensional grid in which the edges are consistently labeled North, South, East, West). In [22], Shannon pioneered this field with the design of a simple finite-state automaton that can explore any small maze spanning a grid. More than twenty years later, Budach [8] significantly broadened the scope of study by showing that no finite-state automaton can fully explore all mazes. Blum and Kozen showed in [7] that this fundamental limitation can be overcome by allowing the automaton to use only two pebbles. The same authors naturally raise the question of whether one pebble could suffice. A negative answer to this question is provided by Hoffmann in [17].
In the following decades, much of the attention shifted to the exploration of arbitrary graphs, for which the solutions dedicated to mazes become obsolete. Studies on the exploration of arbitrary graphs can be broadly divided into two types: those assuming that nodes in the graph have unique labels recognizable by the agent, and those assuming anonymous nodes.
As for mazes, exploration of anonymous graphs has been investigated under the scenario in which the agent is allowed to use pebbles [5, 9, 13, 14]. In [14], Dudek et al. showed that a robot provided with a single movable pebble can explore any undirected anonymous graph using moves. If the pebble is not movable and can only be used to mark the starting node of the agent, it is shown in [9] that exploration is still possible using a number of edge traversals polynomial in . In [13], the authors investigated the problem in the presence of identical immovable pebbles, some of which are Byzantine (a Byzantine pebble can be unpredictably visible or invisible to the agent whenever it visits the node where the pebble is located) and designed an exploration algorithm working in any undirected graph provided one pebble always remains fault-free. In the case where the graph is directed, exploration becomes more challenging due to the impossibility of backtracking and may even be sometimes infeasible if the graph is not strongly connected. However, in the scenario where the agent evolves in strongly connected directed graphs, Bender et al. proved that movable pebbles are necessary and sufficient to achieve a complete exploration.
When no marking of nodes is allowed, exploration of undirected anonymous graphs becomes obviously more difficult, and detecting the completion of the task cannot be always guaranteed without additional assumptions. If randomization is allowed, we know from [2] that a simple random walk of length can cover, with high probability, all nodes of an undirected graph of maximal degree . Such a random walk can thus be used to fully explore a graph (and eventually stop), by initially providing the agent with an upper bound on and by making it go back and forth over each edge incident to a node of the random walk. If randomization is not allowed, all nodes of an undirected anonymous graph can still be visited, using universal exploration sequences (known as UXS) introduced in [19]. Formally, a sequence of integers is said to be a UXS for a class of graphs, if it allows an agent, starting from any node of any graph , to visit at least once every node of in steps as follows. In step , the agent leaves its starting node by port and enters some node . In step , the agent leaves its current node by port , where is the port by which it entered in step , and enters some node . In [21], it is proven that for any positive integer , a UXS of polynomial length in , for the class of graphs of order at most , can be computed deterministically in logarithmic space and in time polynomial in . As with random walks, this can be used to fully explore a graph, by initially providing the agent with an upper bound on and by instructing it to traverse each edge incident to a node visited by a UXS for the class of graphs of order at most . Therefore, whether deterministically or not, it can be easily shown from [2, 21] that an agent can explore any undirected anonymous graph of order at most even without the ability to mark nodes as long as it has a memory of size : in [16] Fraigniaud et al. gave a tight lower bound by showing that a memory of size is necessary.
The exploration of labeled graphs was a subject of research in [1, 3, 4, 6, 11, 15, 20], with a particular focus on minimizing the number of edge traversals required to accomplish the task.
In [11], Deng and Papadimitriou showed an upper bound of moves to explore any labeled directed graph that is strongly connected, where , called the deficiency of the graph, is the minimum number of edges that have to be added to make the graph Eulerian. This is subsequently improved on by Albers and Henzinger in [1], who gave a sub-exponential algorithm requiring at most moves and showed a matching lower bound of . For arbitrary labeled undirected graphs, the fastest exploration algorithm to date is the one given by Panaite and Pelc in [20], which allows an agent to traverse all edges using at most moves. Their algorithm thus entails at most a linear penalty in , which is significantly better than other classic strategies of exploration (for instance, the standard Depth-First Search algorithm, which takes moves, has a worst-case penalty that is quadratic in ). This upper bound of is asymptotically tight as the penalty can be in , even in some semi-Eulerian graphs (for which ). In particular, it is the case when an agent is required to explore a simple line made of an odd number of nodes, by starting from the median node: the penalty is then necessarily at least (this also holds even if the agent initially knows the graph and its position in it).
The papers [3, 4, 6, 15] are the closest to our work. As mentioned in Section 1.3, the problem of fuel-constrained exploration of a labeled graph was introduced by Betke et al. in [6]. In this paper, the authors gave fuel-constrained algorithms using moves but for some classes of graphs only. This line of study was then continued in [3] (resp. in [4]) in which is provided an algorithm (resp. an algorithm) working in arbitrary labeled graphs. Finally, Duncan et al. [15] obtained solutions requiring at most edge traversals for solving fuel-constrained and distance-constrained explorations. Precisely, the authors did not directly work on these two variants, but on a third one called rope-constrained exploration, in which the agent is tethered to its starting node by a rope of length that it unwinds by a length of with every forward edge traversal and rewinds by a length of with every backward edge traversal. Hence, they designed an algorithm for rope-constrained exploration which can be transformed into algorithms solving the two other constrained exploration problems with the same complexity. However, these algorithms all carry a worst-case penalty proportional to even when . As an open problem, Duncan et al. then asked whether we could obtain algorithms for solving constrained explorations with a worst-case penalty linear in , as shown in [20] when there is no constraint on the moves. Precisely, Duncan et al. explicitly raised the question for fuel-constrained and distance-constrained explorations and not for rope-constrained exploration. This is certainly due to the following straightforward observation: at any point of a rope-constrained exploration, the difference between the number of forward edge traversals and the number of backward edge traversals can never exceed . Thus, the penalty of any rope-constrained exploration algorithm executed in any graph is always at least -, which can be easily seen as not belonging to in general, since belongs to and thus to .
2 Preliminaries
In this section, we introduce some basic definitions, conventions, operations, and results that will be used throughout the rest of the paper.
We call consistently labeled graph a simple undirected labeled graph in which nodes have pairwise distinct identifiers and in which port numbers are fixed according to the rules given in Section 1.2. We will sometimes use simple undirected graphs with no identifiers and with no port numbers, especially when describing intermediate steps of constructions: these graphs will be called unlabeled graphs. However, when the context makes it clear or when the distinction between labeled and unlabeled graphs is insignificant, we will simply use the term graph.
A graph is said to be bipartite if its nodes can be partitioned into two sets and such that no two nodes within the same set are adjacent. If is also connected, such partition is unique and referred to as the bipartition of . A graph is said to be regular (resp. -regular) if each of its nodes has the same degree (resp. has degree ).
Below is a simple lemma about regular bipartite graphs. It follows from the fact that a -regular bipartite graph of order , with , can be constructed by taking two sets of nodes and and then by adding edges so that for every and , there is an edge between and iff for some .
Lemma 1.
For every positive integer , and for every integer , there exists a -regular bipartite graph whose bipartition satisfies .
The impossibility proof described in Section 3 closely relies on a family of graphs , where , and are integers. Precisely, is defined as the set of all consistently labeled graphs that can be constructed by successively applying the following five steps.
-
Step 1. Take a sequence of sets , each containing nodes. For every , assign pairwise distinct labels to nodes of ranging from to : these nodes will be called the nodes of level . Then, for every , add edges from nodes of to nodes of so that the subgraph induced by is a -regular bipartite graph denoted whose bipartition is (such a graph exists by Lemma 1).
-
Step 2. This step is made of phases, and, in each phase , we proceed as follows. Let (which corresponds to the number of edges of the subgraph induced by ). Take a sequence of new nodes (by “new nodes”, we precisely mean nodes that do not belong (yet) to the graph under construction). These nodes will be called gadgets. For each , assign label to gadget . Then, take a node of and a node of such that and are neighbors, remove the edge between and , and finally add an edge between and as well as and .
-
Step 3. Take a pair of new nodes . Assign label (resp. label ) to node (resp. node ). Then, add an edge between (resp. ) and each node of (resp. each gadget). Node will be called the critical node.
-
Step 4. Take a line made of new nodes. Add an edge between the critical node and one of the endpoints of . Then, for each node of , assign label where is the distance from node to . The nodes of will form what will be called the tail of the graph and the farthest endpoint of from will be called the tail tip.
-
Step 5. For every node belonging to the graph resulting from the successive application of steps 1 to 4, arbitrarily add pairwise distinct port numbers to each of its incident edges ranging from to .
Let us give some additional definitions. For every , the layer of a graph resulting from the above construction is the set made of the following edges: those connecting a node of level with a node of level , which will be called the green edges of , and those connecting a gadget of with a node of level or , which will be called the red edges of . When it is clear from the context, we will sometimes omit the reference to the underlying graph and use the notation instead of .
An example of a graph belonging to is depicted, with its key components, in Figure 1.
The next lemma is a direct consequence of our -step construction.
Lemma 2.
Let , and be integers. Let . For each graph of , we have the following properties:
-
1.
is consistently labeled. It contains layers and levels.
-
2.
The order of is and its number of gadgets is .
-
3.
For every , the number of red edges (resp. green edges) in is (resp. ).
-
4.
Two nodes that are incident to the same green edge in cannot be the neighbors of the same gadget.
The lemma below (its proof is in the full version of the paper [12]) addresses the eccentricity of the node labeled as well as the length of some paths originating from it in graphs of the family we have proposed. As mentioned in Section 1.2, a path is viewed as a sequence of edges (and not a sequence of nodes).
Lemma 3.
Let , and be integers. Let be a graph of . We have the following two properties:
-
1.
The eccentricity of the node of label in is and for every , each node of level in is at distance at most from a gadget.
-
2.
For every , the length of a path from the node of label to any node of level in is at least if this path does not pass through the critical node of .
In the impossibility proof of Section 3, we will need to perform three operations on graphs. Let be a graph of , with , and . The first operation is . If is a node of and and are distinct non-negative integers smaller than , this operation returns a graph corresponding to but with the following modification: the edge having port (resp. ) at in now has port (resp. ) at in . Otherwise, it simply returns without any modification.
The second operation is . Assume that for some , and are the ports of green edges of at nodes and respectively, and these two nodes belong to the same level in . Also assume that the node (resp. ) that is reached by taking port (resp. ) from (resp. ) is not a neighbor of (resp. ) and that and (resp. and ) are not the neighbors of the same gadget. In this case, this operation returns a graph corresponding to but with the following modifications: the edge (resp. ), originally attached to port (resp. ) at node (resp. ), is detached from this node and reattached to node (resp. ) with port (resp. ) assigned at its newly attached node. Otherwise, it simply returns without any modification. An illustration of is shown in Figure 2.a.
Notice that the requirements for modifying using are essential. Indeed, the assumption that (resp. ) is not a neighbor of (resp. ) guarantees that we do not add an already existing edge: consequently, the graph obtained after the modification is still simple with the same number of green edges and node’s degrees are left unchanged. Moreover, the assumption that and (resp. and ) are not the neighbors of the same gadget ensures that the fourth property of Lemma 2 remains true after the modification. Hence, if is a graph of , then the graph returned by still belongs to .
Finally, the third operation is . Assume that for some , is a green edge of and is a gadget incident to a red edge of . Let and be the two nodes connected to . Let (resp. ) be the neighbor of level (resp. ) of the gadget . In the following, we denote by the port number at node of the edge in before applying the operation. The operation then returns a graph obtained after applying on the following modifications in this order:
-
1.
Remove the edges , , and .
-
2.
Add the edge . Assign to this edge the port number (resp. ) at node (resp. ).
-
3.
Add the edge . Assign to this edge the port number (resp. ) at node (resp. ).
-
4.
Add the edge . Assign to this edge the port number (resp. ) at node (resp. ).
In other cases, the operation simply returns without any modification. An illustration of is shown in Figure 2.b. Broadly speaking, when causes a graph modification, a green edge is “split” into two red edges, while two red edges are “merged” into a single green edge.
() Operation
() Operation
In view of the construction of and of the definitions of the three above operations, we have the following lemma.
Lemma 4.
Let , and be integers. Let be a graph of and let be the graph returned after the application of , or . belongs to .
3 Impossibility Result for Distance-constrained Exploration
This section is dedicated to our proof showing the impossibility of solving distance-constrained exploration with a penalty that is always linear in the order of the graph. In what follows, we first give the intuitive ingredients that are behind our proof and then formalize the main construction allowing to obtain our lower bound.
3.1 Overview of the Proof
3.1.1 In a Nutshell
At a very high level, the proof can be viewed as composed of two main stages. The first stage consists in showing that for every positive real , every integer , and every algorithm solving distance-constrained exploration for all instances of , there exists at least one instance such that and for which algorithm incurs a penalty of at least (for some arbitrarily large ). This result is achieved through a constructive proof in which an adversary, whose goal is to maximize the penalty, constructs “on the fly” the instance based on the step-by-step choices of algorithm . If belonged to , our work would essentially be completed here, as it would mean that algorithm would sometimes incur a penalty of . Unfortunately, using Lemma 2, we can show that is in , which prevents us from concluding directly. This is where the second stage comes into the picture. By taking a closer look at our first stage, we will see that a penalty of at least is already incurred by algorithm with instance before the agent makes the th edge traversal that leads it to explore a red edge of for the first time. In particular, before this traversal, in each layer, only green edges have been explored and no gadget nodes has been visited. However, the number of nodes that are not gadgets in is in (cf. Lemma 2). Therefore, if we can transform instance into an instance of by “reducing” the number of gadget nodes from (cf. Lemma 2) to , while keeping the number of non-gadget nodes unchanged and ensuring that the execution of with instance is exactly the same as with (from the point of view of the agent’s memory) during the first edge traversals, we are done. Indeed, in this case, and we can prove that algorithm necessarily incurs at least a penalty of order with instance . Hence, it suffices to choose large enough so that is in , to conclude that algorithm cannot guarantee a linear penalty in the order of the graph. Actually, it is precisely this transformation that is conducted in the second stage. Notice that proceeding in two stages, instead of a single one (in which the adversary would construct instance directly), turns out to be more convenient because instance , despite having too many nodes regarding the incurred penalty, is easier (from a pedagogical point of view) to construct dynamically than the instance that has the appropriate number of nodes.
3.1.2 Under the Hood
Having described the general outline of our proof, let us now go deeper into the details of our two stages, by starting to give more intuitive explanations about the first one and, in particular, the behavior of the adversary. Here, the goal of the adversary is to construct an instance of that creates a bad scenario for the algorithm. What could be a bad scenario? It could be one in which the agent, starting from node in a graph of , frequently “goes down” until nodes at the penultimate level while (1) there are still unexplored edges incident to these nodes that lead to the last level and (2) no red edge has been explored yet. Indeed, what ensures that nodes at the last level are within distance from the source node are paths that pass exclusively through the critical node, which can only be accessed by traversing at least one red edge. Red edges and the critical node are essential components to make the eccentricity of the source node “small”. As long as no red edge is explored, the critical node remains unexplored, and thus the agent lacks information about the shortest paths within the underlying graph. In particular, under these circumstances, if it reached a node of the last level , the shortest path it would know to the source node would be of length at least (cf. Lemma 3), which would violate the distance constraint. Hence, in such a scenario, each time the agent reaches a node of the penultimate level with possible edges leading to nodes of the last level, the algorithm cannot risk instructing the agent to traverse an unexplored edge. Actually, it has no other choice but to ask the agent to go back to the previous level by traversing an already explored edge, thereby incrementing the incurred penalty. And if this occurs at least times, the adversary successfully completes the first stage.
Hence, the question that naturally comes to mind is how to construct a graph implying such a bad scenario. As briefly mentioned earlier, the adversary can achieve this by dynamically modifying the underlying graph according to the choices made by the algorithm. More precisely, the adversary initially takes any instance of such that . Then, it emulates algorithm with this instance, but by paying particular attention to what happens before each edge traversal and making some possible modifications before each of them, and only if coherent and appropriate. By “coherent”, we mean that a modification must not conflict with the prefix of the execution already made, and, in particular, with the agent’s memory. For example, the adversary must not remove an already explored edge or change the degree of an already visited node. And by “appropriate”, we mean that the modifications must be made only to enforce the bad scenario described above. Consequently, in the situation where the algorithm asks the agent to traverse an edge that has been explored before, the adversary does nothing, in order to preserve the coherence of the ongoing execution, while increasing the penalty. It also does nothing in the situation where the algorithm instructs the agent to take a port that makes it go from the source node (resp. a node of some level ) to a node of level (resp. ) that is incident to at least one unexplored green edge leading to a node of level (resp. if ), because this is essential for the bad scenario to unfold. In fact, if the adversary is lucky enough with its initial choice of to always get one of these situations (not necessarily the same) without intervening, during a sufficiently long prefix of the execution, we can inductively prove that the negative scenario occurs with . Unfortunately, the adversary may not be so lucky. However, it can circumvent this, and enforce the bad scenario, by bringing modifications to the underlying graph (formally described in Algorithm 2) using clever combinations of the three operations , , and defined in Section 2. Each of these operations has a very specific role. Precisely, whenever possible, the adversary uses to make the agent “go down”, to force the agent to traverse a green edge instead of a red one, and to ensure that a node reached by the agent still has unexplored edges leading downward (which is important to subsequently continue the descent process and eventually enforce the agent to traverse an already explored edge). These operations are performed carefully to always ensure the coherence of the execution, while ensuring that the underlying graph remains in (cf. Lemma 3.1 in the full version of the paper [12]). One of the main challenges of the first stage consists in showing that the adversary can indeed intervene, with these operations, for a sufficiently long time to ultimately guarantee the desired penalty of before the first visit of a red edge and thus of a gadget. In fact, the general idea of the proof revolves around the following three key points (demonstrated through Lemmas 3.2 and 3.3 in the full version of the paper [12]). First, the adversary can prevent the agent from visiting any red edge at least until half the green edges of some layer have been explored at some time . Second, as long as this event has not occurred, after each descending traversal of a green edge of (i.e., from level to level ), the agent will traverse an already explored edge before making another descending traversal of a green edge of . This will happen either by the “agent’s own choice” or because the adversary forces the agent to do so by bringing it to the penultimate level, as previously described. Hence, the incurred penalty is at least of the order of the number of descending traversals of green edges in made by time . Third and finally, as long as no red edge has been explored, the number of times the agent has made a descending traversal of a green edge in is always equal to the number of times the agent has made an ascending traversal of a green edge in (i.e., from level to level ), give or take one. From these three key points and the fact that there are green edges in (cf. Lemma 2), it follows that the number of times the agent makes a descending traversal of a green edge of this layer by time is in , and so is the penalty.
To finish, let us now complete the overview with some intuitive explanations about the second stage. As stated before, the goal of this stage is to transform the instance obtained in the first stage into an instance of with only gadgets instead of . This reduction on the number of gadgets is done with merge operations that consist in “merging” some gadgets of into one gadget in and setting the neighborhood of the new merged gadget as the union of the neighborhoods of the initial gadgets. An important property to check is that the source node of (i.e., the node with label ) must have eccentricity for to be a valid instance of . This is guaranteed by two facts. Firstly, merging nodes can only reduce distances between nodes and so the eccentricity of the source node in is at most the eccentricity in . Secondly, by the construction of (cf. Section 2), all gadgets of are at distance at least from node (which plays here the role of the source node) and at distance at least from the tail tip of . Since each path from to in contains a gadget, each path in from to contains a merged gadget that is at distance at least from and at least from . It follows that the eccentricity of the source node in is also at least .
Another important property to check, with merge operations, is that the new graph must “look” the same from the point of view of non-gadget nodes contained in the layers of , while being simple (i.e., without multiple edges). Indeed, this is also needed to ensure that is a valid instance of , while guaranteeing that the execution of is the same in and during the first edge traversals and thus the penalty up until the visit of the first gadget is the same in and . Hence, we cannot use trivial merge operations such as simply merging all gadgets of each layer into one gadget, or otherwise we immediately get a multigraph. We need something more subtle. Actually, we can show that the above property can be satisfied if the neighborhoods of the merged gadgets are disjoint, notably because this can avoid creating a multigraph, while keeping the same port numbers at non-gadget nodes for all edges connecting them to gadget nodes.
As a result, one of the key parts of the second stage is finding sets of gadgets that each have gadgets with disjoint neighborhoods. Intuitively, one can proceed in two steps. First, we consider each layer separately. Let us consider some layer of a graph . One associates each gadget in this layer to an edge connecting its two neighbors in the layer. Finding sets of gadgets with disjoint neighborhoods can thus be viewed as finding sets of non-adjacent edges in this new graph. Using the fact that the degree of nodes of level and in the graph induced by the edges of is in , one can find such sets using a well-known bound for edge-coloring of graphs of bounded degree (cf. König’s Theorem [18]). Hence, one can merge the gadgets in the layer into gadgets, each corresponding to a color in the edge-coloring. With this first step, the number of gadgets is down from to . The second step uses the fact that two gadgets in non-consecutive layers do not have common neighbors. Hence, one can partition the layers into odd and even layers such that gadgets in odd (resp. even) do not share neighbors. Then, one can take one merged gadget in each odd (resp. even) layer and merge all these gadgets into one. This permits to merge gadgets into one and by repeating this operation one can diminish the number of gadgets from to . This strategy, which is the crux of the second stage, is implemented in the proof of Theorem 5 and constitutes the finishing touch to show our impossibility result.
3.2 Formalization
In this subsection, we first give a formalization of the adversary’s behavior that forms the basis of the first stage outlined in Section 3.1, along with additional explanations. In the full version of the paper [12] this formalization is then followed by our complete impossibility proof. Due to space constraints, in this current short version, the formalization will be only followed by the main theorem of our impossibility proof and its corollary.
Before going any further, we need to introduce some extra notations. Let (resp. ) be any positive real (resp. any positive integer). Let be an algorithm solving distance-constrained exploration for all instances of and let be an instance of . We will denote by the number of edge traversals prescribed by with instance . Moreover, for every integer , we will denote by (resp. ) the memory of the agent (resp. the set of edges that have been traversed by the agent) after the first edge traversals prescribed by with instance . We will also denote by the set of edges of that are not in . Finally, for every integer , we will denote by (resp. ) the node of that is occupied after the th edge traversal (resp. the edge of that is explored during the th edge traversal) prescribed by with instance . By convention, the source node will be sometimes denoted by .
Algorithm 1 gives the pseudocode of function AdversaryBehavior. It corresponds to the formalization of the adversary’s behavior that underlies our first stage. It takes as input the parameters and of the distance-constrained exploration problem, an integer and an exploration algorithm solving the problem for all instances of . Under certain conditions (see Lemma 3.3 in the full version of the paper [12]), the function returns a graph with the following two properties. The first property is that is an instance of and . The second property is that the penalty incurred by on instance , by the time of the first visit of a gadget, is in (i.e., the target penalty of the first stage). To achieve this, function AdversaryBehavior relies on function GraphModification, whose pseudocode is provided in Algorithm 2.
Conceptually, AdversaryBehavior proceeds in steps etc. In step (cf. line 1 of Algorithm 1), we choose an arbitrary graph of . In step (cf. lines 3 to 7 of Algorithm 1), we begin with a graph of for which the first edge traversals prescribed by from the node labeled are “conformed” with the bad scenario of the first stage. The goal is to ensure that this conformity extends to the first edge traversals as well. This is accomplished by deriving a graph , which also belongs to , from graph . The derivation is handled by function GraphModification that uses as inputs the graph , the index , the algorithm and the parameter . If , then there exists a th edge traversal in the execution of from the node labeled in , and thus we can continue the process with step . Otherwise, the algorithm stops and returns graph .
When we mentioned above that in step , we aim at extending the bad scenario till the th edge traversal included, we mean that GraphModification() returns a graph such that (i.e., from the agent’s perspective, there is no difference between the first edge traversals in and those in ) and , if possible, the th edge traversal in brings the agent closer to the penultimate level (in order to eventually force incrementing the penalty). The first point is particularly important for at least preserving the penalty already incurred, while the second is important for increasing it. However, while the first point will always be guaranteed by GraphModification (cf. Lemma 3.1 in the full version of the paper [12]), the second is not always useful or even achievable. This may happen when the agent is at a node of the last level or has previously explored a red edge (in which cases the goal of the bad scenario should have been already met, as explained in Section 3.1) or when the agent is located at the source node (in which case the next move, if any, is in line with the bad scenario as it can only make the agent go down to a node of level ). This may also happen when the agent decides to recross an already explored edge as modifying the traversal would violate the agent’s memory (but, this is not an issue, as it increases the penalty as intended). In all these situations (cf. the test of line 4 of Algorithm 2), no modifications will be made and . (In the rest of the explanations, all line numbers concern Algorithm 2, which we will omit to mention for the sake of brevity).
Assume that the test at line 4 evaluates to true during the execution of GraphModification() and denote by the graph obtained right after the (possible) modifications made to by lines 5 to 10. When evaluating the test at line 4, the agent is thus located at some node of some level after the first edge traversals prescribed by in . At this point, we may face several possible situations, which will be all addressed in the formal proof. But here, one is perhaps more important to pinpoint than the others. It is when the following two predicates are satisfied right before the th edge traversal in . The first predicate, call it , is that node is incident to at least one unexplored edge of and the second predicate, call it , is that there is at least one unexplored green edge in . This situation is interesting because lines 5 to 10 guarantee that the th edge traversal in will correspond to a traversal of a green edge leading the agent from node (of level ) to a node of level , as intended in the bad scenario. Note that, if (i.e., the index of the last level in the graph) then algorithm violates the distance constraint (in view of the fact that no red edge has been yet visited), which is a contradiction. Hence, we have and, according to the bad scenario we aim at forcing the agent into, we want the th move from node (of level ) to lead the agent to level or to be a traversal of a previously explored edge. In the situation where and are also satisfied right before the th edge traversal in , the test at line 12 evaluates to false and . This is a good situation for the bad scenario. Indeed, if the th move in is not a traversal of a previously explored edge, then, in the next call to GraphModification, the test at line 4 evaluates to true and lines 5 to 10 will ensure that the th edge traversal in will correspond to a traversal of a green edge leading the agent to a node of level .
But what if we are not in such a good situation, where both and are satisfied right before the th edge traversal in ? In fact, if is not satisfied, then there is at least one layer for which at least half the green edges has been explored, which means that the target penalty has already been paid (as explained in Section 3.1 and shown in the proof of Lemma 3.3 in the full version of the paper [12]). Hence, the tricky case is when holds but does not, right before the th edge traversal in . This is exactly where lines 13 to 22 come into the picture (the test at line 12 then evaluates to true during the execution of GraphModification()). Using function switch-edges, these lines attempt to reroute the th edge traversal in towards a node , different from but also of level , such that holds right before the th traversal in . The feasibility of such rerouting will be guaranteed as long as some conditions are met, particularly that there is no layer for which at least half the green edges has been explored (cf. Lemma 3.2 in the full version of the paper [12]).
The switch performed at line 22 involves two green edges. One of these edges is naturally . The other is a green edge (from the same layer as ) resulting from the merge of two red edges achieved by move-gadget, which is performed, right before the switch, at line 17. Proceeding in this way, rather than simply selecting an existing green edge, turns out to be essential to maximize the number of possible reroutings ensuring predicate , and thus to get the desired penalty of before the first exploration of a red edge. Using Algorithms 1 and 2, we get the following theorem, whose proof and the intermediate lemmas on which it relies are available in the full version of the paper [12].
Theorem 5.
Let be any positive real and let be any integer. Let be an algorithm solving distance-constrained exploration for all instances of . For every integer , there exists an instance of such that and for which the penalty of is at least .
Note that in the statement of Theorem 5, the instance can always be chosen so that . Therefore, we have the following corollary.
Corollary 6.
Let be any positive real and let be any integer. There exists no algorithm solving distance-constrained exploration for all instances of with a linear penalty in .
4 Impossibility Result for Fuel-constrained Exploration
In this section, we observe that a linear penalty in cannot be obtained for the task of fuel-constrained exploration either. Actually, using much simpler arguments, we can quickly get a lower bound stronger than the one established for distance-constrained exploration in Theorem 5. As for the previous variant, the tuple can consistently define an instance of the fuel-constrained exploration problem. Hence, we can reuse it analogously, along with the set , in the statements of the next theorem and corollary dedicated to fuel-constrained exploration. The proof of this theorem is in the full version of the paper[12].
Theorem 7.
Let be any positive real and let be any integer such that . Let be an algorithm solving fuel-constrained exploration for all instances of . For every positive integer , there exists an instance of such that and for which the penalty of is at least .
From Theorem 7, we immediately get the following corollary.
Corollary 8.
Let be any positive real and let be any integer such that . There exists no algorithm solving fuel-constrained exploration for all instances of with a linear penalty in .
5 Conclusion
In this paper, we addressed open problems posed by Duncan et al. in [15], who asked whether distance-constrained or fuel-constrained exploration could always be achieved with a penalty of . For each of these two exploration variants, we completely solved the open problem by providing a strong negative answer, which in turn highlights a clear difference with the task of unconstrained exploration that can always be conducted with a penalty of (cf. [20]). It should be noted that we did not make any attempt at optimizing the lower bounds on the penalties: our only concern was to prove their nonlinearity with respect to . However, for the case of fuel-constrained exploration, there is not much room for improvement: we showed that a penalty of cannot be guaranteed, which is almost optimal as it is known that the problem can always be solved with a penalty of (cf. [15]).
In contrast, such an observation cannot be made for the case of distance-constrained exploration. Indeed, the best-known algorithm for solving distance-constrained exploration can sometimes entail a penalty of (cf. [15]), while we showed that the penalty for this variant can sometimes be of order . Hence, this leaves fully open the intriguing question of the optimal bound on the penalty for the task of distance-constrained exploration.
References
- [1] Susanne Albers and Monika Rauch Henzinger. Exploring unknown environments. SIAM J. Comput., 29(4):1164–1188, 2000. doi:10.1137/S009753979732428X.
- [2] Romas Aleliunas, Richard M. Karp, Richard J. Lipton, László Lovász, and Charles Rackoff. Random walks, universal traversal sequences, and the complexity of maze problems. In 20th Annual Symposium on Foundations of Computer Science, San Juan, Puerto Rico, 29-31 October 1979, pages 218–223. IEEE Computer Society, 1979. doi:10.1109/SFCS.1979.34.
- [3] Baruch Awerbuch, Margrit Betke, Ronald L. Rivest, and Mona Singh. Piecemeal graph exploration by a mobile robot. Inf. Comput., 152(2):155–172, 1999. doi:10.1006/inco.1999.2795.
- [4] Baruch Awerbuch and Stephen G. Kobourov. Polylogarithmic-overhead piecemeal graph exploration. In Peter L. Bartlett and Yishay Mansour, editors, Proceedings of the Eleventh Annual Conference on Computational Learning Theory, COLT 1998, Madison, Wisconsin, USA, July 24-26, 1998, pages 280–286. ACM, 1998. doi:10.1145/279943.279998.
- [5] Michael A. Bender, Antonio Fernández, Dana Ron, Amit Sahai, and Salil P. Vadhan. The power of a pebble: Exploring and mapping directed graphs. Inf. Comput., 176(1):1–21, 2002. doi:10.1006/INCO.2001.3081.
- [6] Margrit Betke, Ronald L. Rivest, and Mona Singh. Piecemeal learning of an unknown environment. Mach. Learn., 18(2-3):231–254, 1995. doi:10.1007/BF00993411.
- [7] Manuel Blum and Dexter Kozen. On the power of the compass (or, why mazes are easier to search than graphs). In 19th Annual Symposium on Foundations of Computer Science, Ann Arbor, Michigan, USA, 16-18 October 1978, pages 132–142. IEEE Computer Society, 1978. doi:10.1109/SFCS.1978.30.
- [8] Lothar Budach. On the solution of the labyrinth problem for finite automata. J. Inf. Process. Cybern., 11(10-12):661–672, 1975.
- [9] Jérémie Chalopin, Shantanu Das, and Adrian Kosowski. Constructing a map of an anonymous graph: Applications of universal sequences. In Chenyang Lu, Toshimitsu Masuzawa, and Mohamed Mosbah, editors, Principles of Distributed Systems - 14th International Conference, OPODIS 2010, Tozeur, Tunisia, December 14-17, 2010. Proceedings, volume 6490 of Lecture Notes in Computer Science, pages 119–134. Springer, 2010. doi:10.1007/978-3-642-17653-1_10.
- [10] Shantanu Das. Graph explorations with mobile agents. In Paola Flocchini, Giuseppe Prencipe, and Nicola Santoro, editors, Distributed Computing by Mobile Entities, Current Research in Moving and Computing, volume 11340 of Lecture Notes in Computer Science, pages 403–422. Springer, 2019. doi:10.1007/978-3-030-11072-7_16.
- [11] Xiaotie Deng and Christos H. Papadimitriou. Exploring an unknown graph. J. Graph Theory, 32(3):265–297, 1999. doi:10.1002/(SICI)1097-0118(199911)32:3<265::AID-JGT6>3.0.CO;2-8.
- [12] Stéphane Devismes, Yoann Dieudonné, and Arnaud Labourel. Graph exploration: The impact of a distance constraint. CoRR, abs/2410.13386, 2024. doi:10.48550/arXiv.2410.13386.
- [13] Yoann Dieudonné and Andrzej Pelc. Deterministic network exploration by a single agent with byzantine tokens. Inf. Process. Lett., 112(12):467–470, 2012. doi:10.1016/J.IPL.2012.03.017.
- [14] Gregory Dudek, Michael Jenkin, Evangelos E. Milios, and David Wilkes. Robotic exploration as graph construction. IEEE Trans. Robotics Autom., 7(6):859–865, 1991. doi:10.1109/70.105395.
- [15] Christian A. Duncan, Stephen G. Kobourov, and V. S. Anil Kumar. Optimal constrained graph exploration. ACM Trans. Algorithms, 2(3):380–402, 2006. doi:10.1145/1159892.1159897.
- [16] Pierre Fraigniaud, David Ilcinkas, Guy Peer, Andrzej Pelc, and David Peleg. Graph exploration by a finite automaton. Theor. Comput. Sci., 345(2-3):331–344, 2005. doi:10.1016/J.TCS.2005.07.014.
- [17] Frank Hoffmann. One pebble does not suffice to search plane labyrinths. In Ferenc Gécseg, editor, Fundamentals of Computation Theory, FCT’81, Proceedings of the 1981 International FCT-Conference, Szeged, Hungary, August 24-28, 1981, volume 117 of Lecture Notes in Computer Science, pages 433–444. Springer, 1981. doi:10.1007/3-540-10854-8_47.
- [18] Dénes König. Über graphen und ihre anwendung auf determinantentheorie und mengenlehre. Mathematische Annalen, 77(4):453–465, 1916.
- [19] Michal Koucký. Universal traversal sequences with backtracking. Journal of Computer and System Sciences, 65(4):717–726, 2002. Special Issue on Complexity 2001. doi:10.1016/S0022-0000(02)00023-5.
- [20] Petrisor Panaite and Andrzej Pelc. Exploring unknown undirected graphs. J. Algorithms, 33(2):281–295, 1999. doi:10.1006/JAGM.1999.1043.
- [21] Omer Reingold. Undirected connectivity in log-space. J. ACM, 55(4):17:1–17:24, 2008. doi:10.1145/1391289.1391291.
- [22] Claude E. Shannon. Presentation of a maze-solving machine. In 8th Conference of the Josiah Macy Jr. Found. (Cybernetics), pages 173–180, 1951.