Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Alternating.Space

Space-bounded alternating machines #

An alternating machine (Turing.MultiTapeATM) is bounded in space as its steps are those of the nondeterministic machine of its table (Turing.MultiTapePTM.toNTM). The machine recognizes A within space s (Turing.MultiTapeATM.RecognizesInSpace) when on every encoded instance enc a every computation path of that nondeterministic machine visits at most s a work-tape cells (Turing.MultiTapeNTM.RunsInSpace), and a ∈ A exactly when the alternating machine accepts enc a (Turing.MultiTapeATM.Accepts). Every configuration reachable from the initial one obeys the bound, whichever player chooses. Branches need not halt. Acceptance is the least fixed point of the labelling, so an infinite branch never helps a configuration accept. This bound is stronger than that of Chandra, Kozen and Stockmeyer, Definition 2.5, which asks only that each accepted instance be accepted with the labelling restricted to configurations within the bound. For bounds S(n) ≥ log n constructible in space S(n) the two give the same problems Chandra, Kozen and Stockmeyer, Theorem 2.6(b).

The machine decides A within space s (Turing.MultiTapeATM.DecidesInSpace) when moreover every branch halts: on every encoded instance some number of steps bounds every computation path, as in Turing.MultiTapeNTM.DecidesInSpace Sipser, Section 10.3. A decider within time t decides within space k * (t + 1) (Turing.MultiTapeATM.DecidesInTime.decidesInSpace).

Main definitions #

Main results #

References #

def Turing.MultiTapeATM.RecognizesInSpace {k : ℕ} {State α : Type} (atm : MultiTapeATM k Bool State) (enc : α ↪ List Bool) (A : Set α) (s : α → ℕ) :

atm recognizes A within space s relative to the encoding enc: on every encoded instance enc a, every computation path of the nondeterministic machine of its table visits at most s a work-tape cells, and a ∈ A exactly when atm accepts enc a Chandra, Kozen and Stockmeyer. No time bound is imposed: a branch may run forever, and acceptance, the least fixed point of the labelling, never relies on an infinite branch.

def Turing.MultiTapeATM.DecidesInSpace {k : ℕ} {State α : Type} (atm : MultiTapeATM k Bool State) (enc : α ↪ List Bool) (A : Set α) (s : α → ℕ) :

atm decides A within space s relative to the encoding enc: it recognizes A within space s, and every branch halts: on every encoded instance some number of steps bounds every computation path.

theorem Turing.MultiTapeATM.DecidesInSpace.recognizesInSpace {k : ℕ} {State α : Type} {atm : MultiTapeATM k Bool State} {enc : α ↪ List Bool} {A : Set α} {s : α → ℕ} (h : atm.DecidesInSpace enc A s) :
atm.RecognizesInSpace enc A s

A decider within space s recognizes its problem within space s.

theorem Turing.MultiTapeATM.RecognizesInSpace.mono {k : ℕ} {State α : Type} {atm : MultiTapeATM k Bool State} {enc : α ↪ List Bool} {A : Set α} {s s' : α → ℕ} (h : atm.RecognizesInSpace enc A s) (hs : ∀ (a : α), s a ≤ s' a) :
atm.RecognizesInSpace enc A s'

Space bounds can be increased.

theorem Turing.MultiTapeATM.DecidesInSpace.mono {k : ℕ} {State α : Type} {atm : MultiTapeATM k Bool State} {enc : α ↪ List Bool} {A : Set α} {s s' : α → ℕ} (h : atm.DecidesInSpace enc A s) (hs : ∀ (a : α), s a ≤ s' a) :
atm.DecidesInSpace enc A s'

Space bounds can be increased.

theorem Turing.MultiTapeATM.DecidesInTime.decidesInSpace {k : ℕ} {State α : Type} {atm : MultiTapeATM k Bool State} {enc : α ↪ List Bool} {A : Set α} {t : α → ℕ} (h : atm.DecidesInTime enc A t) :
atm.DecidesInSpace enc A fun (a : α) => k * (t a + 1)

Space is at most time. A decider within time t decides within space k * (t + 1).