Papers
Topics
Authors
Recent
Search
2000 character limit reached

BFS Link Iteration Rule Overview

Updated 12 July 2026
  • BFS link iteration rule is a traversal mechanism that defines how to expand the current frontier by scanning all outgoing edges while ensuring each vertex is discovered once.
  • It encompasses multiple forms such as level-synchronous updates, canonical parent selection for symmetry breaking, and temporal neighbor expansion in evolving graphs.
  • The rule underpins efficient graph search algorithms in sequential, parallel, and distributed environments, including matrix-driven and hybrid approaches.

Breadth-first search (BFS) link iteration rule denotes the operational condition that determines how a traversal expands a current frontier, scans adjacency links, and decides when a vertex is first reached and inserted into the next layer. Across the literature, the rule appears in several formally distinct forms: as a level-synchronous frontier recurrence in ordinary graph search, as a canonical parent-selection constraint in BFS-enumerated graphs, as temporal forward-neighbor expansion in evolving graphs, as a nonzero-state transition in matrix-driven traversals, and as an implementation rule governing gray-vertex, bitmap, queue, or distributed-frontier iteration (Wan et al., 17 Jul 2025, Moklev et al., 2018, Chen et al., 2016, Prolubnikov, 2024). For the FOON-specific paper "A comparative study of the performance of different search algorithms on FOON graphs" (Shashwat, 2022), no PDF or source is available in the supplied material, so no FOON-specific BFS procedure, link iteration rule, stopping condition, or comparative technical detail can be extracted faithfully.

1. Static frontier expansion

In the ordinary formulation restated in the semi-external BFS study, BFS starts from a source node ss, marks ss visited, and enqueues all out-neighbors N+(s,G)N^+(s,G). It then repeatedly dequeues the first node uu, and, if uu is unmarked, marks uu and enqueues all its out-neighbors. The underlying layer-expansion rule is written as

frontierℓ+1={ v∣∃u∈frontierℓ, (u,v)∈E, v∉visited },\text{frontier}_{\ell+1} = \{\, v \mid \exists u\in \text{frontier}_\ell,\ (u,v)\in E,\ v \notin \text{visited} \,\},

with

N+(u,G)={v∣(u,v)∈E(G)}.N^+(u,G)=\{v \mid (u,v)\in E(G)\}.

The same source states the standard running time as O(n+m)O(n+m), using a queue QQ of size ss0 (Wan et al., 17 Jul 2025).

The multicore study "Performance-Driven Optimization of Parallel Breadth-First Search" (Bhaskar et al., 1 Mar 2025) presents the same rule in CSR form. For each frontier vertex src, the traversal scans all adjacency entries in the range

ss1

and visits dst if it has not been reached with a shorter distance. The Xeon Phi top-down study gives the corresponding predecessor-form update: ss2 These formulations agree on the core link iteration rule: traverse all outgoing adjacency entries of the current frontier and admit a neighbor into the next frontier only if it is not already discovered (Paredes et al., 2016, Bhaskar et al., 1 Mar 2025).

2. Canonical parent selection and BFS-enumerated graphs

In symmetry breaking for SAT/CSP graph search, the BFS link iteration rule is not expressed as a queue operation but as a predicate on vertex numbering and parent assignment. A connected undirected graph ss3 is BFS-enumerated when there exists a BFS traversal such that, for all ss4 from ss5 to ss6, the ss7-th vertex in this traversal has label ss8. The encoding introduces parent variables ss9 for N+(s,G)N^+(s,G)0, where N+(s,G)N^+(s,G)1 denotes the label of the parent of node N+(s,G)N^+(s,G)2, and constrains them by

N+(s,G)N^+(s,G)3

together with the canonical parent rule

N+(s,G)N^+(s,G)4

This is the paper’s central BFS link iteration condition: vertex N+(s,G)N^+(s,G)5 links to the smallest-numbered earlier vertex adjacent to it (Moklev et al., 2018).

The same study emphasizes that BFS traversal induces layers but does not constrain the order of vertices within a layer. That observation motivates the strengthened predicates N+(s,G)N^+(s,G)6 and N+(s,G)N^+(s,G)7. The former fixes the start vertex by requiring

N+(s,G)N^+(s,G)8

while the latter orders siblings by subtree weight: N+(s,G)N^+(s,G)9 The paper proves that uu0, uu1, and uu2 are all symmetry-breaking predicates among connected graphs. A common misconception is therefore that a BFS order is intrinsically unique; the paper shows that plain BFS enumeration still leaves symmetries, and that additional root-selection and subtree-ordering constraints are needed to obtain a more canonical numbering (Moklev et al., 2018).

