Mobility Matters
Home›Mobile agents on graphs›Exploration›Graph exploration by a single agent

Graph exploration by a single agent

One agent starts at a node of an unknown anonymous graph and must visit every node; how much memory does it need, which pebbles or knowledge make it possible, and how fast can it be?

Problem statement and measuresexpand

A single deterministic agent is placed at a node \(s\) of a connected graph \(G\) with \(n\) nodes, \(m\) edges and maximum degree \(\Delta\). Nodes are anonymous (they carry no names the agent can read), and the edges at each node are numbered locally; these numbers are the node's ports. The agent sees the degree of its node and the port by which it entered. It must visit every node of \(G\). Three termination requirements are standard:

  • perpetual exploration: every node is eventually visited; the agent never has to stop;
  • exploration with stop: every node is visited and the agent then stops, anywhere;
  • exploration with return: every node is visited and the agent stops at \(s\).

Return implies stop, and stop implies perpetual exploration. Memory is the number of bits of the agent's state; when the agent carries pebbles (objects it can drop on a node and pick up again) their number is reported with the memory. Time is the number of moves (edge traversals) until exploration is complete; for periodic exploration it is the period. Unless a variant says otherwise the agent knows nothing about \(G\), not even \(n\).

Exploration is the oldest problem of the mobile-agent literature: it started as maze search by finite automata, and the question of how little memory suffices runs from Budach's impossibility (1978) to Reingold's log-space algorithm (2005). Several agents exploring together form the sibling problem, collaborative exploration.

Measures: Time, edge traversals until every node is visited (for periodic exploration: the period); Memory, bits of agent memory; pebbles, if any, are counted separately.

Temporal graphs, schedule known

verified
Time: tightMemory: unknown

If the whole schedule of an always-connected temporal graph is known, \(\Theta(n^2)\) steps are necessary and sufficient in the worst case.

Assumed (added on the last edge are outlined)

+Graph dynamicsdynamic graph, connected in every round (1-interval connected)+Edge directionundirected+Knowledgea complete map is known (for a dynamic graph: the whole schedule)+Termination requirementvisit every node; never required to stop (perpetual)

Not assumed

Node identifiersanonymous nodesRandomnessdeterministicMarkersno markersPreprocessingports and nodes as given by an adversaryTopologyarbitrary connected graph
Formal definitions of this setting
Graph dynamics: connected every round
\(\mathcal G=(G_t)_{t\ge0}\) is 1-interval connected if every snapshot \(G_t=(V,E_t)\) is connected. More generally it is \(T\)-interval connected if for every \(t\) the graph \(\bigl(V,\bigcap_{i=t}^{t+T-1}E_i\bigr)\) is connected.
Edge direction: undirected
\(G=(V,E)\) with \(E\subseteq\binom V2\); every edge can be traversed in both directions.
Node identifiers: anonymous nodes
Nodes have no identifiers; an agent at \(v\) sees only \(\deg(v)\) and the port numbers \(1,\dots,\deg(v)\), which are assigned locally and independently at each endpoint of an edge.
Knowledge: knows the map
The agent is given a graph isomorphic to \(G\), with port numbers, and (where stated) its own position on it; for a dynamic graph, the whole sequence \((G_t)\).
Randomness: deterministic
The next state and move of an agent are a function of its current state and what it observes.
Markers: no markers
The agent cannot mark nodes.
Preprocessing: adversarial ports
Port numbers (and any node labels) are chosen by an adversary.
Termination requirement: perpetual
Every node is visited at least once (and, for periodic exploration, infinitely often); the agent never needs to halt.
Topology: any topology
\(G\) is any connected graph in the class allowed by the other axes.

What is known

Time · edge traversals until every node is visited (for periodic exploration: the period)
tight
\(\Theta(n^2)\) in the worst case. When every snapshot has maximum degree at most \(\Delta\) the bounds are \(\Omega(\Delta n(1+\log(n/\Delta)))\) Carnevale 2026 and \(O(n^{3/2}\sqrt{\Delta\log n})\) Bastide et al. 2025, a polynomial gap (factor about \(\sqrt{n/\Delta}\)).
lower bounds
\(\Omega(n^2)\) Erlebach et al. 2021
bottleneckadversarial edge changes
holds when
  • an explicit family of always-connected temporal graphs
  • holds for centralised, offline exploration
