Papers
Topics
Authors
Recent
Search
2000 character limit reached

Vertex Search Orders in Graph Algorithms

Updated 6 July 2026
  • 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 σ:{1,,V}V\sigma:\{1,\dots,|V|\}\to V, with uσvu \prec_\sigma v when σ1(u)<σ1(v)\sigma^{-1}(u)<\sigma^{-1}(v). In the generic-search formulation, an ordering σ=(v1,,vn)\sigma=(v_1,\dots,v_n) is a search ordering if every prefix G[{v1,,vk}]G[\{v_1,\dots,v_k\}] 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 label(v)N+\mathrm{label}(v)\subseteq\mathbb{N}^+, initially \emptyset. At step ii, the search selects an eligible unnumbered vertex whose label is maximal with respect to a search-specific strict partial order A\prec_{\mathcal A}, and then adds ii to the labels of its unvisited neighbors. In this framework, LBFS uses

uσvu \prec_\sigma v0

while MCS uses

uσvu \prec_\sigma v1

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 uσvu \prec_\sigma v2 is an LBFS ordering of uσvu \prec_\sigma v3 iff for all uσvu \prec_\sigma v4 with

uσvu \prec_\sigma v5

there exists uσvu \prec_\sigma v6 with

uσvu \prec_\sigma v7

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 uσvu \prec_\sigma v8, one may ask when uσvu \prec_\sigma v9 coincides with σ1(u)<σ1(v)\sigma^{-1}(u)<\sigma^{-1}(v)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(u)<σ1(v)\sigma^{-1}(u)<\sigma^{-1}(v)1 with σ1(u)<σ1(v)\sigma^{-1}(u)<\sigma^{-1}(v)2 and σ1(u)<σ1(v)\sigma^{-1}(u)<\sigma^{-1}(v)3 (Krnc et al., 2021).

The resulting equivalence classes are highly graph-class dependent. On connected σ1(u)<σ1(v)\sigma^{-1}(u)<\sigma^{-1}(v)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 σ1(u)<σ1(v)\sigma^{-1}(u)<\sigma^{-1}(v)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 σ1(u)<σ1(v)\sigma^{-1}(u)<\sigma^{-1}(v)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 σ1(u)<σ1(v)\sigma^{-1}(u)<\sigma^{-1}(v)7, a search σ1(u)<σ1(v)\sigma^{-1}(u)<\sigma^{-1}(v)8, and a partial order σ1(u)<σ1(v)\sigma^{-1}(u)<\sigma^{-1}(v)9 on σ=(v1,,vn)\sigma=(v_1,\dots,v_n)0, decide whether there exists an σ=(v1,,vn)\sigma=(v_1,\dots,v_n)1-ordering extending σ=(v1,,vn)\sigma=(v_1,\dots,v_n)2. This strictly generalizes the end-vertex problem and rooted search-tree recognition. Requiring a designated vertex σ=(v1,,vn)\sigma=(v_1,\dots,v_n)3 to be last is obtained by the partial order

σ=(v1,,vn)\sigma=(v_1,\dots,v_n)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

σ=(v1,,vn)\sigma=(v_1,\dots,v_n)5

This yields polynomial-time algorithms for the unrooted PSOP and for the LBFS end-vertex problem on chordal bipartite graphs, explicitly σ=(v1,,vn)\sigma=(v_1,\dots,v_n)6 for end vertices. The same reduction also gives rooted F-tree and rooted L-tree recognition for LBFS on chordal bipartite graphs in σ=(v1,,vn)\sigma=(v_1,\dots,v_n)7. On split graphs, PSOP for MCS is solvable in

σ=(v1,,vn)\sigma=(v_1,\dots,v_n)8

and PSOP for LBFS is solvable in

σ=(v1,,vn)\sigma=(v_1,\dots,v_n)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 G[{v1,,vk}]G[\{v_1,\dots,v_k\}]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 G[{v1,,vk}]G[\{v_1,\dots,v_k\}]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 G[{v1,,vk}]G[\{v_1,\dots,v_k\}]2 and a vertex ordering G[{v1,,vk}]G[\{v_1,\dots,v_k\}]3, each edge is directed from lower to higher index, producing an acyclic orientation G[{v1,,vk}]G[\{v_1,\dots,v_k\}]4. For each vertex G[{v1,,vk}]G[\{v_1,\dots,v_k\}]5, one obtains predecessor and successor sets

