The cost of a step of the simulation #
States, symbols and moves are encoded in unary (Turing.MultiTapeTM.encUnary), head positions on
the work tapes as integers (Turing.MultiTapeTM.encInt), the position of the input head in binary
(Turing.MultiTapeTM.encNat), and a structure as the framed tuple of its fields.
Reading, writing and moving on a zipper are tidily computable in linear time and space. A step of
the simulation (Turing.MultiTapeTM.Universal.step_inO) takes space linear in the length L of
the encoded context (the description, the input and the configuration), and time
(K + E + p + 1) * (L + 1) ^ 2 for K work tapes, E transitions and the input head at p:
reading and changing a work tape is linear, comparing the key with a transition is quadratic, and
finding the input symbol counts down from p.
Main definitions #
Turing.MultiTapeTM.Universal.eDesc,.eCfg: the encodings of descriptions and configurations.Turing.MultiTapeTM.Universal.stepTime: the time bound of a step.
Main results #
Turing.MultiTapeTM.Universal.step_inO: a step is tidily computable within the timestepTimeand linear space.
Encodings #
An action on a work tape.
Instances For
The state of a configuration, in linear time.
Reading, writing and moving on a work tape, in linear time #
Applying actions to all work tapes #
Sizes #
All work tapes #
Applying actions to the work tapes, within time the number of work tapes times the length of the arguments, and linear space.
The symbols under the heads of the work tapes, within time the number of work tapes times their length, and linear space.
The input head #
The symbol at a position of the input, given in binary, within time the position times the square of the length of the arguments, and linear space.
Moving the input head, given in binary.
A step without the input #
The context of a step without the input: the description, the configuration and the symbol under the input head.
Instances For
The key of the transition to take.
Instances For
The default transition, never taken.
Instances For
The action of the transition to take.
Instances For
The time bound of a step without the input: the number of work tapes and of transitions, times the square of the length of the context.
Instances For
A step #
The context of a step: the description, the input and the configuration.
Instances For
The time bound of a step: the number of work tapes, of transitions and the position of the input head, times the square of the length of the context.
Instances For
One step of the simulation, on contexts, within the time stepTime and linear space: the
symbol under the input head, and the step without the input.