Alternating polynomial time as a game of moves #
An alternating machine running within t steps plays a game of t moves, each chosen by the
player that the state labels. Through the strict table (Turing.MultiTapeATM.strict, in
CslibFrontier.Computability.Machines.Turing.MultiTape.Alternating.Game), which spends two coins on
each step of the machine, acceptance within t moves when every branch halts within t steps is
the game of 2 * t single-bit moves, alternately chosen by an existential and a universal player,
in which the existential player wins when the strict table, replayed from the moves, emits [true]
(Turing.MultiTapeATM.acceptsWithin_iff_alternation). The moves are the blocks of length 1 of the
alternating quantifiers Cslib.Complexity.Alternation of the polynomial hierarchy.
Since replaying the strict table of a fixed finite machine is polynomial-time
(Turing.MultiTapeATM.computableInPolyTime_gameVerifier), every problem in AP has a
polynomial-time game verifier (Cslib.Complexity.IsGameVerifier): a polynomial-time V and a
polynomial p such that a ∈ A exactly when the existential player wins the game of
2 * p (enc a).length moves with V (a, ·) as the winning condition
(Cslib.Complexity.exists_isGameVerifier_of_mem_AP). Conversely, the guess-then-verify machine
plays the game of a polynomial-time game verifier
(Cslib.Complexity.IsGameVerifier.mem_AP, in
CslibFrontier.Computability.Complexity.Classes.Alternation.GuessVerify).
Main definitions #
Cslib.Complexity.IsGameVerifier: a verifier of a game of polynomially many moves.
Main results #
Cslib.Complexity.alternation_const,Cslib.Complexity.alternation_congr_of_length,Cslib.Complexity.alternation_true_one_cons,Cslib.Complexity.alternation_false_one_cons: alternating quantifiers over single-bit moves.Turing.MultiTapeATM.acceptsWithin_iff_alternation: acceptance withinnmoves is the game of2 * nmoves on the strict table.Turing.MultiTapeATM.DecidesInTime.isGameVerifier: a machine deciding a problem withinc * ((enc a).length + 1) ^ dsteps gives a game verifier.Cslib.Complexity.exists_isGameVerifier_of_mem_AP: every problem inAPhas a polynomial-time game verifier.
References #
Single-bit moves #
Alternating quantifiers over a predicate that ignores the strings are vacuous.
Alternating quantifiers only apply the predicate to strings of the total length of the blocks.
The total length of the single-bit moves.
One round of the game: an existential move, then a universal move.
Acceptance as a game of moves. If every list of n moves from c reaches a halted
configuration, c accepts within n moves exactly when the existential player wins the game of
2 * n alternate single-bit moves, the existential first, in which the strict table replayed from
the moves ends with output [true].
A machine under a time bound plays a game of moves on its input: if every computation
path of at least t steps ends halted, the machine accepts exactly when the existential player
wins the game of 2 * t alternate moves in which the strict table, replayed from the moves on the
input, emits [true].
Game verifiers #
V verifies A through a game of p (enc a).length rounds of two single-bit moves, the first
chosen by an existential player and the second by a universal player: a ∈ A exactly when the
existential player wins, that is, can choose its moves so that V (a, w) = true for the moves w
whatever the universal player chooses.
A machine deciding a problem gives a game verifier: if atm decides A within
c * ((enc a).length + 1) ^ d steps, then its game verifier verifies A through games of
c * ((enc a).length + 1) ^ d rounds.
Every problem in AP has a polynomial-time game verifier.