Académique Documents
Professionnel Documents
Culture Documents
0
3.1
Components of a Turing machine (TM)
Control
(transition function)
- blank symbol
Has a finite number of states, two of which, Start and Halt, are special.
3.2
How a TM works
Input tape 2 0 - - - - - - -
Work tape - - - - - - - - - -
Output tape - - - - - - - - -
• At the beginning, the machine is in its Start state, the input tape has an input on it,
the other tapes are blank, and the two scanning heads are in their leftmost positions.
Such a situation is shown above, with input being 20.
• After the computation starts, the machine goes from one state to another, writes on the
work tape, and moves its scanning heads left or right according to its transition function,
which precisely prescribes what to do in each particular case, depending on the current
state and the contents of the two scanned cells (on the input and work tapes).
• If and when the machine enters the Halt state, it halts, and whatever string w is to
the left of the work-tape scanning head, will be automatically copied onto the output
tape. Such a string w is considered to be the output of the machine. Slide 3.1 shows
such a situation, with output 400.
3.3
Variants of Turing machines
Input 2 0 - 3 - 1 0 - 2 - ...
Output 4 0 0 - 9 - 1 0 0 - ...
3.4
Computability
Of course, here “=” should be understood not in the strict sense, but
in the sense of equivalence of power.
That is, according to the Church-Turing thesis, the problems that have
algorithmic solutions also have Turing machine solutions (deciders,
recognizers, etc.), and vice versa.
* *
A B
f
f
3.10
Definition of mapping reducibility
* *
A B
f
f
3.10
Definition of mapping reducibility
* *
A B
f
f
3.11
Using mapping reducibility for proving decidability/undecidability
Example: Show that the acceptance problem is Turing reducible to the halting problem.
Solution 1. When receiving the question “Does M accept w?”, replace M by M’ (as
described on Slide 3.12), and ask the oracle whether M’ halts on w. Repeat whatever
answer you get from the oracle.
Solution 2. When receiving the question “Does M accept w?”, ask the oracle if M halts
on input w.
If the oracle says “No”, you also say “No”.
If the oracle says “Yes”, start running (simulating) machine M on input w until
you see it has halted. If its output is “Yes”, you also say “Yes”. Otherwise say “No”.
Why could not we just do simulation as described in the last paragraph of Solution 2,
without any preliminary use of the oracle? Because there would be no guarantee that
the simulation would ever end.
3.16
Kolmogorov complexity
Solution. After receiving the question “What is the Kolmogorov complexity of m?”,
initialize variable i to 0, and do the following:
1. Ask the oracle if the machine Mi halts on input 0.
2. If the oracle says “No”, increment i to i+1, and go back to Step 1.
3. If the oracle says “Yes”, simulate Mi on input 0 until it halts. If you see that the
output of Mi is m, return i as your output. Otherwise, increment i to i+1 and go back to
Step 1.
How many times does the above algorithm use the oracle? Unlike the example on
Slide 3.15, here the oracle is queried more than once. The number of queries, however,
can be shown to be bounded by a certain linear function of m.