For evolving graphs, the BFS link iteration rule is generalized from spatial adjacency to adjacency in space and time. An evolving graph is a time-ordered sequence

uu3

and a temporal node is a pair

uu4

The paper allows causal edges

uu5

which represent waiting or propagation of identity through time. The BFS update is therefore not restricted to same-time neighbors: when a frontier node uu6 is expanded, the algorithm must follow both spatial links at time uu7 and causal links to the same node at later active times. The recurrence is given as

uu8

with already-reached temporal nodes removed (Chen et al., 2016).

The same paper shows that naive unfolding of adjacency matrices miscounts temporal paths. In its example, the naive product yields

uu9

even though there are actually two valid temporal paths from uu0 to uu1. The discrepancy is caused by ignoring causal edges. Adding ones on the diagonal does not repair the issue, because it introduces illegal paths that stay on inactive nodes. The paper resolves this by mapping the evolving graph to an equivalent static directed graph whose vertices are the active temporal nodes and whose edges include both within-time edges and causal edges uu2. Under that mapping, BFS on the evolving graph is equivalent to ordinary BFS on the corresponding static graph (Chen et al., 2016).

4. Algebraic iteration rules and matrix-driven traversals

A different line of work derives BFS-like traversal rules from iterative methods for solving a linear system built from a graph’s adjacency matrix. In that framework, the graph matrix is modified by replacing zero diagonal entries with a positive value uu3, the right-hand side is chosen as uu4, and the initial state is uu5. A vertex enters the frontier when its state-vector component changes from zero to nonzero: uu6 This transition rule defines the frontier uu7. The paper also states the basic BFS-algebraic recurrence

uu8

and interprets the nonzero components of uu9 as the vertices reached after iteration uu0 (Prolubnikov, 2024).

Within this framework, the Jacobi-based traversal rule is

uu1

and Theorem 1 states that, with uu2 and uu3, Jacobi iterations produce the same traversal as combinatorial BFS. By contrast, the Gauss-Seidel rule

uu4

produces Correct Chain Search (CCS), which is generally neither BFS nor DFS. The paper defines a correct chain as

uu5

Because values computed earlier in the same sweep can influence later components immediately, CCS may continue along correct chains in a single iteration. The paper formalizes that, for the same starting vertex on a connected graph, CCS completes its work in a number of iterations equal to or less than required for BFS, and for many instances fewer iterations are required. A plausible implication is that the BFS link iteration rule can be viewed not only as a combinatorial queue discipline but also as a particular numerical update policy, with Gauss-Seidel exposing the effect of vertex numbering on propagation (Prolubnikov, 2024).

5. Frontier representations, coloring schemes, and dominance pruning

Several studies preserve BFS layer semantics while replacing the conventional queue by a specialized frontier representation. In the space-efficient 3-color BFS, vertices are colored white, gray, or black. The abstract algorithm performs an exploration round over all gray vertices and colors gray all white neighbors of an eligible vertex uu6, where, in undirected graphs, eligibility means uu7 or uu8 has a black neighbor. A consolidation round then colors uu9 black if it has no white neighbor. The technical novelty is dynamic iteration over the changing set of gray vertices, not a new graph-theoretic visitation order. The paper proves that BFS can be carried out in frontierℓ+1={ v∣∃u∈frontierℓ, (u,v)∈E, v∉visited },\text{frontier}_{\ell+1} = \{\, v \mid \exists u\in \text{frontier}_\ell,\ (u,v)\in E,\ v \notin \text{visited} \,\},0 time with

frontierℓ+1={ v∣∃u∈frontierℓ, (u,v)∈E, v∉visited },\text{frontier}_{\ell+1} = \{\, v \mid \exists u\in \text{frontier}_\ell,\ (u,v)\in E,\ v \notin \text{visited} \,\},1

bits of working memory (Hagerup, 2018).

The in-place BFS on the word RAM replaces the queue by a 4-color choice dictionary with colors white, light-gray, dark-gray, and black. Light-gray vertices form the current frontier, dark-gray vertices are the next frontier, and after processing a vertex it becomes black. For a frontier vertex frontierℓ+1={ v∣∃u∈frontierℓ, (u,v)∈E, v∉visited },\text{frontier}_{\ell+1} = \{\, v \mid \exists u\in \text{frontier}_\ell,\ (u,v)\in E,\ v \notin \text{visited} \,\},2, the adjacency scan is specified by