\(\Omega(\Delta n(1+\log(n/\Delta)))\) Carnevale 2026 preprint
bottleneckadversarial edge changes
holds when
  • underlying graph (the union of all snapshots) of maximum degree at most \(\Delta\), for \(\Delta_0 \le \Delta \le n-1\) with an absolute constant \(\Delta_0\)
  • every snapshot is a spanning tree in which only one node has degree above three; deterministic construction, polynomial in \(n\)
  • holds from every start node; also a lower bound when only the degree of each snapshot is at most \(\Delta\)
Theorem 1.1 (arXiv v1). In each phase of \(\Theta(\Delta n)\) steps, a cycle whose missing edge advances by one position per step lets the agent enter fewer than half of \(\Theta(\Delta)\) branches; between phases the nodes not yet visited are reassigned among the branches along walks on an expander, which allows \(\Theta(1+\log(n/\Delta))\) phases. One construction thus combines the \(\Omega(\Delta n)\) of chained rotating stars Erlebach et al. 2021 and the \(\Omega(n\log n)\) known for planar underlying graphs of maximum degree 3 whose snapshots are paths (Adamson, Gusev, Malyshev and Zamaraev, strengthening degree 4 of Erlebach, Hoffmann and Kammer), both as reported by Carnevale 2026 and Bastide et al. 2025; for constant \(\Delta\) it adds nothing to \(\Omega(n\log n)\). It answers Problem 5.1 of Bastide et al. 2025, as they state. Preprint.
introductory—
current best
\(O(n^2)\)
Memory · bits of agent memory; pebbles, if any, are counted separately
unknown
Not a memory question.
lower boundnone known
introductory—
current best—

Results, in order of publication

Time \(O(n^2)\)

The \(n^2\) upper bound is attributed by the authors to Michail and Spirakis. They also give \(O(n^{1.5}\mathrm{tw}^{1.5}\log n)\) for treewidth \(\mathrm{tw}\), \(O(n^{1.8}\log n)\) for planar and \(2n-2\) for cycles, and show inapproximability within \(O(n^{1-\varepsilon})\).

Kammer et al. 2026 preprint also
Time \(O(\sigma n\log^3 n)\)

Parameterized by \(\sigma\), the number of classes of the 2-dimensional Weisfeiler–Leman colouring of the temporal graph (their \(q\)), \(1 \le \sigma \le n\); vertex-transitive and distance-regular underlying graphs have \(\sigma = 1\). The walk is computed deterministically in polynomial time, for a long enough lifetime (Theorem 1.1). Some instances need \(\Omega(n\log n)\) steps for constant \(\sigma\) and \(\Omega(\sigma n)\) for every \(\sigma\) (Theorem 1.3), so the bound is tight up to polylogarithmic factors. It improves an earlier bound in the number of automorphism orbits (at least \(\sigma\)), which needed superpolynomial computation, as reported by Kammer et al. 2026.

Time \(O(\mu n\log\mu)\)
at most \(\mu \ge 2\) edges of the underlying graph missing in each snapshot

Corollary 1.3 (arXiv v1; their \(k\) is \(\mu\) here), for always-connected temporal graphs with enough snapshots, from any start node. It suffices that at most \(\mu\) edges of one fixed spanning tree of the underlying graph are missing in each snapshot (Theorem 1.1). The schedule is computed by a Las Vegas algorithm in expected polynomial time, and deterministically in polynomial time when \(\mu\) is constant (Theorem 1.2). It improves the \(O(\mu n\log n)\) of Erlebach and Spooner and is within a factor \(\mu\) of their \(\Omega(n\log\mu)\) lower bound, both as reported by Lahtin & Zamaraev 2027; for constant \(\mu\) exploration takes \(\Theta(n)\) steps.

Time \(O(n^{4/3}\,\mathrm{tw}^{9/2}\log^{5/2} n)\)
underlying graph of treewidth \(\mathrm{tw}\)

Theorem 2 of the full version (arXiv v2). The underlying graph is divided into parts with few boundary nodes; each part is explored by a team of agents (Theorem 1, on always \(S\)-connected temporal graphs, in which every snapshot joins every node to some node of a fixed set \(S\)), and the team schedule is turned into one for a single agent. For small \(\mathrm{tw}\) it is below the \(O(n^{3/2}\sqrt{\mathrm{tw}\log n})\) of Bastide et al. 2025. Carnevale 2026 cites \(\mathrm{tw}^{11/2}\) for the brief announcement, which was not read.

