BFS tree by agents
\(n\) agents in an anonymous graph must build a breadth-first spanning tree, without being told the root.
Problem statement and measurescollapse
\(n\) agents with distinct identifiers (IDs) are placed on the nodes of an anonymous port-labelled graph with \(n\) nodes, \(m\) edges and maximum degree \(\Delta\). The start is rooted (all agents on one node), dispersed (one agent on each node) or arbitrary. Agents compute only by moving and by talking with agents on the same node. The agents must build a BFS tree from a root they choose, each agent knowing its parent and children: every agent (or node) learns its part of the output. Time is in synchronous rounds; memory in bits per agent.
Measures: Time, rounds; Memory, bits per agent.
A first look
the basic problem, a simple algorithm and why some things cannot be done, for a newcomer
Imagine \(n\) agents (small mobile computers), one in each room of a building, who want a plan for emergencies: one room is the exit, and every other agent should know which room next to its own is one step closer to the exit along a shortest route. The building is a graph: rooms are its nodes and corridors are its edges; there are \(n\) nodes and \(m\) edges, and from here on we say only node and edge. Two nodes joined by an edge are neighbours. The degree of a node is the number of edges at it, \(\Delta\) is the maximum degree, and the diameter \(D\) is the largest distance between two nodes. Nodes have no names, but the edges at a node are numbered \(1, 2, \dots\); these numbers are ports. A BFS tree (breadth-first search tree) with root \(s\) (the exit of the picture) gives every other node \(v\) a parent: a neighbour of \(v\) that is one step closer to \(s\), so following parents gives a shortest path to \(s\). In the basic version the agents start one per node (a dispersed start; an agent's starting node is its home), have distinct identifiers (IDs), know nothing about the graph, and must choose the root themselves; they move in synchronous rounds (talk to the agents on the same node, then move along at most one edge), and at the end every agent knows its parent and its children. We count rounds and bits of memory per agent. As for all problems in this family, agents can imitate message-passing algorithms by visiting neighbours, the method explained under leader election by agents.
Suppose the agent on the root \(s\) is already known and the agents know \(\Delta\). Time is cut into phases of \(2\Delta\) rounds. Each agent will record a depth, a number that is unknown at the start.
- In phase 0 the root agent takes depth 0.
- In phase \(d\), every agent of depth \(d\) visits its neighbours one by one (out along one edge, back along it); all other agents stay at home.
- An agent that has no depth yet and receives such a visit takes depth \(d+1\) and records the visitor's home as its parent (if several visitors arrive, it picks the smallest ID). The visitor records its new child.
- Repeat with phase \(d+1\) until no agent gets a new depth.
Why it matters. It is the agent version of the textbook BFS, and it shows why knowing \(\Delta\) matters: it fixes how long a phase must last.
When a BFS tree has been built, the agent on the root knows it has no parent, and every other agent knows it has one. So "I am the root" is exactly a leader election: one agent knows it is the leader and all others know they are not.
Why it matters. It explains why leader election is the first building block in this family: trees, MIS and counting all need an agent that starts things off.
What is known
The best upper bound against the best lower bound in each catalogued setting. Open a setting for its results, proofs and notes, or see the progress map with the branch points.
What the community started looking at
BFS trees are the next building block after leader election; the question is rounds then memory without knowledge of the root or of graph parameters Chand et al. 2025.
Perspectives
- From exploration to dispersion, and beyond How collaborative exploration asks how much a team speeds up a search, how dispersion arose as the case k = n under weaker assumptions, what dispersion gives back to exploration, and why dispersing first has become the standard opening move for computing graph structures with agents.
All settings
The assumption tree (1 settings, 1 branch points)
The root assumes nothing. Going down, each edge adds the assumptions on its chips (+blue); a grey chip names the branch that leaves that axis unassumed while a sibling assumes something. Solid nodes are catalogued variants with their status per measure (Time, Memory); dashed nodes are branch points with no catalogued variant, named after the axis on which their branches differ. Axis order: Graph dynamics › Edge direction › Identifiers › Communication › Timing › Knowledge › Initial configuration › Topology.
-
No assumptions · 1 branches by graph dynamics
Nothing is assumed on any axis.
-
+static graph+undirected+distinct IDs (eponymous)+local communication+synchronous+dispersed startDispersed start, root unknown standard setting A BFS tree in \(O(\min(D\Delta, m\log n)+n\log n+\Delta\log^2 n)\) rounds with \(O(\log n)\) bits.
-
Assumptions specific to this problem
Knowledge
Whether agents know global parameters is inherited from message passing, where nodes typically know \(n\) or an upper bound on it, and possibly \(\Delta\) and \(D\); Kshemkalyani, Kumar, Molla and Sharma set the agent-based model against this and asked for algorithms that rely on no such knowledge, "neither exact nor an upper bound" Kshemkalyani et al. 2024. Knowing \(n\) and \(\Delta\) tells an agent how long to wait: in the arbitrary-start minimal dominating set algorithm of Chand, Molla and Sivasubramaniam every robot waits \(\kappa n\Delta\) rounds before leader election begins Chand et al. 2023, and the introductory maximal independent set algorithm assumes both \(n\) and \(\Delta\) Pattanayak et al. 2024 (as reported by Kaur et al. 2026 and Kshemkalyani et al. 2024). Kshemkalyani et al. state the trade-off: solutions without knowledge "are more resilient to network changes and device faults", but "algorithm design becomes challenging since devices may not know how long to run a procedure to guarantee a solution" Kshemkalyani et al. 2024. Later papers remove the assumption by first dispersing with termination detection and electing a leader, after which a spanning tree lets the agents compute \(\Delta\) and the largest identifier themselves Chand et al. 2026; knowing only that largest identifier \(L\) is a weaker assumption, recorded on results rather than as a level of this axis Chand et al. 2025. For BFS trees the catalogued algorithm uses no graph parameter, only \(L\) Chand et al. 2025.
Formal definitions
- 0no knowledge
- Agents know no graph parameter (\(n\), \(m\), \(\Delta\), \(D\)).
- 1knows \(n\), \(\Delta\)
- Every agent knows \(n\) and \(\Delta\) (upper bounds suffice where stated).
Know a better result, or found a mistake? Suggest a result · Report an error. Accepted contributions are acknowledged.