Documentation

DescriptiveComplexity.Problems.Machine.AltDefs

Alternating machine acceptance as a decision problem #

The vocabulary of the machine bridge for the polynomial hierarchy, and the problem the bridge is about: an alternating Turing machine with k quantifier blocks is data in an instance, and

does this machine accept its input within as many steps as there are positions?

is DescriptiveComplexity.ATMAccept k start, an ordinary iso-invariant problem of the catalog. The semantics it reads is DescriptiveComplexity.ATMData, defined without a vocabulary in DescriptiveComplexity.MachinesAlt.

The vocabulary #

FirstOrder.Language.turingAlt k is FirstOrder.Language.turing – every symbol of which it carries verbatim, under the constructor base – together with k unary marks blk i splitting the states into quantifier blocks, exactly as FirstOrder.Language.qbf k extends the vocabulary of SAT by k marks on the propositional variables. The two families of marks meet in the hardness proof, which turns the block of a variable into the block of the state guessing it.

Making the marks a family indexed by Fin k, rather than a fixed pair of marks “existential”/“universal”, is what lets the alternation bound be first-order: a transition may not decrease the block index, and may raise it by at most one, so a run passes through the blocks in order and alternates at most k - 1 times. That promise – DescriptiveComplexity.ATMData.BlocksWellFormed – is folded into the yes-instances alongside DescriptiveComplexity.TMData.WellFormed, in the style of DescriptiveComplexity.IsLinOrd for Knapsack.

The two families #

ATMAccept k true starts with an existential block and is the Σₖᵖ candidate; ATMAccept k false starts with a universal one and is the Πₖᵖ candidate. The two are the same problem up to the polarity parameter, so the Πₖᵖ half of the bridge costs nothing beyond swapping the marks – the machine-side reading of DescriptiveComplexity.QBF and DescriptiveComplexity.QBFPi sharing a single reduction.

Relation symbols of alternating machine instances: those of FirstOrder.Language.turing, and one unary mark per quantifier block.

Instances For
    Dependency graph

    The relational vocabulary of alternating machine instances with k quantifier blocks.

    Equations
    Instances For
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      @[reducible, inline]

      The mark of the i-th quantifier block.

      Equations
      Instances For
        Dependency graph

        The shorthands of the vocabulary #

        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph

        The block of a state, read off the marks: the marks of the vocabulary are indexed by Fin k, so a block index beyond k marks nothing. This is what makes the “exactly one mark, below k” clause of DescriptiveComplexity.ATMData.BlocksWellFormed a first-order statement.

        Equations
        Instances For
          Dependency graph

          The alternating machine an instance describes.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Dependency graph

            The problem #

            An isomorphism makes the two machines agree. Every symbol of the vocabulary transports, which is all DescriptiveComplexity.ATMData.AltAgree asks for.

            Dependency graph

            Alternating machine acceptance. Does the alternating machine described by the instance accept its input within as many steps as there are positions? The prefix starts with an existential block when start is true.

            Both promises are folded into the yes-instances, as DescriptiveComplexity.NTMAccept folds in DescriptiveComplexity.TMData.WellFormed: the machine is well formed, and its k block marks partition the states into blocks entered in order.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Dependency graph

              Reading the block marks #

              The marks of the vocabulary are indexed by Fin k, so DescriptiveComplexity.ATMBlk is False beyond k by construction; the two lemmas below are the only unfolding the rest of the development needs.

              A block index beyond the marks of the vocabulary marks nothing.

              Dependency graph
              theorem DescriptiveComplexity.lt_of_atmBlk {k : } {A : Type} [(FirstOrder.Language.turingAlt k).Structure A] {j : } {a : A} (h : ATMBlk j a) :
              j < k

              A marked state has a block index below k.

              Dependency graph

              The mark of a block, with its index bound supplied.

              Dependency graph

              The one-block instances #

              At k = 1 the vocabulary has a single mark, the only block is 0 and its polarity is that of start; so for start = true no state is universal, and the alternating model is the nondeterministic one (DescriptiveComplexity.ATMData.altAccepts_iff_accepts).

              At one block nothing is universal, when the prefix starts existentially: the only block is 0, whose polarity is true.

              Dependency graph

              At one block, well-formedness of the block structure is just that every state is marked. Uniqueness and monotonicity are automatic: there is only one mark to carry.

              Dependency graph