Bastide et al. 2025 preprint also
Time \(O(n^{3/2}\sqrt{\overline{\Delta}\log n})\)

Theorem 1.3 (arXiv v2), from every start node, for every always-connected temporal graph with \(n^2\) snapshots, where \(\overline{\Delta}\) (their \(D\)) is the average temporal maximum degree: the average over the nodes \(v\) of the largest degree of \(v\) in any snapshot. If every snapshot has maximum degree at most \(\Delta\) then \(\overline{\Delta} \le \Delta\), which gives \(O(n^{3/2}\sqrt{\Delta\log n})\) (Corollary 1.4), and \(O(n^{3/2}\sqrt{\log n})\) for constant \(\Delta\) against the \(O(n^{7/4})\) of Erlebach, Kammer, Luo, Sajenko and Spooner. An underlying graph with \(m\) edges has \(\overline{\Delta} \le 2m/n\) (Corollary 1.5, stated for average degree), which gives \(O(n\sqrt{m\log n})\): \(O(n^{3/2}\sqrt{\log n})\) for planar underlying graphs and \(O(n^{3/2}\sqrt{\mathrm{tw}\log n})\) for treewidth \(\mathrm{tw}\), against \(O(n^{1.8}\log n)\) and \(O(n^{1.5}\mathrm{tw}^{1.5}\log n)\) Erlebach et al. 2021 and \(O(n^{7/4}\log n)\) and \(O(\mathrm{tw}\,n^{3/2}\log n)\) by Adamson, Gusev, Malyshev and Zamaraev, the last three as reported by Bastide et al. 2025. The bound is below \(n^2\) when \(\overline{\Delta} = o(n/\log n)\). The key lemma: any set \(X\) of nodes contains two nodes joined by a temporal walk within \(2\overline{\Delta}n/|X|+1\) steps (Lemma 1.8); in each block of \(n\) steps a walk then visits about \(\sqrt{|X|/(\overline{\Delta}\log|X|)}\) of the \(|X|\) nodes not yet visited (Lemma 3.2). The authors state, without a detailed proof, that the walk can be computed in polynomial time. Preprint.

Open questions

  1. Tight bounds when the underlying graph is a grid, has bounded degree or is planar Erlebach et al. 2021. For bounded degree and for planar underlying graphs the best bounds known are \(\Omega(n\log n)\) and \(O(n^{3/2}\sqrt{\log n})\) Bastide et al. 2025; the upper bound holds for grids too.

  2. For underlying maximum degree \(\Delta\), close the gap between \(\Omega(\Delta n(1+\log(n/\Delta)))\) Carnevale 2026 and \(O(\min\{n^2, n^{3/2}\sqrt{\Delta\log n}\})\) Bastide et al. 2025; for constant \(\Delta\) the bounds are \(\Omega(n\log n)\) and \(O(n^{3/2}\sqrt{\log n})\). The upper bound needs only that every snapshot has maximum degree at most \(\Delta\).

  3. When at most \(\mu\) edges are missing in each snapshot, remove the factor \(\mu\) between \(O(\mu n\log\mu)\) Lahtin & Zamaraev 2027 and \(\Omega(n\log\mu)\) (as reported by Lahtin & Zamaraev 2027).

Notes

This is a centralised planning problem rather than a distributed one, but it gives the baseline for what any agent could do in a temporal graph.

The worst case \(\Theta(n^2)\) needs nodes of degree \(\Omega(n)\) in the snapshots and a dense underlying graph. Bastide, Groenland, Michel, Rambaud and Smolarova Bastide et al. 2025 bound exploration by the average temporal maximum degree \(\overline{\Delta}\), which is at most the maximum degree of every snapshot and at most the average degree of the underlying graph, and so treat bounded snapshot degree, planar, bounded-treewidth and sparse underlying graphs with one argument. Allowed two moves per step (a model not catalogued here), the agent explores every always-connected temporal graph within \(O(n^{3/2}\sqrt{\log n})\) steps, as each snapshot squared has a spanning tree of maximum degree 3 Bastide et al. 2025. For snapshots drawn independently from a distribution over connected graphs, the same paper gives expected exploration time \(O(\overline{\Delta}n\log^3 n)\) (Theorem 1.6), with \(\overline{\Delta}\) taken over all graphs of positive probability; see Baguley et al. 2026 under further reading.

Know a better result for this setting, or found a mistake? Suggest a result · Report an error. Accepted contributions are acknowledged.