In
computational complexity theory
In theoretical computer science and mathematics, computational complexity theory focuses on classifying computational problems according to their resource usage, and relating these classes to each other. A computational problem is a task solved ...
, the linear speedup theorem for
Turing machine
A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer algor ...
s states that given any
real
Real may refer to:
Currencies
* Brazilian real (R$)
* Central American Republic real
* Mexican real
* Portuguese real
* Spanish real
* Spanish colonial real
Music Albums
* ''Real'' (L'Arc-en-Ciel album) (2000)
* ''Real'' (Bright album) (201 ...
''c'' > 0 and any ''k''-tape Turing machine solving a problem in time ''f''(''n''), there is another ''k''-tape machine that solves the same problem in time at most , where ''k'' > 1.
If the original machine is
non-deterministic, then the new machine is also non-deterministic.
The constants 2 and 3 in 2''n'' + 3 can be lowered, for example, to ''n'' + 2.
[
]
Proof
The construction is based on packing several tape symbols of the original machine ''M'' into one tape symbol of the new machine ''N''.
It has a similar effect as using longer words and commands in processors: it speeds up the computations but increases the machine size.
How many old symbols are packed into a new symbol depends on the desired speed-up.
Suppose the new machine packs three old symbols into a new symbol.
Then the alphabet of the new machine is : it consists of the original symbols and the packed symbols.
The new machine has the same number ''k'' > 1 of tapes.
A state of ''N'' consists of the following components:
* the state of ''M'';
* for each tape, three packed symbols that describe the packed symbol under the head, the packed symbol on the left, and the packed symbol on the right; and
* for each tape, the original head position within the packed symbol under the head of ''N''.
The new machine ''N'' starts with encoding the given input into a new alphabet (that is why its alphabet must include ).
For example, if the input to 2-tape ''M'' is on the left, then after the encoding the tape configuration of ''N'' is on the right:
:
The new machine packs three old symbols (e.g., the blank symbol ''_'', the symbol ''a'', and the symbol ''b'') into a new symbol (here (_,''a'',''b'')) and copies it the second tape, while erasing the first tape.
At the end of the initialization, the new machine directs its head to the beginning.
Overall, this takes 2''n'' + 3 steps.
After the initialization, the state of ''N'' is , where the symbol means that it will be filled in by the machine later; the symbol