Alternating machines #
An alternating machine Chandra, Kozen and Stockmeyer
Arora and Barak, Section 5.3 is a nondeterministic machine whose states are
labelled existential or universal. Here it is a closed fair-coin table
(Turing.MultiTapePTM, the parametric machine with one action for each of two choices) together
with such a labelling (Turing.MultiTapeATM): at a running configuration the two transitions of
the table are the two moves (Turing.MultiTapeATM.next), as for the two transition functions of
Arora and Barak. A step of the machine is a step of the nondeterministic machine
Turing.MultiTapePTM.toNTM of the table, so no configuration is stuck, and time bounds are those of
that nondeterministic machine (Turing.MultiTapeNTM.RunsInTime).
Acceptance is the least fixed point of the labelling: a halted configuration accepts when its
output is exactly [true], an existential configuration when one of its two moves leads to an
accepting configuration, and a universal configuration when both do. It is defined through the
number of moves allowed (Turing.MultiTapeATM.AcceptsWithin): within 0 moves only a halted
configuration with output [true] accepts, and a running configuration accepts within n + 1
moves when one (existential) or both (universal) of its moves accept within n. The machine
accepts an input when its initial configuration accepts within some number of moves
(Turing.MultiTapeATM.Accepts). Infinite branches never accept, and running configurations
reached when the moves are exhausted do not accept.
A machine decides A within time t (Turing.MultiTapeATM.DecidesInTime) when on every encoded
instance enc a every computation path of at least t a steps ends halted, and a ∈ A exactly
when the machine accepts enc a. Under such a bound, acceptance is acceptance within t a moves
(Turing.MultiTapeATM.accepts_iff_acceptsWithin). Turing.MultiTapeATM.DecidableInPolyTime asks
for one machine with a binary alphabet and finitely many states, and one polynomially bounded time
bound, for all instances; like Turing.MultiTapeNTM.DecidableInPolyTime, it is relative to the
encoding of instances.
Main definitions #
Turing.MultiTapeATM: an alternating machine, a fair-coin table with universal states.Turing.MultiTapeATM.next,Turing.MultiTapeATM.action: the configuration after a move, and the action of a move.Turing.MultiTapeATM.AcceptsWithin,Turing.MultiTapeATM.Accepts: acceptance.Turing.MultiTapeATM.DecidesInTime,Turing.MultiTapeATM.DecidableInTime,Turing.MultiTapeATM.DecidableInPolyTime: deciding a problem within a time bound.
Main results #
Turing.MultiTapeATM.AcceptsWithin.mono: acceptance withinnmoves is acceptance within more.Turing.MultiTapeATM.runsInTime_iff_stepCoins: time bounds through lists of moves.Turing.MultiTapeATM.accepts_iff_acceptsWithin: under a time boundt, acceptance is acceptance withintmoves.Turing.MultiTapeATM.accepts_iff_toNTM_accepts: without universal states, acceptance is acceptance by the nondeterministic machine of the table.
References #
An alternating machine Chandra, Kozen and Stockmeyer: a closed fair-coin table, whose two transitions at a running configuration are the two moves, together with a labelling of its states as universal or existential.
- toPTM : MultiTapePTM k Symbol State
The transition table, with one action for each of the two moves.
- universal : State → Bool
Whether a state is universal; the other states are existential.
Instances For
The configuration after the move b: one step of the table with the coin b. A halted
configuration stays unchanged.
Instances For
The action of the move b at a state and read symbols.
Instances For
A move from a running configuration applies its action.
Replaying moves one at a time.
Acceptance #
Acceptance within n moves: within 0 moves a configuration accepts when it has halted
with output [true]; within n + 1 moves a halted configuration accepts when its output is
[true], and a running configuration when one of its two moves (existential state) or both of
them (universal state) lead to configurations accepting within n moves.
Instances For
The machine accepts input when its initial configuration accepts within some number of
moves: the least fixed point of the labelling.
Instances For
A running configuration does not accept without moves.
A universal configuration accepts within n + 1 moves when both of its moves accept within
n.
An existential configuration accepts within n + 1 moves when one of its moves accepts within
n.
Acceptance within n moves is acceptance within more.
If every list of t moves from c reaches a halted configuration, acceptance within any
number of moves is acceptance within t.
Time bounds #
Under a time bound t, every list of t moves from the initial configuration reaches a halted
configuration.
Time bounds through moves. Every computation path of at least t steps ends halted
exactly when every list of t moves from the initial configuration reaches a halted
configuration.
Acceptance under a time bound. If every computation path of at least t steps ends
halted, the machine accepts exactly when its initial configuration accepts within t moves.
Machines without universal states #
Without universal states, a configuration accepts within n moves exactly when some list of
n moves reaches a halted configuration with output [true].
Without universal states an alternating machine is nondeterministic: under a time bound, it accepts exactly when the nondeterministic machine of its table accepts.
Deciding problems #
atm decides A within t relative to the encoding enc: on every encoded instance
enc a, every computation path of at least t a steps ends halted, and a ∈ A exactly when
atm accepts enc a.
Instances For
Time bounds can be increased.
Under its time bound, a deciding machine decides by acceptance within t a moves.