frontierℓ+1={ v∣∃u∈frontierℓ, (u,v)∈E, v∉visited },\text{frontier}_{\ell+1} = \{\, v \mid \exists u\in \text{frontier}_\ell,\ (u,v)\in E,\ v \notin \text{visited} \,\},3

and for each

frontierℓ+1={ v∣∃u∈frontierℓ, (u,v)∈E, v∉visited },\text{frontier}_{\ell+1} = \{\, v \mid \exists u\in \text{frontier}_\ell,\ (u,v)\in E,\ v \notin \text{visited} \,\},4

the algorithm checks whether frontierℓ+1={ v∣∃u∈frontierℓ, (u,v)∈E, v∉visited },\text{frontier}_{\ell+1} = \{\, v \mid \exists u\in \text{frontier}_\ell,\ (u,v)\in E,\ v \notin \text{visited} \,\},5; if so, it colors frontierℓ+1={ v∣∃u∈frontierℓ, (u,v)∈E, v∉visited },\text{frontier}_{\ell+1} = \{\, v \mid \exists u\in \text{frontier}_\ell,\ (u,v)\in E,\ v \notin \text{visited} \,\},6 with the next frontier color. The frontier colors alternate by round parity, so if frontierℓ+1={ v∣∃u∈frontierℓ, (u,v)∈E, v∉visited },\text{frontier}_{\ell+1} = \{\, v \mid \exists u\in \text{frontier}_\ell,\ (u,v)\in E,\ v \notin \text{visited} \,\},7 is even the algorithm processes light-gray and colors newly found vertices dark-gray, and if frontierℓ+1={ v∣∃u∈frontierℓ, (u,v)∈E, v∉visited },\text{frontier}_{\ell+1} = \{\, v \mid \exists u\in \text{frontier}_\ell,\ (u,v)\in E,\ v \notin \text{visited} \,\},8 is odd the roles reverse (Kammer et al., 2018).

A more abstract reformulation appears in Efficient Breadth-First Search (EBFS). There the frontier is not a set of vertices but a set of subspaces, and link iteration is embedded in a recursive rule that expands all subspaces of the current frontier and keeps only the undominated ones: frontierℓ+1={ v∣∃u∈frontierℓ, (u,v)∈E, v∉visited },\text{frontier}_{\ell+1} = \{\, v \mid \exists u\in \text{frontier}_\ell,\ (u,v)\in E,\ v \notin \text{visited} \,\},9 The pseudo-Haskell schema ss18 shows that breadth-wise expansion can be preserved while pruning dominated children before recursion. This suggests that the essential content of a BFS link iteration rule is layerwise expansion plus an admissibility condition; the concrete frontier representation may vary substantially (Nedunuri et al., 2012).

6. Parallel, hybrid, and distributed edge iteration

In ordered parallel BFS by arc elimination, the current frontier is an explicit queue N+(u,G)={v∣(u,v)∈E(G)}.N^+(u,G)=\{v \mid (u,v)\in E(G)\}.0, and the next frontier is N+(u,G)={v∣(u,v)∈E(G)}.N^+(u,G)=\{v \mid (u,v)\in E(G)\}.1. For each dequeued vertex N+(u,G)={v∣(u,v)∈E(G)}.N^+(u,G)=\{v \mid (u,v)\in E(G)\}.2, the algorithm scans still-uneliminated outgoing arcs in fixed adjacency order, using the condition

N+(u,G)={v∣(u,v)∈E(G)}.N^+(u,G)=\{v \mid (u,v)\in E(G)\}.3

to test whether a non-eliminated outgoing arc remains. When a new target N+(u,G)={v∣(u,v)∈E(G)}.N^+(u,G)=\{v \mid (u,v)\in E(G)\}.4 is discovered, all incoming arcs of N+(u,G)={v∣(u,v)∈E(G)}.N^+(u,G)=\{v \mid (u,v)\in E(G)\}.5 are eliminated in parallel, and the algorithm updates

N+(u,G)={v∣(u,v)∈E(G)}.N^+(u,G)=\{v \mid (u,v)\in E(G)\}.6

before enqueuing N+(u,G)={v∣(u,v)∈E(G)}.N^+(u,G)=\{v \mid (u,v)\in E(G)\}.7 into N+(u,G)={v∣(u,v)∈E(G)}.N^+(u,G)=\{v \mid (u,v)\in E(G)\}.8. The elimination invariant ensures that once a vertex is visited it cannot be rediscovered (Träff, 2013).

