Nondeterministic space classes and their complements #
Cslib.Complexity.NSPACE enc s consists of the problems that one finite-state binary
nondeterministic multi-tape machine decides within space c₁ * s n + c₂, for constants c₁ and
c₂, on instances whose encoding under enc has length n. As for Cslib.Complexity.NL, the
space bound holds along every computation prefix, including rejecting branches; every branch
halts, and on each input some finite time bounds all computation paths; the input tape is
read-only and the output tape write-only. Cslib.Complexity.coNSPACE enc s consists of the
complements of the problems in NSPACE enc s, under the same encoding.
The Immerman–Szelepcsényi theorem says that NSPACE(s) = coNSPACE(s) whenever
log₂ n ≤ s n [Imm88] [Sze87]
(Cslib.Complexity.NSPACE_eq_coNSPACE). No constructibility of s is assumed, following
Immerman's remark after his Theorem 1: the standard space measure bounds every sequence of
choices, so the space may be increased as needed. The complement machines come from
Turing.MultiTapeNTM.exists_decidesInSpace_compl, which generalizes Erik Demaine's
inductive-counting construction for logarithmic space.
Main definitions #
Cslib.Complexity.NSPACE: nondeterministic space classes.Cslib.Complexity.coNSPACE: their complements.
Main results #
Cslib.Complexity.NSPACE_mono_of_le_mul_add:NSPACEabsorbs constant factors.Cslib.Complexity.NSPACE_mono,Cslib.Complexity.NSPACE_mono_of_eventually_le: monotonicity; only the eventual values of the bound matter.Cslib.Complexity.compl_mem_NSPACE_of_recognizesInSpace,Cslib.Complexity.compl_mem_NSPACE: closure under complement.Cslib.Complexity.mem_NSPACE_of_recognizesInSpace: recognizers and deciders give the same class.Cslib.Complexity.NSPACE_eq_coNSPACE: the Immerman–Szelepcsényi theorem.
References #
The problems decided within space O(s n), that is c₁ * s n + c₂, by one finite-state
binary nondeterministic machine, along every computation prefix and with every branch halting,
on instances whose encoding under enc has length n.
Instances For
The complement of a problem recognized within space O(s) is decided within space O(s),
every branch halting, when log₂ n ≤ s n. The recognizer's branches may run forever.
A recognizer within space O(s) gives a decider, every branch halting, when
log₂ n ≤ s n. Its branches may run forever.
The Immerman–Szelepcsényi theorem: NSPACE(s) = coNSPACE(s) for every bound with
log₂ n ≤ s n, constructible or not Immerman, Theorem 1, for the library's native
machines and arbitrary injective instance encodings.