P-complete

Alternating Breadth-first Search (ABFS)

Input

An undirected graph $G = (V, E)$ with $E$ partitioned into two sets $M$ and $U$, a designated vertex $v$, and a designated start vertex $s$.

Problem

Does vertex $v$ get visited along an edge from the set $M$ during an alternating breadth-first search of $G$?

Definitions

An alternating breadth-first search, which has applications in some matching algorithms, is a breadth-first search in which only edges in the set $U$ ($M$) can be followed in going from even (respectively, odd) to odd (respectively, even) levels.

Status

$\P$-complete (Anderson [1], Greenlaw, Hoover and Ruzzo [5]).

Remarks

The reduction to show hardness is from a variant of CVP with OR and NOT gates, or from NANDCVP. The matching constructed by the search is not necessarily maximal. For general graphs, the problems of finding a maximum matching or a perfect matching are in $\mathsf{RNC}$ (Mulmuley, Vazirani, and Vazirani [2], Karp, Upfal, and Wigderson [3]); for bipartite graphs, they are in $\NC$ (Chatterjee, Ghosh, Gurjar, Raj, and Thierauf [4]). See MM, PME, and BM.

References

  1. R. J. Anderson (1985). The Complexity of Parallel Algorithms.
  2. K. Mulmuley, U. V. Vazirani, and V. V. Vazirani (1987). Matching is as easy as matrix inversion.
  3. R. M. Karp, E. Upfal, and A. Wigderson (1986). Constructing a perfect matching is in Random NC.
  4. A. Chatterjee, S. Ghosh, R. Gurjar, R. Raj, and T. Thierauf (2026). Bipartite Matching is in NC.
  5. Greenlaw, R., Hoover, H. J., and Ruzzo, W. L. (1995). Limits to Parallel Computation: P-Completeness Theory. Oxford University Press. Problem A.3.6.