Turing Machines - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Turing Machines

Description:

Since the copier is easy to implement, H' can't exist, and therefore H can't exist! ... copier. e(M) H' e(M) e(M) H1. 7. UTM to determine halting? From this we ... – PowerPoint PPT presentation

Number of Views:79
Avg rating:3.0/5.0
Slides: 13
Provided by: mt76
Category:

less

Transcript and Presenter's Notes

Title: Turing Machines


1
Turing Machines
Part 3
January 2002
2
1. A machine that read machines
  • The input tape to a TM can contain the program of
    the TM as well as the input data
  • A machine that reads in an arbitrary program (an
    encoding of a TM) and then produces the same
    output as the TM for the same input is called a
    Universal Turing Machine.
  • A UTM need not be large (the smallest known has
    just 4 symbols and 7 states)

3
1.1 UTM
  • UTM input tape contains e(M)ºx where,
  • e(M) is the encoding of the program of a TM M,
  • º is a separator symbol,
  • x is the input to M

4
2. The Halting problem
  • We have seen before that a TM may never
    halt e.g.
  • You and I can see from the state transition
    function g that this machine could get stuck in a
    loop
  • But can we build a machine that can check to see
    if any TM will get stuck in an infinite loop
    (never halt) before we start the TM?
  • Surely we could use a UTM do do this checking?

5
2.1 UTM to determine halting?
  • Suppose there exists a TM H that given e(M)ºx
    will output 1 is M will eventually halt on x, or
    0 is M will loop forever
  • A minor variation of H (say H) loop forever if M
    will halt on input x(it is easy to create
    an endless loop to prevent the output of a 1)

6
UTM to determine halting?
  • Now construct H1 which first copies its input
    (complete with a separator) then feeds it to H.
  • Suppose we input e(H1) to H1. Then H1 loops
    forever if H1 will halt on input e(H1), and H1
    halts (with output 0) if H1 will loop forever on
    input e(H1).
  • This is a contradiction, so H1 cant exist!
  • Since the copier is easy to implement, H cant
    exist, and therefore H cant exist!

7
UTM to determine halting?
  • From this we have shown that
  • By the Church-Turing thesis, it is not
    effectively computable whether an arbitrary
    program will halt or loop forever when presented
    with an arbitrary set of input data.
  • This is worse than being intractable - it is not
    solvable, even in principle.
  • This was first proved in 1936 by Alan Turing.
  • It has serious implications for automated program
    verification and software reliability testing.

No Turing machine can be made to decide whether
or not an arbitrary TM will eventually halt when
presented with an arbitrary input x
8
A final note
  • We can also go on to show (see notes) that
  • Can humans therefore reason in a way that is
    non-algorithmic in order to reach such a
    conclusion?

given any proposed algorithm for deciding whether
or not a TM halts, we can produce a TM that we
can see does not halt, yet the algorithm cannot
9
Summary
  • A Universal Turing Machine can read in and
    implement an encoding for a TM M and behave in
    exactly the same way as M would for a given input
    x.
  • We would like a machine to predict if a TM will
    halt for a given input
  • We have demonstrated that this is not possible!

10
Turing Machines in DNA?
  • Alan Turing's definition of a Turing machine was
    not intended as a blueprint for how one would
    actually build practical computing machinery. The
    very primitive actions of reading and writing and
    moving one step at a time are like atoms of
    computation, and the atomic level is too
    time-consuming for what is needed in practice.
    However it appears that there is one modern field
    in which this atomic level of simplicity may be
    just what is needed. This is explored by Ehud
    Shapiro in a June 1999 paper on using the Turing
    machine model for a DNA computer. See his page
    for further information, press reports and links

11
Exam
  • 2 hours
  • answer 3/4 questions
  • 2 questions courtesy of DTB
  • 2 questions from JMR
  • Grammars
  • Automata
  • complexity and computability
  • Turing machines
  • TSP problem

12
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com