There are many alternatives to Turing machines. Today we will discuss some along with the languages they recognize.
It turns out that the simple Turing machine definition we looked at is extremely robust. The extended models do not offer any increased ability to describe languages.
As a simple example, consider a "Stay Put" Turing machine, which is able to keep its tape head in the same location, in addition to being able to move left or right.
Formally, we would say the transition function is:
$\delta : Q \times \Gamma \rightarrow Q \times \Gamma \times \{L, R, S\}$
Where 'S' indicates the tape head should stay where it is.
How can we show that a "Stay Put" Turing machine is equivalent to a regular one?
A multi-tape Turing machine is one that has $k$ tapes for reading and writing information, instead of only one.
The first tape is initialized with the input, and the rest are initially empty.
Formally, the transition function is:
$\delta : Q \times \Gamma^k \rightarrow Q \times \Gamma^k \times \{L, R\}^k$
We can transition based on all $k$ current input symbols, write a symbol to each of the $k$ tapes, and move each of the $k$ tapes either left or right.
Despite these added abilities, multi-tape Turing machines are no more capable than regular ones.
To prove this, we will need to show that any multi-tape Turing machine can be simulated with a standard one. This is done in the following manner:
The following figure shows an example of a computation on a multi-tape Turing machine, and the equivalent computation on a single-tape one.
Given some multi-tape Turing machine $M$, we can build an equivalent single tape machine $S$ is defined as follows:
$S =$ "On input $w = w_1w_2...w_n:$
Put the tape into the format described above:
$\#\dot{w_1}w_2...w_n\#\dot{\sqcup}\#\dot{\sqcup}\#\dot{\sqcup}\#\dot{\sqcup}...$
A non-deterministic Turing machine is one which can take one of several actions at each step in the computation.
The transition function is defined as:
$\delta : Q \times \Gamma \rightarrow \mathcal P(Q \times \Gamma \times \{L, R\})$
Just like an NFA, the computation of a non-deterministic TM is a tree, where each branch is a possible action. If any branch results in an accept, the machine accepts the input.
Non-deterministic Turing machines are no more powerful than deterministic ones.
To show this, we will simulate a non-deterministic machine $N$ with a deterministic one, $D$. In order to accomplish this, the deterministic Turing machine will need to search the entire tree of computation looking for an accept state.
$D$ uses three tapes (which could be collapsed into one as described above):
At each step in the computation $N$, there will be a set of transitions we could make. We will number these $1 - b$, where $b$ is the largest number of options any state has.
The string stored on the address tape keeps track of the sequence of choices we have made. For example $132$ means that we took the first option initially, then the third option, and finally the second.
$D =$ "On input $w$:
It may take a long time, but $D$ will eventually try every branch of computation in $N$. If $N$ can possibly accept its input, $D$ will as well.
An enumerator is a Turing machine with a printer attached. The enumerator starts with no input on its tape. Rather than accept or reject strings, the enumerator prints out a set of strings which is the language of the enumerator.
The enumerator may elect at any point to print the string on its tape.
Every enumerator has an equivalent Turing machine that recognizes the language it generates. The following Turing machine $M$ recognizes the language produced by some enumerator $E$:
$M =$ "On input $w$:
Also, every Turing machine has an equivalent enumerator that generates the language it recognizes. The following enumerator $E$ generates the language recognized by some Turing machine $M$:
Say that $s_1, s_2,...$ is a list of all strings in $\Sigma^{\ast}$.
$E =$
Here $E$ is careful to avoid infinite looping in $M$ by limiting the number of steps that are executed.
Many other general models of computation have been proposed. Some are similar to Turing machines. Others (like the lambda calculus of Alonzo Church) are much different.
All of these models that have unrestricted access to unlimited memory are equivalent.
This means that the set of things that can be computed is independent of the actual computer model being used. Anything that can be computed with a powerful super-computer can be computed with a simple Turing machine.
Copyright © 2024 Ian Finlayson | Licensed under a Creative Commons BY-NC-SA 4.0 License.