Strongly connected digraphs are NL-complete #
The strongly connected digraphs (Cslib.Complexity.StronglyConnected, encoded by their adjacency
matrices as Cslib.Complexity.encDigraph) are complete for nondeterministic logarithmic space
under logspace many-one reductions Arora and Barak, Exercise 4.4
(Cslib.Complexity.StronglyConnected.logSpaceComplete). The classes are the library's native
ones, as for directed connectivity (Cslib.Complexity.STCON.logSpaceComplete).
- Membership (
Cslib.Complexity.StronglyConnected.mem_NL): a nondeterministic counter program runs through all pairs of vertices and guesses a path for each (Cslib.Complexity.StronglyConnected.searchProgram). - Hardness (
Cslib.Complexity.StronglyConnected.logSpaceHard): directed connectivity reduces to strong connectivity by adding an arc from every vertex tosand fromtto every vertex (Cslib.Complexity.StronglyConnected.ofSTCON), and directed connectivity isNL-hard.
Main results #
Cslib.Complexity.StronglyConnected.mem_NL:StronglyConnected ∈ NL.Cslib.Complexity.StronglyConnected.logSpaceReducible_STCON: directed connectivity reduces to strong connectivity in logarithmic space.Cslib.Complexity.StronglyConnected.logSpaceHard: every problem inNLreduces to strong connectivity in logarithmic space.Cslib.Complexity.StronglyConnected.logSpaceComplete: strong connectivity isNL-complete.Cslib.Complexity.StronglyConnected.mem_L_iff_forall_NL_eq_L: strong connectivity is inLexactly whenNL = L.
References #
Strong connectivity is in NL.
Directed s–t connectivity reduces to strong connectivity in logarithmic space, by
adding an arc from every vertex to s and from t to every vertex.
Strong connectivity is NL-hard under logspace many-one reductions: every problem in NL
reduces to directed connectivity, which reduces to strong connectivity.
Strong connectivity is NL-complete under logspace many-one reductions
Arora and Barak, Exercise 4.4.
Strong connectivity is in L exactly when NL = L, for every encoding of instances.