Documentation

DescriptiveComplexity.Problems.Machine.Defs

Machine acceptance as a decision problem #

The vocabulary of the machine bridge, and the problem the bridge is about: a nondeterministic Turing machine is data in an instance, and

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

is DescriptiveComplexity.NTMAccept, an ordinary iso-invariant problem of the catalog. The semantics it reads is DescriptiveComplexity.TMData, defined without a vocabulary in DescriptiveComplexity.Machines.

The vocabulary #

FirstOrder.Language.turing carries, following design decision (a) of the plan, no relation of arity above two: a transition is an element τ of the universe with four binary attributes tsrc/tread/tdst/twrite and a unary mark right, rather than a single 5-ary symbol. An FOInterpretation supplies one defining formula per tuple of tags, so a 5-ary symbol would mean |Tag|⁵ formula cases; keeping every symbol binary keeps the reductions of stages 3 and 4 in the regime the rest of the catalog lives in.

Positions are both tape cells and time steps (design decision (b)), so the budget of DescriptiveComplexity.TMData.Accepts is unary by construction and no arithmetic is needed anywhere.

Well-formedness #

Being a linear order is not automatic for a relation symbol, so – exactly as DescriptiveComplexity.IsLinOrd for Knapsack, and WidthAtMostThree for 3SAT – it is folded into the yes-instances, together with the other promises of DescriptiveComplexity.TMData.WellFormed. All of them are first-order, so the Σ₁ kernel of the membership proof can check them.

A deviation from the plan, recorded #

The original machine design listed state and sym sorts alongside posn and tr. They are omitted here because nothing in the semantics or in the membership proof reads them: a junk element is harmless as a state, since it is reachable only through a transition, and a reduction controls which elements it marks accepting. If stage 3 turns out to want them, adding a unary symbol is a local change to this file and to the well-formedness predicate.

Relation symbols of machine instances.

Instances For
    Dependency graph
    Dependency graph
    def FirstOrder.Language.instDecidableEqTuringRel.decEq {a✝ : } (x✝ x✝¹ : turingRel a✝) :
    Decidable (x✝ = x✝¹)
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Dependency graph

      The relational language of machine instances: positions with their order, transitions with their attributes, the distinguished states and symbol, and the initial tape.

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

        The transition symbol.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          The start-state symbol.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]

            The accepting-state symbol.

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

              The order symbol.

              Equations
              Instances For
                Dependency graph
                @[reducible, inline]

                The transition-source symbol.

                Equations
                Instances For
                  Dependency graph
                  @[reducible, inline]

                  The transition-read symbol.

                  Equations
                  Instances For
                    Dependency graph
                    @[reducible, inline]

                    The transition-destination symbol.

                    Equations
                    Instances For
                      Dependency graph
                      @[reducible, inline]

                      The transition-write symbol.

                      Equations
                      Instances For
                        Dependency graph
                        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 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.TMData.Agree asks for.

                          Dependency graph

                          Machine acceptance. Does the machine described by the instance accept its input within as many steps as there are positions? The well-formedness promises of DescriptiveComplexity.TMData.WellFormed are folded into the yes-instances.

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

                            Deterministic machine acceptance. The same question with the extra promise DescriptiveComplexity.TMData.Deterministic folded into the yes-instances, exactly as the Horn condition is folded into DescriptiveComplexity.HORNSAT: the table is functional, so the run is unique – the shape a least fixed point can compute, which is what puts this problem in PTIME.

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

                              Machine acceptance in bounded space: the same question as DescriptiveComplexity.NTMAccept with the step bound dropped. Nothing else changes – the tape is indexed by the positions, so the space a machine may use is bounded by construction and a reduction of dimension d buys nᵈ cells exactly as it buys nᵈ steps – but a run may now visit exponentially many configurations, so acceptance is reachability in the configuration graph.

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

                                Deterministic machine acceptance in bounded space, with determinism folded into the yes-instances as in DescriptiveComplexity.DTMAccept. That this problem and DescriptiveComplexity.NTMAcceptSpace are complete for the same class is the content of PSPACE = NPSPACE.

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