Documentation

CslibFrontier.Computability.Complexity.Problems.STCON.Completeness

Directed s–t connectivity is NL-complete #

Directed s–t connectivity on adjacency matrices (Cslib.Complexity.STCON, encoded by Cslib.Complexity.encSTCON) is complete for nondeterministic logarithmic space under logspace many-one reductions Sipser, Theorem 8.25 (Cslib.Complexity.STCON.logSpaceComplete). The classes are the library's native ones: NL is decided by one finite-state nondeterministic machine within work space c * (Nat.log2 n + 1), every branch halting, and the reductions are computed by deterministic machines within such space (Cslib.Complexity.LogSpaceReducible).

The complement of STCON is in NL too (Cslib.Complexity.STCON.compl_mem_NL) by the Immerman–Szelepcsényi theorem Cslib.Complexity.NL_eq_coNL Sipser, Section 8.6, proved for these native classes by Erik Demaine's inductive-counting construction. Consequently the complement is NL-complete as well (Cslib.Complexity.STCON.compl_logSpaceComplete), the form in which the hardness of 2SAT is usually derived. Finally STCON is in L exactly when NL = L (Cslib.Complexity.STCON.mem_L_iff_forall_NL_eq_L) Sipser, Corollary 8.24.

Main results #

References #

Directed s–t connectivity is in NL Sipser, Example 8.19.

Every problem in NL reduces to directed s–t connectivity in logarithmic space: an instance is mapped to the configuration graph of a logarithmic-space decider on its encoding, with a sink after the accepting vertices Sipser, Theorem 8.25.

Directed s–t connectivity is NL-hard under logspace many-one reductions.

Directed s–t connectivity is NL-complete under logspace many-one reductions Sipser, Theorem 8.25.

The complement of directed s–t connectivity is in NL, by the Immerman–Szelepcsényi theorem NL = coNL Sipser, Section 8.6.

The complement of directed s–t connectivity is NL-complete: a problem in NL has its complement in NL, which reduces to STCON. This combines Theorem 8.25 of Sipser with NL = coNL Sipser, Section 8.6.

Directed s–t connectivity is in L exactly when NL = L, for every encoding of instances Sipser, Corollary 8.24.