Universal Turing Machines - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Universal Turing Machines

Description:

Suppose an archaeologist finds a stone tablet with a partly damaged Latin text, ... the statement, the archaeologist can proceed as ... How should N work? ... – PowerPoint PPT presentation

Number of Views:28
Avg rating:3.0/5.0
Slides: 8
Provided by: MOL52
Category:

less

Transcript and Presenter's Notes

Title: Universal Turing Machines


1
Universal Turing Machines
Recall that the language LH is not recursive,
where LH R(M)u string R(M) represents M and
M halts on u. We proved this by showing that the
following TM cannot exist
M halts on u
Halt tester H
accept reject
R(M)u
M loops on u
LH is, however, recursively enumerable. We can
define a TM that accepts LH but loops on strings
not in LH.
M halts on u
Universal machine
accept loop
R(M)u
M loops on u
A universal Turing machine is able to simulate
the computations of all Turing machines. Ordinary
TM thermostat, adding machine, Wangs
dedicated word processor UTM stored program
computer
2
Designing a UTM
We show that LH is recursively enumerable by
defining a UTM that accepts LH The machine we
call U is deterministic and has 3 tapes. The
input R(M)w is on tape 1. A computation of U goes
like this 1. Scan tape 1. If the input is not in
the form R(M)w, then loop. 2. Write w on tape
3. 3. Write the encoding of q0 on tape
2. 4. Simulate on tapes 2 and 3 the computation
of M on input w. To do this, repeatedly Sc
an tape 1 for a transition whose first two
pieces are the state, say qi, on tape 2 and
the symbol, say x, on tape 3. If you
dont find a transition, halt. If you do find
one, it looks like this qi x qj y
d So replace the state on tape 2 by
qj. Write the symbol y over x on tape
3. Move the head reading tape 3 in direction
d.
3
The complement of LH
We do not yet have an example of a language which
is not recursively enumerable. Claim If L is
recursively enumerable and the complement of L is
also recursively enumerable, then L is recursive.
Why? We know that LH is recursively enumerable
but not recursive. What can we deduce about the
complement of LH? What can we say about a
language that is not recursively
enumerable? What can we say about the membership
decision problem Is u ? L when L is not
recursively enumerable?
4
Reduction
We all use the technique called
reduction. Suppose an archaeologist finds a stone
tablet with a partly damaged Latin text, namely a
statement that X times CXXCVI equals
M?C??L? where ? stands for an illegible
character. To restore the statement, the
archaeologist can proceed as follows 1. Translate
the Roman numerals to decimal notation. This
tells us that we want to multiply 10 and 186. 2.
Solve the new problem, i.e. find 10?186
1860. 3. Translate back into Roman numerals to
get the solution of the old problem
MDCCCLX. Definition A decision problem P is
reducible to a decision problem P? if there is a
TM that can translate any instance p of P into an
instance p? of P? in such a way that the answer
for p can be obtained from the answer to
p?. Reduction has a direction. An old problem P
is reduced to a new problem P?, whose answers
would allow us to solve the old problem.
5
Reduction Example
Let L ww w anbncn and n?0. Decision
problem P Is u ? L ? Can we reduce P to a new
problem P? that is easier to solve? Here is one
way. We know how to build a machine M to solve
the problem P? Is u ? anbncn n?0 ? We can
reduce P to P? by the machine N which 1. Takes
the input string u and checks whether u ww
for some w ? a,b,c. 2. If u ? ww, erases u and
writes a single a, then passes this to M. 3. If
u ww, erases one w, leaving a single w, then
passes this to M. So N acts as a preprocessor to
M, translating instances of P into instances of
P?. If M accepts the string passed to it, then u
? L, and if M rejects the string passed to it,
then u ? L. The answers to P? give us the answers
to P.
6
Reduction and Undecidability
We can use reduction as a way to show that a new
problem P? is undecidable simply reduce an old
undecidable P to the new P?. (Clever idea!!) (If
P? were decidable, we could use the solution for
P? to decide P. Since P is known to be
undecidable, it must be impossible to solve
decision problem P?.) The Blank Tape Problem Is
there a machine B that can decide, for an
arbitrary machine M, whether M will halt when
given input ??
M halts on ?
accept reject
R(M)
B
M loops on ?
We can reduce the Halting Problem to the Blank
Tape Problem. The reduction uses a machine N.
What must N do? N takes as input any R(M)w and
produces as output a representation R(M?) of a
new machine M? which halts on the input ? iff M
halts on the input w.
7
How should N work?
N takes input R(M)w and produces R(M?) by adding
transitions to R(M) so that the result 1. when
given input ?, writes w on the blank
tape 2. returns the head to the initial position
and goes into the initial state of M 3. runs M.
1/1 R B/B R
B/B R
Example M
q0
R(M) 0001011101101110110011011101101110110011011
011011011000
If input to M is 01, M? has to be
1/1 L 0/0 L
B/B R
B/0 R
B/1 R
q0
B/B R
M
1/1 R B/B R
0/0 L
B/B R
Write a Comment
User Comments (0)
About PowerShow.com