NC

Directed or Undirected Depth-first Search (DFS)

Category: Network Flows

Input

A graph $G = (V, E)$ and a vertex $s$.

Problem

Construct the depth-first search numbering of $G$ starting from vertex $s$.

Status

$\NC$ (Chatterjee, Ghosh, Gurjar, Raj, and Thierauf [1]).

Remarks

Both the undirected (Aggarwal and Anderson [2]) and directed (Aggarwal, Anderson, and Kao [3]) cases $\NC$-reduce to weighted bipartite matching with polynomially bounded weights, which previously placed DFS in $\mathsf{RNC}$ (subsuming earlier $\mathsf{RNC}$ results for planar graphs, Smith [4]). Combined with the $\NC$ algorithm for weighted bipartite matching [1], DFS is in $\NC$; see BM. For directed acyclic graphs, DFS was already known to be in $\NC$ (de la Torre and Kruskal [5][6], Greenlaw [7]).

References

  1. A. Chatterjee, S. Ghosh, R. Gurjar, R. Raj, and T. Thierauf (2026). Bipartite Matching is in NC.
  2. A. Aggarwal and R. J. Anderson (1988). A Random NC algorithm for depth first search.
  3. A. Aggarwal, R. J. Anderson, and M.-Y. Kao (1990). Parallel depth-first search in general directed graphs.
  4. J. R. Smith (1986). Parallel algorithms for depth first searches I: Planar graphs.
  5. P. de la Torre and C. P. Kruskal (1989). Fast parallel algorithms for all sources lexicographic search and path finding problems.
  6. P. de la Torre and C. P. Kruskal (1991). Fast and efficient parallel algorithms for single source lexicographic depth-first search, breadth-first search and topological-first search.
  7. R. Greenlaw (1992). A model classifying algorithms as inherently sequential with applications to graph searching.
  8. Greenlaw, R., Hoover, H. J., and Ruzzo, W. L. (1995). Limits to Parallel Computation: P-Completeness Theory. Oxford University Press. Problem B.9.2.