Circuits simulating multi-tape machines #
The run of a multi-tape machine over Bool on inputs of length n is simulated by a circuit,
time step by time step. At each step t the circuit holds the basic features
(Turing.MultiTapeTM.Feature) of the configuration: the control state, the input head, the work
heads and the work cells within the window |z| ≤ T, and the view of the output. From them it
derives the symbols read and the situation of the step, and from the terms of the step equations
(Turing.MultiTapeTM.Feature.stepTerms) each basic feature at time t + 1 with a constant number
of gates. Running for T steps takes O(T · (n + T)) gates
Sipser, Theorem 9.30.
The slice at length n of the language of the inputs on which the machine has written [true]
after T n steps therefore has O((n + T n) ^ 2) gates
(complexity_slice_acceptedWithin_le), and the language is in P/poly whenever T is
polynomially bounded (acceptedWithin_mem_PPoly); this is the core of P ⊆ P/poly
Arora and Barak, Theorem 6.6.
Main definitions #
Cslib.Circuits.Boolean.MachineSimulation.cfgAt,Cslib.Circuits.Boolean.MachineSimulation.featureFn: the configuration aftertsteps and a feature at timetas a Boolean function of the input.Cslib.Circuits.Boolean.MachineSimulation.basicFeatures,Cslib.Circuits.Boolean.MachineSimulation.basicAt,Cslib.Circuits.Boolean.MachineSimulation.readsAt,Cslib.Circuits.Boolean.MachineSimulation.sitsAt,Cslib.Circuits.Boolean.MachineSimulation.stepSources: the feature sets tracked across one step of the simulation.Cslib.Circuits.Boolean.MachineSimulation.featureCount,Cslib.Circuits.Boolean.MachineSimulation.readsCost,Cslib.Circuits.Boolean.MachineSimulation.featureCost,Cslib.Circuits.Boolean.MachineSimulation.stepCost: gate budgets for each phase and step of the simulation.Cslib.Circuits.Boolean.MachineSimulation.acceptedWithin: the inputs on which the output afterT nsteps is[true].
Main results #
Cslib.Circuits.Boolean.MachineSimulation.synthesis_step: one step, from the basic features at timetto those at timet + 1.Cslib.Circuits.Boolean.MachineSimulation.synthesis_basic: the basic features at every timet ≤ T, from the inputs.Cslib.Circuits.Boolean.MachineSimulation.complexity_slice_acceptedWithin_le: runningTsteps takesO((n + T) ^ 2)gates.Cslib.Circuits.Boolean.MachineSimulation.acceptedWithin_mem_PPoly.
References #
The configuration of tm after t steps on the input x.
The configuration at step t + 1 is obtained by applying tm.step to the configuration at
step t.
A feature of the configuration after t steps, as a Boolean function of the input.
Feature sets #
The basic features within the window |z| ≤ T, for inputs of length n
(Turing.MultiTapeTM.Feature.basic).
Every control-state feature belongs to basicFeatures n T.
Every input-head position feature for j < n + 2 belongs to basicFeatures n T.
Every work-head position feature within the window |z| ≤ T belongs to basicFeatures n T.
Every work-cell symbol feature within the window |z| ≤ T belongs to basicFeatures n T.
Every output-view feature belongs to basicFeatures n T.
The basic features at time t, as Boolean functions of the input.
The symbols read at time t, as Boolean functions of the input.
The situations at time t, as Boolean functions of the input.
What is available for the third phase of a step: the inputs, the basic features, the symbols read and the situations.
The Boolean function of any basic feature φ ∈ basicFeatures n T at time t belongs to
basicAt tm T t.
The Boolean function of any basic feature φ ∈ basicFeatures n T at time t belongs to
stepSources tm T t.
Every situation indicator at time t belongs to stepSources tm T t.
One step #
The cost of the first phase of a step.
Phase 3: the next configuration #
The budget for one basic feature of the next configuration: its step equation has at most
4 |Situation| + 2 terms (Turing.MultiTapeTM.Feature.length_stepTerms_le), each of at most three
literals.
One step of the simulation: the basic features at time t + 1, from those at time t.
The whole run #
The simulation: the basic features at every time t ≤ T, from the inputs.
The inputs on which tm has written [true] after T n steps, on inputs of length n.
An input w is in acceptedWithin tm T if and only if the output after exactly T w.length
steps is [true].
Running T steps takes O((n + T) ^ 2) gates. For a machine with finitely many states,
there is a constant C such that, for every step count T n, the slice at length n of the
inputs on which the output after T n steps is [true] has circuit complexity at most
C (n + T n + 1) ^ 2 Sipser, Theorem 9.30.
Machines with polynomial running time have polynomial circuits. For a machine with finitely
many states and a polynomially bounded T, the inputs on which the output after exactly T n
steps is [true], where n is the length of the input, form a language in P/poly.