Alternating time and space classes #
The parametric classes of alternating machines (Turing.MultiTapeATM, in
CslibFrontier.Computability.Machines.Turing.MultiTape.Alternating) with a binary alphabet and
finitely many states Chandra, Kozen and Stockmeyer
Sipser, Section 10.3. They are relative to an encoding enc : α ↪ List Bool of
instances, with a bound of the length n of the encoded instance, up to constants
c₁ * t n + c₂, like Cslib.Complexity.NTIME and Cslib.Complexity.NSPACE:
Cslib.Complexity.ATIME enc t: decided within timeO(t n)(Turing.MultiTapeATM.DecidesInTime): every computation path of that length has halted, and the instance is a member exactly when the machine accepts it. Acceptance is the least fixed point of the labelling (Turing.MultiTapeATM.Accepts).Cslib.Complexity.ASPACE enc s: decided within spaceO(s n)(Turing.MultiTapeATM.DecidesInSpace): every computation path visits at most that many work-tape cells, and every branch halts.
Chandra, Kozen and Stockmeyer bound only the space of the accepting computations of accepted
instances Chandra, Kozen and Stockmeyer, Definition 2.5. Bounding
every reachable configuration without asking for halting is recognition within space
(Turing.MultiTapeATM.RecognizesInSpace). The classes use the deciding form of Sipser instead, in
which every reachable configuration obeys the bound and every branch halts. For bounds
S(n) ≥ log n constructible in space S(n) these give the same problems
Chandra, Kozen and Stockmeyer, Theorem 2.6(b). The deterministic
simulation ASPACE s ⊆ DTIME (2 ^ O(log₂ n + s))
(Cslib.Complexity.exists_mem_DTIME_of_mem_ASPACE, in
CslibFrontier.Computability.Complexity.Classes.Alternation.DeterministicTime) is proved for
recognizers, so it holds in either convention, with no constructibility hypothesis.
Space counts visited work-tape cells: the input tape is read-only and the output tape write-only.
A time bound gives a space bound, so ATIME t ⊆ ASPACE t (Cslib.Complexity.ATIME_subset_ASPACE).
The input head moves one cell per step, as for the deterministic and nondeterministic machines. A
machine running within time t n < n therefore reads only a prefix of its input, and ATIME below
linear time is not the alternating logarithmic time of machines with random access to their input.
Alternating polynomial time Cslib.Complexity.AP is the union of the classes ATIME (n ^ k)
(Cslib.Complexity.mem_AP_iff_exists_mem_ATIME). It is PSPACE (Cslib.Complexity.AP_eq_PSPACE,
in CslibFrontier.Computability.Complexity.Classes.Alternation.Savitch). The space classes
Cslib.Complexity.APSPACE and Cslib.Complexity.AL are in
CslibFrontier.Computability.Complexity.Classes.Alternation.Space.
Main definitions #
Cslib.Complexity.ATIME,Cslib.Complexity.ASPACE: alternating time and space classes.Cslib.Complexity.AP: alternating polynomial time.
Main results #
Cslib.Complexity.ATIME_mono_of_le_mul_add,Cslib.Complexity.ASPACE_mono_of_le_mul_add: the classes absorb constant factors.Cslib.Complexity.ATIME_mono,Cslib.Complexity.ASPACE_mono,Cslib.Complexity.ATIME_mono_of_eventually_le,Cslib.Complexity.ASPACE_mono_of_eventually_le: monotonicity; only the eventual values of the bound matter.Cslib.Complexity.ATIME_subset_ASPACE: alternating time is within alternating space.Cslib.Complexity.mem_AP_iff_exists_mem_ATIME:APis the union of the classesATIME (n ^ k).
References #
Alternating polynomial time Chandra, Kozen and Stockmeyer
Arora and Barak, Section 5.3: the problems decided within polynomial time by an
alternating machine with a binary alphabet and finitely many states, with respect to the encoding
enc of instances.
Alternating time Chandra, Kozen and Stockmeyer, Section 3
Sipser, Section 10.3: the problems decided within time O(t n), that is
c₁ * t n + c₂, by an alternating machine with a binary alphabet and finitely many states, on
instances whose encoding under enc has length n.
Alternating space Chandra, Kozen and Stockmeyer, Section 3
Sipser, Section 10.3: the problems decided within space O(s n), that is
c₁ * s n + c₂, by one alternating machine with a binary alphabet and finitely many states, along
every computation path, on instances whose encoding under enc has length n. Following Sipser's
deciders, every branch also halts. Chandra, Kozen and Stockmeyer bound only the accepting
computations of accepted instances
Chandra, Kozen and Stockmeyer, Definition 2.5.