Documentation

CslibFrontier.Computability.Complexity.Problems.TwoSAT.Completeness

2SAT is NL-complete #

The satisfiable formulas in conjunctive normal form with at most two literals per clause (Cslib.Complexity.TwoSAT, encoded by Cslib.Complexity.encCNF) are complete for nondeterministic logarithmic space under logspace many-one reductions Papadimitriou, Theorem 16.3 (Cslib.Complexity.TwoSAT.logSpaceComplete). The classes are the library's native ones, as for directed connectivity (Cslib.Complexity.STCON.logSpaceComplete).

Main results #

References #

The complement of TwoSAT is in NL: a nondeterministic machine looks for a clause that is empty or has more than two literals, or for a variable x with a path from x to ¬x and one back in the implication graph.

TwoSAT is in NL, from its complement by the Immerman–Szelepcsényi theorem NL = coNL Sipser, Section 8.6.

The complement of directed s–t connectivity reduces to TwoSAT in logarithmic space Papadimitriou, Theorem 16.3.

TwoSAT is NL-hard under logspace many-one reductions: every problem in NL reduces to the complement of directed connectivity, which reduces to TwoSAT.

TwoSAT is NL-complete under logspace many-one reductions Papadimitriou, Theorem 16.3.