Alternating machine acceptance, and the machine bridge for the hierarchy #
Umbrella file for DescriptiveComplexity.ATMAccept k start, the problem “does
this alternating Turing machine with k quantifier blocks accept its input
within as many steps as there are positions?”, with the machine carried by the
instance as in DescriptiveComplexity.NTMAccept.
The problem is the polynomial hierarchy's analogue of the machine bridge that
DescriptiveComplexity.Problems.Machine provides for NP and PTIME: the levels
Σₖᵖ/Πₖᵖ of this library are defined by second-order alternation, and the
bridge is to say that they are the levels of the alternating-machine hierarchy
of Chandra–Kozen–Stockmeyer 1981.
What is here #
The model –
DescriptiveComplexity.ATMDataand its acceptance (DescriptiveComplexity.MachinesAlt): a machine ofDescriptiveComplexity.TMDatawhose states carrykblock marks, with a budget recursion handing each move to the owner of the current state's block. The alternation bound isDescriptiveComplexity.ATMData.BlocksWellFormed, folded into the yes-instances: exactly one mark per state, and a transition either stays in its block or moves to the next one – a condition on a single transition, hence first-order.The collapse lemmas (
DescriptiveComplexity.MachinesAltPlay), the mathematical content of the bridge's membership half: because the blocks are entered in order, the moves a player makes form one contiguous play of the block, so an existential block's configuration accepts exactly when some play of the block ends well (DescriptiveComplexity.ATMData.altAcc_iff_exists_play) and a universal one's exactly when every play does (DescriptiveComplexity.ATMData.altAcc_iff_forall_play). That is what lets a single second-order quantifier commit a whole phase of the run.The round game (
DescriptiveComplexity.Problems.Machine.AltGame), the object the second-order blocks of the membership proof guess:krounds, each choosing a walk – a configuration per position – legal only as far as its own block and reproducing what the earlier rounds committed (DescriptiveComplexity.ATMData.AltGame).The translation between a walk and a play, which is where the unary time bound is cashed in: reading a play off a walk (
DescriptiveComplexity.ATMData.exists_play_of_legalBelow) and splicing a play into one (DescriptiveComplexity.ATMData.roundCond_splice), on the rank arithmetic ofDescriptiveComplexity.Problems.Machine.AltRank.The round induction (
DescriptiveComplexity.ATMData.altAccepts_iff_altGame): alternating acceptance is thek-round game. This is the membership half's mathematical content, and all that is left of that half is to write the game down as aΣₖsentence.The membership half at every level (
DescriptiveComplexity.Problems.Machine.AltMembership): the game is turned into an implication ladder – a universal round always has a move, so the existence clause ofDescriptiveComplexity.guardQis redundant (DescriptiveComplexity.Problems.Machine.AltLadder) – the ladder is rewritten over the relations a second-order block guesses (DescriptiveComplexity.Problems.Machine.AltRel), its quantifiers become the alternating prefix over one guess per round (DescriptiveComplexity.Problems.Machine.AltMatrix), and what is left is the first-order kernel ofDescriptiveComplexity.Problems.Machine.AltKernel. SoATMAccept (k+1) trueis inΣₖ₊₁ᵖandATMAccept (k+1) falseinΠₖ₊₁ᵖ.The bridge at one block, below: at
k = 1and an existential prefix no state is universal, so the model is the nondeterministic one andATMAccept 1 trueis NP-complete – by two identity interpretations, one marking every element and one forgetting the mark under a guard.The hardness half at every level: the machine
M_φof a quantified Boolean formula, one guessing sweep per quantifier block, built inside an ordered QBF instance. Its tape is the instance's elements bracketed by two markers; sweepiwalks it once in each direction, and the only choice it ever makes is whether to set the cell of a variable blockimarks – so the moves of roundiare exactly the truth assignments of blocki(DescriptiveComplexity.Problems.Machine.AltGuess). After the last sweep a deterministic check phase walks the clauses, which is where the matrix is read (DescriptiveComplexity.Problems.Machine.AltVerdict). The rounds compose into the quantifier prefix (DescriptiveComplexity.Problems.Machine.AltRounds), andDescriptiveComplexity.Problems.Machine.AltInterpwrites the machine down as a two-dimensional interpretation. SoATMAccept (k+1) trueisΣₖ₊₁ᵖ-hard andATMAccept (k+1) falseisΠₖ₊₁ᵖ-hard.
Both halves are complete at every level, so the levels of this library's hierarchy are the levels of the alternating-machine one.
The machine bridge at one block: alternating acceptance with a single
existential block is NP-complete, so the alternating model agrees with
DescriptiveComplexity.NTMAccept where the two overlap.
Dependency graph
Alternating acceptance with an existential first block is in Σₖ₊₁ᵖ,
the membership half of the bridge.
Dependency graph
Alternating acceptance with a universal first block is in Πₖ₊₁ᵖ.
Dependency graph
Alternating acceptance is the k-round game, the semantic content of
the membership half at every level: an alternating machine accepts exactly when
the owner of block 0 can choose a run of its block, the owner of block 1
cannot avoid one of its own, and so on for k rounds.
Dependency graph
The hardness half #
Alternating acceptance with an existential first block is Σₖ₊₁ᵖ-hard:
DescriptiveComplexity.QBF reduces to it by building the machine M_φ of the
formula inside the instance, one guessing sweep per quantifier block.
Dependency graph
Alternating acceptance with a universal first block is Πₖ₊₁ᵖ-hard, by
the same reduction at the other starting polarity: the machine is the same, and
only the matrix shape and the block that moves first change.
Dependency graph
The bridge #
The machine bridge for the polynomial hierarchy, existential half:
alternating acceptance with k + 1 blocks, the first existential, is
Σₖ₊₁ᵖ-complete. The classes of this library are defined by second-order
alternation; this theorem says they are the levels of the alternating-machine
hierarchy of Chandra–Kozen–Stockmeyer 1981.
Dependency graph
The machine bridge, universal half: with a universal first block,
Πₖ₊₁ᵖ-complete.
Dependency graph
The machine characterization of Σₖ₊₁ᵖ: a problem sits at the k+1-st
level exactly when it ordered-FO-reduces to acceptance by an alternating
machine with k + 1 blocks starting existentially. Forward through
DescriptiveComplexity.QBF, backward because membership travels along
reductions.
Dependency graph
The machine bridge at one universal block: alternating acceptance with
a single universal block is coNP-complete. The model is the
co-nondeterministic one – a universal configuration accepts when it has a
successor and every successor accepts, so the machine accepts exactly when
every run of it does – and this is the dual of
DescriptiveComplexity.atmAccept_one_complete, which reads the same machine at
the existential polarity as DescriptiveComplexity.NTMAccept.
Dependency graph
The machine characterization of Πₖ₊₁ᵖ.