G[{v1,,vk}]G[\{v_1,\dots,v_k\}]6

with indegree G[{v1,,vk}]G[\{v_1,\dots,v_k\}]7 and outdegree G[{v1,,vk}]G[\{v_1,\dots,v_k\}]8. Two state-of-the-art neighborhood-intersection algorithms then have ordering-dependent costs

G[{v1,,vk}]G[\{v_1,\dots,v_k\}]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 label(v)N+\mathrm{label}(v)\subseteq\mathbb{N}^+0 when the ordering is already given as input, and by label(v)N+\mathrm{label}(v)\subseteq\mathbb{N}^+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

label(v)N+\mathrm{label}(v)\subseteq\mathbb{N}^+2

of vertices outside the current feedback vertex set, together with ranks label(v)N+\mathrm{label}(v)\subseteq\mathbb{N}^+3. The list is legal if every vertex label(v)N+\mathrm{label}(v)\subseteq\mathbb{N}^+4 satisfies

label(v)N+\mathrm{label}(v)\subseteq\mathbb{N}^+5

This local ranking condition states that each vertex in label(v)N+\mathrm{label}(v)\subseteq\mathbb{N}^+6 has at most one neighbor of lower rank. The two structural theorems in the paper show that if label(v)N+\mathrm{label}(v)\subseteq\mathbb{N}^+7 is legal, then the induced subgraph label(v)N+\mathrm{label}(v)\subseteq\mathbb{N}^+8 is cycle-free and label(v)N+\mathrm{label}(v)\subseteq\mathbb{N}^+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 \emptyset0 is a linear ordering \emptyset1 such that every vertex except the first has a neighbor appearing earlier: \emptyset2 Equivalently, for every \emptyset3, the induced subgraph on \emptyset4 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 \emptyset5, let \emptyset6 be the number of successive vertex orderings. The exact enumeration theorem expresses \emptyset7 by inclusion–exclusion over independent sets. For an independent set \emptyset8, define

\emptyset9

and define ii0 recursively by

ii1

Then

ii2

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

ii3

one has

ii4

If ii5, then the ii6-th derivative at ii7 satisfies

ii8

where ii9 is the number of linear orderings with exactly A\prec_{\mathcal A}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 A\prec_{\mathcal A}1, the back edges are

A\prec_{\mathcal A}2

An ordering is topological iff A\prec_{\mathcal A}3, and the minimum feedback arc set value is

A\prec_{\mathcal A}4

Streaming complexity results show that these order-based tasks are hard in general: solving TOPO-SORT in one pass requires A\prec_{\mathcal A}5 space, and solving ACYC also requires A\prec_{\mathcal A}6 space in one pass. In the random-order model, testing acyclicity in A\prec_{\mathcal A}7 passes still requires roughly A\prec_{\mathcal A}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 A\prec_{\mathcal A}9 space under random ordering, whereas under adversarial ordering roughly ii0 space is necessary and sufficient with ii1 passes (Chakrabarti et al., 2021).

Higher-dimensional analogues also exist. For simplicial complex reconstruction, a sweeping order of ii2 is a sequence

ii3

such that each ii4 is perpendicular to ii5, each ii6-simplex appears exactly once, and every ii7-cofacet of ii8 that lies in the halfspace below ii9 with respect to uσvu \prec_\sigma v00 is also a cofacet of some earlier uσvu \prec_\sigma v01. 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 uσvu \prec_\sigma v02 is optimized against

uσvu \prec_\sigma v03

and

uσvu \prec_\sigma v04

where uσvu \prec_\sigma v05 are the neighbors of uσvu \prec_\sigma v06 sorted by uσvu \prec_\sigma v07. The algebraic method uσvu \prec_\sigma v08 combines Fiedler cuts, Pareto splits, and AMD; its complexity is uσvu \prec_\sigma v09, 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 uσvu \prec_\sigma v10- and uσvu \prec_\sigma v11-orders, including st-numberings and Mondshein sequences, motivate edge-orders: uσvu \prec_\sigma v12-edge-orders of 2-edge-connected graphs and uσvu \prec_\sigma v13-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.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Vertex Search Orders.