text stringlengths 0 8.13M |
|---|
2.3.2 Formal definition of a Turing Machine Model |
There are lots of variations of the basic definitions of a Turing machine in |
the literature, differing in details and level of formalization. I will choose an |
approach that is quite formal in order to remove as much of physics that is |
22 |
possible, following [16]. See also [18] for a modern treatment. The parts of the |
definition are all motivated by the intended semantics of Turing machines. |
Program |
Consider an alphabet A consisting of the following tokens |
M |
1. a finite non-empty set of symbols Σ = S ,S ,...,S , not containing |
1 2 n |
{ } |
the special tape blank # or any other tape markers. Σ is called the input |
alphabet. |
2. a finite non-empty set of tape symbols Γ, one of which is the tape blank |
S = used to mark tape ends. Γ also contains any other tape markers |
0 |
⊔ |
such as # used to separate the input into tuples. Note that Σ Γ. |
⊆ |
3. a finite non-empty set of internal configurations Q= q ,q ,...,q , also |
1 2 n |
{ } |
called machine states. |
4. a (small) finite set of halting configurations Q , where Q Q= . |
h h |
∩ ∅ |
5. a set of moves M = L,R 7 |
{ } |
One of the machine states q is singled out as the start state. It is also |
0 |
convenient to single out halt states. If the machine is programmed for compu- |
tation problems, one halt state, q , suffices. If the machine is used for decision |
h |
problems, two halt states q ,q corresponding to the answers yes or no, are |
y n |
{ } |
singled out. Note that the halting states are not in Q. |
Anexpression isafinitesequenceoftokenschosenfromA . Aninstruction |
M |
is an expression having one of the following forms |
q S S q R |
i k l j |
• |
q S S q L |
i k l j |
• |
The intuition is that, if the machine is in the configuration q scanning the |
i |
symbol S , it prints the symbol S , changes configuration to q and it makes a |
k l j |
move R or L. |
A Turing machine M has a program P that is a finite non-empty set of |
M |
instructions. The programcan be thought of as defining a transition function |
δ :Q Γ (Q Q ) Γ M. (2.2) |
h |
× → ∪ × × |
This definition makes explicit that there are no transitions from the halting |
configurations. |
As an example of the correspondence between instructions and the transi- |
tion function, note that the instruction q S S q R corresponds to δ(q ,S ) = |
i k l j i k |
(q ,S ,R). If the transition function is undefined for a certain q S then there |
j l i k |
simply is no instruction in the program P with the first two symbols equal |
M |
7Sometimesitisusefultoincludea”nomove”S(Stay). |
23 |
to q S . In that case the machine gets stuck. This should be considered as a |
i k |
programming error, unless the configuration q is not one of the halting config- |
i |
urations. |
No two instructions have the first two symbols q S the same. This means |
i k |
that at each step of the computation, the action of the machine is uniquely |
determined. Therefore, what we have defined so far are deterministic Turing |
machines. Removing this restriction leads to the classes of non-deterministic, |
probabilistic and quantum Turing machines respectively. These will be consid- |
ered in sections 2.7, 2.8 and 6.2. |
To prepare the way for this generalization, the transition function can be |
defined in a different way that will be useful when discussing generalizations of |
the Turing machine concept. Define the function ∆ |
∆:Q Γ (Q Q ) Γ M 0,1 . (2.3) |
h |
× × ∪ × × →{ } |
Clearly,this is afunction frominstructions tothe set 0,1 . Forallinstruc- |
{ } |
tionsinthe programP ,∆evaluatesto1. Otherwiseitevaluatesto0(i.e. the |
M |
instruction is not contained in the program). |
This can be formalized somewhat further. Consider the set I of all possible |
instructions |
I =Q Γ (Q Q ) Γ M, (2.4) |
h |
× × ∪ × × |
This is a finite set and a programP is a subset of this set, or P I.8 |
M M |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.