Vertex Search Orders in Graph Algorithms
- Vertex search orders are specific vertex permutations formed by graph searches like BFS, DFS, LBFS, and MCS that transform global graph properties into local constraints.
- They facilitate efficient algorithm design by converting connectivity information into orderings that optimize tasks such as triangle listing, topological sorting, and feedback vertex set computations.
- The study encompasses both classical search strategies and algorithm-specific order designs, with applications ranging from network analysis to sparse graph compression and simplicial complex reconstruction.
Vertex search orders are vertex permutations generated by a graph search or imposed as admissible orderings by structural, combinatorial, or algorithmic constraints. In the narrow sense, they are the orderings produced by searches such as BFS, DFS, LBFS, LexDFS, MCS, and MNS; in a broader sense, they include orderings tailored to a fixed algorithmic objective, such as triangle listing, feedback vertex set optimization, topological sorting in directed streams, or geometric sweeping in simplicial-complex reconstruction (Scheffler, 2022, Krnc et al., 2021, Lécuyer et al., 2022, Cao et al., 2019, Ophelders et al., 3 Jan 2025). Across these settings, the common role of an order is to turn global structure into local constraints: connected prefixes, valid search trees, bounded forward neighborhoods, acyclic orientations, or already-known lower-dimensional cofaces.
1. Formal models and principal search families
A graph search order is commonly represented as a bijection , with when . In the generic-search formulation, an ordering is a search ordering if every prefix is connected. This connected-prefix view provides a unifying baseline for comparing classical searches and for relating them to broader connectivity-preserving orders (Krnc et al., 2021).
A more refined framework is the label-search formalism. Each vertex carries a label , initially . At step , the search selects an eligible unnumbered vertex whose label is maximal with respect to a search-specific strict partial order , and then adds to the labels of its unvisited neighbors. In this framework, LBFS uses
0
while MCS uses
1
Thus LBFS picks a lexicographically maximum label, whereas MCS picks a vertex with the largest number of already visited neighbors (Scheffler, 2022).
For LBFS, a central structural criterion is the 4-point condition: an ordering 2 is an LBFS ordering of 3 iff for all 4 with
5
there exists 6 with
7
This characterization is repeatedly used when constrained orders must be checked against the search rule rather than against a procedural implementation (Scheffler, 2022).
2. Order equivalence and graph classes
The study of vertex search orders often proceeds by comparing the sets of orderings produced by different searches. For a search method 8, one may ask when 9 coincides with 0. The five searches examined in this way are BFS, DFS, LexBFS, LexDFS, and MNS, each characterized by a three-point condition involving triples 1 with 2 and 3 (Krnc et al., 2021).
The resulting equivalence classes are highly graph-class dependent. On connected 4-free graphs, every graph search is a DFS ordering, every graph search is a BFS ordering, and every graph search is also a LexDFS and LexBFS ordering. On connected 5-free graphs, every BFS ordering is a LexBFS ordering, every DFS ordering is a LexDFS ordering, and every graph search is an MNS ordering. On connected 6-free graphs, every MNS ordering is a LexBFS ordering and a LexDFS ordering (Krnc et al., 2021).
These characterizations show that the usual refinement hierarchy among searches can collapse on restricted classes. A common misconception is that lexicographic or maximal-neighborhood variants always produce strictly smaller order sets than BFS or DFS. The cited results show that this is false on stars, cliques, trivially perfect graphs, and several other structured families, where the graph forbids precisely the induced subgraphs that witness a difference between the searches (Krnc et al., 2021).
3. Constrained orders, end vertices, and partial extensions
A major generalization of special-order questions is the Partial Search Order Problem (PSOP): given a graph 7, a search 8, and a partial order 9 on 0, decide whether there exists an 1-ordering extending 2. This strictly generalizes the end-vertex problem and rooted search-tree recognition. Requiring a designated vertex 3 to be last is obtained by the partial order
4
and rooted F-tree recognition reduces to PSOP by encoding parent-before-child and leftmost-neighbor constraints into a partial order whose linear extensions are exactly the search orders realizing the given tree (Scheffler, 2022).
For LBFS on connected chordal bipartite graphs, rooted PSOP is solvable in time
5
This yields polynomial-time algorithms for the unrooted PSOP and for the LBFS end-vertex problem on chordal bipartite graphs, explicitly 6 for end vertices. The same reduction also gives rooted F-tree and rooted L-tree recognition for LBFS on chordal bipartite graphs in 7. On split graphs, PSOP for MCS is solvable in
8
and PSOP for LBFS is solvable in
9
These algorithms rely on structural devices such as layered neighborhood comparability in chordal bipartite graphs, the nested property on split graphs, and the One-Before-All abstraction (Scheffler, 2022).
A complementary line of work isolates end vertices directly. For MCS on chordal graphs, the space of all MCS orders is described by Prim orderings of the weighted clique graph, yielding an 0-time algorithm for deciding whether a given vertex can be last in some MCS order. The same end-vertex problem is NP-complete on weakly chordal graphs. The cited results also include linear-time algorithms for deciding end vertices of BFS on interval graphs and end vertices of LexDFS on chordal graphs, as well as 1-time algorithms for deciding end vertices of BFS, DFS, MCS, and MNS on general graphs (Cao et al., 2019).
4. Algorithm-specific order design
In several settings, the order is not merely the output of a search but the main optimization variable. Triangle listing provides a particularly explicit example. Given a simple undirected graph 2 and a vertex ordering 3, each edge is directed from lower to higher index, producing an acyclic orientation 4. For each vertex 5, one obtains predecessor and successor sets
6
with indegree 7 and outdegree 8. Two state-of-the-art neighborhood-intersection algorithms then have ordering-dependent costs
9
Minimizing either cost is NP-hard. The paper therefore proposes heuristics—Neigh, Check, and Split—that trade off ordering quality against ordering time. On datasets with up to two billion edges, these heuristics accelerate triangle listing by an average of 0 when the ordering is already given as input, and by 1 when ordering time is included (Lécuyer et al., 2022).
The same pattern appears in the undirected feedback vertex set problem. There, a candidate solution is represented by an ordered list
2
of vertices outside the current feedback vertex set, together with ranks 3. The list is legal if every vertex 4 satisfies
5
This local ranking condition states that each vertex in 6 has at most one neighbor of lower rank. The two structural theorems in the paper show that if 7 is legal, then the induced subgraph 8 is cycle-free and 9 is a feedback vertex set; conversely, every feedback vertex set gives rise to at least one legal list on its complement. The simulated annealing local search therefore operates entirely on local order constraints instead of on global cycle constraints (Qin et al., 2014).
These examples indicate two distinct uses of vertex search orders. In one, the ordering is chosen to match a search rule; in the other, it is tailored to the exact cost model of a downstream algorithm. A plausible implication is that the boundary between “search order” and “algorithmic schedule” is narrower than standard terminology suggests.
5. Connectivity-preserving orders and exact enumeration
A successive vertex ordering of a finite connected graph 0 is a linear ordering 1 such that every vertex except the first has a neighbor appearing earlier: 2 Equivalently, for every 3, the induced subgraph on 4 is connected. Every BFS or DFS visitation order is successive, but many successive orders are not BFS or DFS orders, because successive orderings require only connectivity of prefixes and impose no queue, stack, or lexicographic discipline (Agrawal et al., 8 Apr 2026).
For a connected graph 5, let 6 be the number of successive vertex orderings. The exact enumeration theorem expresses 7 by inclusion–exclusion over independent sets. For an independent set 8, define
9
and define 0 recursively by
1
Then
2
This applies to all finite connected graphs, without regularity or symmetry assumptions (Agrawal et al., 8 Apr 2026).
The same work packages the enumeration into a weighted generating polynomial over independent sets. With
3
one has
4
If 5, then the 6-th derivative at 7 satisfies
8
where 9 is the number of linear orderings with exactly 0 bad vertices, meaning vertices that are not first and appear before all of their neighbors. Thus the successive-ordering polynomial encodes both the exact count of connectivity-preserving orders and the full distribution of violations of the successive condition (Agrawal et al., 8 Apr 2026).
6. Extensions, analogues, and broader algorithmic settings
In directed graphs, orderings become certificates of acyclicity. For an ordering 1, the back edges are
2
An ordering is topological iff 3, and the minimum feedback arc set value is
4
Streaming complexity results show that these order-based tasks are hard in general: solving TOPO-SORT in one pass requires 5 space, and solving ACYC also requires 6 space in one pass. In the random-order model, testing acyclicity in 7 passes still requires roughly 8-type space. By contrast, random ordering can dramatically help in restricted settings: for SINK-FIND-T in acyclic tournaments, there is a single-pass algorithm using 9 space under random ordering, whereas under adversarial ordering roughly 0 space is necessary and sufficient with 1 passes (Chakrabarti et al., 2021).
Higher-dimensional analogues also exist. For simplicial complex reconstruction, a sweeping order of 2 is a sequence
3
such that each 4 is perpendicular to 5, each 6-simplex appears exactly once, and every 7-cofacet of 8 that lies in the halfspace below 9 with respect to 00 is also a cofacet of some earlier 01. This generalizes the vertex sweep used for edge reconstruction and yields an algorithm that reconstructs arbitrary embedded simplicial complexes from indegree queries by processing simplices in a direction-aware search order (Ophelders et al., 3 Jan 2025).
Orderings need not be search outputs to be structurally meaningful. In sparse-graph compression and adjacency locality, a vertex indexing 02 is optimized against
03
and
04
where 05 are the neighbors of 06 sorted by 07. The algebraic method 08 combines Fiedler cuts, Pareto splits, and AMD; its complexity is 09, and it demonstrates superior and versatile performance in graph compression across diverse graph types while also improving matrix-vector multiplication efficiency for subspace iterations (Floros et al., 2024).
A related analogue replaces vertices by edges. Classical vertex 10- and 11-orders, including st-numberings and Mondshein sequences, motivate edge-orders: 12-edge-orders of 2-edge-connected graphs and 13-edge-orders of 3-edge-connected graphs can both be computed in linear time, and the latter yield linear-time algorithms for constructing three edge-independent spanning trees (Schlipf et al., 2016). This suggests that order-based decompositions are not confined to vertex connectivity or to literal graph searches, but belong to a wider decompositional language for connectivity, acyclicity, locality, and reconstruction.