Hybrid BFS modifies the link iteration domain rather than the basic distance-layer semantics. In top-down mode, the current frontier is expanded by scanning all outgoing neighbors of each frontier vertex. In bottom-up mode, the algorithm iterates over all unvisited vertices, scans each adjacency list, and stops at the first neighbor found in the current frontier: ss19 One paper uses the simplified switching rule

N+(u,G)={v∣(u,v)∈E(G)}.N^+(u,G)=\{v \mid (u,v)\in E(G)\}.9

while another presents architecture-specific threshold functions O(n+m)O(n+m)0 and O(n+m)O(n+m)1. The same 2025 study also introduces a non-atomic distance update mechanism in which multiple threads may write the same level value concurrently; it explicitly notes that this is technically a C++ data race / undefined behavior, although the concurrent writes are intended to be value-consistent in the level-synchronous setting (Bhaskar et al., 1 Mar 2025, Paredes et al., 2017).

Vectorized implementations retain the same acceptance rule but batch adjacency tests. In top-down Xeon Phi BFS, the bitmap-based discovery condition is

O(n+m)O(n+m)2

implemented with gather and scatter over 16 lanes. In vectorized bottom-up BFS, the algorithm loads 16 consecutive vertices, filters visited vertices with a bitmap mask, iterates over adjacency positions in lockstep up to MAX_POS, and falls back to scalar bottom-up processing when necessary. At the distributed scale, ButterFly BFS keeps two queues per compute-node, Q_global[g] and Q_local[g], and applies a level-synchronous traversal rule: ss20 followed by butterfly synchronization over rounds determined by ButterflyDirection(g,i). The paper characterizes the communication depth as

O(n+m)O(n+m)3

with O(n+m)O(n+m)4 messages per compute-node and buffer requirement O(n+m)O(n+m)5 (Paredes et al., 2016, Paredes et al., 2017, Green, 2021).

7. External, semi-external, and unavailable FOON-specific formulations

External-memory and semi-external studies shift the emphasis from per-edge acceptance to staged maintenance of BFS layers. In dynamic external-memory BFS under monotone updates, the central rule is that the adjacency list for a vertex O(n+m)O(n+m)6 is added to the sorted pool O(n+m)O(n+m)7 when creating BFS level

O(n+m)O(n+m)8

of the updated graph. Each new BFS level of O(n+m)O(n+m)9 is then constructed by merging a subsequence of QQ0, accounting for one BFS level in QQ1, with QQ2 using simple scanning. For decremental updates, the paper states the symmetric rule of applying a lag of QQ3 levels instead of an advance. Its main theorem gives amortized

QQ4

I/Os per update with high probability for sparse undirected graphs under monotone update sequences (0802.2847).

Semi-external BFS rephrases link iteration as repeated restructuring of a spanning tree. In EE-BFS, the algorithm scans every edge QQ5 and, if QQ6 is a V-BFS edge, makes QQ7 the rightmost child of QQ8. EB-BFS introduces a stipulation that, after traversing QQ9, BFS first adds the nodes in ss00 to its queue from the leftmost child of ss01 on ss02 to the rightmost child, and then adds ss03 into ss04 if ss05, from front to back. EP-BFS retains only two attributes per node, ss06 and ss07, keeps an in-memory tree fragment ss08, and filters edges using a threshold ss09: an edge ss10 is added to the in-memory edge set ss11 if both endpoints satisfy ss12 and ss13, or if ss14 is a V-BFS edge under the current tree. During EP-Reduce, the queue is simulated by indices

ss15

and the algorithm pops ss16, sets ss17, and enqueues each unmarked out-neighbor while setting its parent (Wan et al., 17 Jul 2025).

The FOON-oriented paper (Shashwat, 2022) cannot presently support any technical encyclopedia treatment of a FOON-specific BFS link iteration rule. The supplied material states only that there is no PDF and no source to generate one, and explicitly provides no FOON graph traversal discussion, no BFS/GBFS/IDFS description, no stopping conditions, no pseudocode, and no experimental results. The only defensible conclusion is that any FOON-specific BFS link iteration rule attributed to that paper would be unsupported by the available text (Shashwat, 2022).

Topic to Video (Beta)

Whiteboard

Follow Topic

Get notified by email when new papers are published related to Breadth-First Search (BFS) Link Iteration Rule.