Documentation

CslibFrontier.Computability.Complexity.Problems.SPACETM

Native visited-space PSPACE-completeness of SPACETM (after Arora–Barak Exercise 4 §3) #

Arora and Barak (2007 draft, Chapter 4, Section 4.3, display (2) on printed p. 79 / PDF p. 95 and Exercise 4 §3 on printed p. 89 / PDF p. 105) define the canonical space-bounded acceptance problem $$\mathrm{SPACETM} = \{\langle M, w, 1^n \rangle : \text{DTM } M \text{ accepts } w \text{ in space } n\}$$ and show that it is PSPACE-complete under polynomial-time many-one reductions.

This module establishes the native visited-space formalization of SPACETM and its PSPACE-completeness in this repository's multi-tape Turing machine model, where space counts the number of distinct work-tape cells visited by the work-tape heads during the run (Turing.MultiTapeNTM.RunsInSpace and Turing.MultiTapeTM.Universal.simSpace), whereas Arora and Barak's textbook model counts ever-nonblank cells (see results/arora-barak-2007.md row 4.16).

We represent instances as a structured record Cslib.Complexity.SPACETMInstance with a machine description machine : Desc, an input bitstring input : List Bool, and a space bound space : ℕ encoded in unary (encSPACETMInstance).

Main definitions #

Main results #

References #

An instance of the canonical space-bounded acceptance problem SPACETM in the native visited-space model after Arora and Barak, Chapter 4, Section 4.3, display (2) and Exercise 4 §3:

theorem Cslib.Complexity.encSPACETMInstance_machine_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → SPACETMInstance} :
theorem Cslib.Complexity.encSPACETMInstance_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → Turing.MultiTapeTM.Universal.Desc} {T0 S0 : γ → ℕ} {x1 : γ → List Bool} {T1 S1 x2 T2 S2 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn Turing.MultiTapeTM.Universal.eDesc T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn Turing.MultiTapeTM.encBits T1 S1) (h2 : Turing.MultiTapeTM.ComputableInO x2 encIn Turing.MultiTapeTM.encUnary T2 S2) :
Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { machine := x0 x, input := x1 x, space := x2 x }) encIn encSPACETMInstance (fun (x : γ) => T0 x + (T1 x + T2 x)) fun (x : γ) => S0 x + (S1 x + S2 x)
theorem Cslib.Complexity.encSPACETMInstance_input_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → SPACETMInstance} :
theorem Cslib.Complexity.encSPACETMInstance_space_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → SPACETMInstance} :
theorem Cslib.Complexity.encSPACETMInstance_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → Turing.MultiTapeTM.Universal.Desc} {x1 : γ → List Bool} {x2 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn Turing.MultiTapeTM.Universal.eDesc budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn Turing.MultiTapeTM.encBits budget) (h2 : Turing.MultiTapeTM.ComputableInSpace x2 encIn Turing.MultiTapeTM.encUnary budget) :
Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { machine := x0 x, input := x1 x, space := x2 x }) encIn encSPACETMInstance budget

Canonical encoding of SPACETMInstance: machine via eDesc, input via encBits, and space in unary (encUnary).

Upper bound on the encoded bit-length of any simulated configuration of a.machine on a.input.map eBit that visits at most a.space work-tape cells (Turing.MultiTapeTM.Universal.length_eCfg_le_space).

Whenever the simulation of a.machine on a.input.map eBit up to step t visits at most a.space work-tape cells, its configuration space bound cfgSpace is at most a.cfgBudget.

Instance a accepts at step t when the simulation of a.machine on a.input.map eBit up to step t visits at most a.space work-tape cells (simSpace ≤ a.space) and has halted with output [eBit true].

Instances For

    Unconditional machine-level characterization of Accepts: on the description of any binary multi-tape machine tm, Accepts ⟨desc eS eBit tm, x, n⟩ t holds if and only if the run path of tm on x up to step t visits at most n work-tape cells and tm has halted on x by step t with output [true].

    When the simulation up to step t visits at most n work-tape cells, Accepts ⟨desc eS eBit tm, x, n⟩ t holds if and only if tm has halted on x by step t with output [true].

    Clocked Boolean decider for SPACETM: run spaceBoundedUniversal for 2 ^ (a.cfgBudget + 1) steps within visited work-tape cell budget a.space and test whether the result is ([eBit true], true).

    Canonical space-bounded Turing machine acceptance (SPACETM) in the native visited-space model after Arora and Barak, Chapter 4, Section 4.3, display (2) and Exercise 4 §3: the instances a : SPACETMInstance for which the simulation of a.machine on a.input halts with output [eBit true] at some step t while visiting at most a.space work-tape cells.

    SPACETM is equivalent to acceptance at the configuration-count clock 2 ^ (a.cfgBudget + 1).

    Unconditional machine-level characterization of SPACETM: on the description of any binary multi-tape machine tm, ⟨desc eS eBit tm, x, n⟩ ∈ SPACETM holds if and only if at some step t, the run path of tm on x visits at most n work-tape cells and tm has halted on x with output [true].

    On the description of a machine tm that visits at most n work-tape cells on x (tm.RunsInSpace x n), ⟨desc eS eBit tm, x, n⟩ ∈ SPACETM holds if and only if tm halts on x with output [true].

    SPACETM is in PSPACE in the native visited-space model (after Arora–Barak Exercise 4 §3, membership).

    Space-bounded problems reduce to SPACETM. Every problem decided within visited work-tape space c₁ * p |enc a| + c₂ for a polynomial-time unary function p reduces to SPACETM in polynomial time via a ↦ ⟨desc eS eBit tm, enc a, c₁ * p |enc a| + c₂⟩.

    SPACETM is PSPACE-hard in the native visited-space model under polynomial-time many-one reductions, quantifying over every source type α and encoding enc : α ↪ List Bool (after Arora–Barak Exercise 4 §3, hardness).

    SPACETM is PSPACE-complete in the native visited-space model under polynomial-time many-one reductions (after Arora–Barak Chapter 4, display (2) and Exercise 4 §3).