The universal machine #
The universal function takes a description of a multi-tape machine, an input given by symbol
numbers, and a number of steps in binary, and returns the output of the described machine after
that many steps and whether it has halted by then. One machine computes it for every multi-tape
machine, whatever its number of work tapes, states and symbols
(Turing.MultiTapeTM.Universal.universal_desc).
For t steps, a description of encoded length D, an input of encoded length N, and a binary
clock of length L, the time certificate is
O((t + 1) * (stepBound D N t + runBound D N t + (L + 1)^2) + (I + 1)^2),
where I is the complete encoded input length. The space certificate is O(runBound D N t + I).
The simulation iterates a step, counting down t in binary, and keeps the description, the input,
the configuration and the output so far. The setup term is included even when the clock is zero.
Main definitions #
Turing.MultiTapeTM.Universal.universal: the universal function.
Main results #
Turing.MultiTapeTM.Universal.computableTidilyInO_universal: the time and space of the universal function.Turing.MultiTapeTM.Universal.universal_desc: on descriptions of machines, it returns their output.
The bound on the state of the simulation after t steps: the context and the output.
Instances For
The time and space of the universal function, for a description of length D, an input of
encoded length N and t steps: time O((t + 1) * (stepBound D N t + runBound D N t)) and space
O(runBound D N t), plus terms in the length of the encoded input.
On the description of a machine, the universal function returns the numbered output of the machine after the given number of steps, and whether it has halted.