Turing Machines and Undecidability - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Turing Machines and Undecidability

Description:

The BB function is an example of an uncomputable function, which is the profound ... In seeking to prove that BB(n) is not computable by a Turing machine, the ... – PowerPoint PPT presentation

Number of Views:161
Avg rating:3.0/5.0
Slides: 27
Provided by: stan7
Category:

less

Transcript and Presenter's Notes

Title: Turing Machines and Undecidability


1
Turing Machinesand Undecidability
Eric Roberts Symbolic Systems 100 May 19, 2009
2
Can Machines Think?
  • In his essay in Mind from 1950, Alan Turing began
    his inquiry into this question with the following
    paragraph

Computing Machinery and Intelligence A. M. Turing
1 The Imitation Game I propose to consider the
question, Can machines think? This should
begin with definitions of the meaning of the
terms machine and think. The definitions
might be framed so as to reflect so far as
possible the normal use of the words, but this
attitude is dangerous. If the meaning of the
words machine and think are to be found by
examining how they are commonly used it is
difficult to escape the conclusion that the
meaning and the answer to the question, Can
machines think? is to be sought in a statistical
survey such as a Gallup poll. But this is absurd.
  • In my first lecture back in April, I offered some
    brief historical insights into what philosophers
    mean by think today, my goal is to explore
    what computer scientists mean by machine.

3
Mathematics Enters the 20th Century
If we would obtain an idea of the probable
development of mathematical knowledge in the
immediate future, we must let the unsettled
questions pass before our minds and look over the
problems which the science of today sets and
whose solution we expect from the future.
  • In 1900, the eminent German mathematician David
    Hilbert set out a series of challenging problems
    for mathematicians in the twentieth century.
  • Many of those problems turned out to be
    relatively easy, but several remain unsolved even
    today.
  • Several of Hilberts 23 original problems, along
    with others he devised later, were resolved in a
    way that shook the foundations of the
    mathematical community.

David Hilbert (1862-1943)
4
Hilberts Entscheidungsproblem
  • Of the problems that have significance to
    computer science, the most important is the
    Entscheidungsproblem, which was posed in 1928.
    In informal terms, the Entscheidungsproblem can
    be expressed as follows

Is it possible to find a mechanical procedure
that can determine, given a specific proposition
in a formal system of symbolic logic, whether
that proposition is provable within that system?
  • Hilbert and the mathematicians of his day assumed
    that such a mechanical procedure was indeed
    possible, but a series of mathematical results in
    the 1930sby Kurt Gödel, Alonzo Church, Alan
    Turing, and Emil Postshowed that such a
    mechanical procedure is a logical impossibility.

5
Alan Turings Contribution
  • Alan Mathison Turing, a young British
    mathematician just out of Cambridge, helped
    settle the Entscheidungsproblem by developing a
    model for computation by a mechanical procedure.
  • Turings modelwhich is now known as a Turing
    machineis a central concept in theoretical
    computer science.
  • Turing is widely recognized as one of the most
    important figures in the history of computer
    science. The fields most prestigious prize is
    the Turing Award, which is given in his honor.

Alan Turing (1912-1954)
6
Optional Movie
Tonight, May 19, 900 P.M. Cubberley 334
7
Designing the Turing Machine
  • In his groundbreaking 1936 paper, On computable
    numbers, with an application to the
    Entscheidungsproblem, Turing described the
    process of computation in informal terms
  • These operations and the notion of a state of
    mind form the basis for the Turing machine.

8
Turing Machine Components
Computation requires Scratch paper An
unbounded amount of space At least two
symbols A read/write mechanism Some form of
program control
9
A Sample Turing Machine
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1R2
1L2
1L1
1L0
10
Representing Numbers
  • Even though the standard Turing machine alphabet
    consists of the digits 0 and 1, it is not
    practical to represent numbers in binary.
  • Even though the standard Turing machine alphabet
    consists of the digits 0 and 1, it is not
    practical to represent numbers in binary. Why?
  • Instead, numbers will be written in unary in
    which each number is written as a sequence of 1s.
    The 0 symbol is used to indicate the start and
    end of a number.
  • An input configuration for the Turing machine is
    well-formed if it consists of a single number in
    which the tape head appears over the first 1
    digit.
  • A Turing machine program is a function if it
    starts with one well-formed number and ends with
    a well-formed number.

11
The Add3 Function (M3)
1L2
1L1
1
1L3
2
1R3
1L0
3
Try it with an input value of 2
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
12
The Doubler Function (M2x)
0R0
0R2
1
0R3
1R2
2
1R4
1R3
3
1L5
4
0L6
1L5
5
0R1
1L6
6
13
Composing Machines (M2x3)
Suppose you wanted to compute the function 2x
3, given that you have the machines M2x and M3.
0R0
0R2
0R7
1
0R3
1R2
2
1R4
1R3
3
  • Start with the two machines.

M2x
1L5
4
  • Renumber the states in M3.

0L6
5
1L5
  • Combine the machines.

0R1
1L6
6
  • Change halt transitions in M2x to jump to M3.

M3
14
The Busy Beaver Problem
  • Although it is possible to introduce the notion
    of undecidable problems using Turings original
    argument involving a universal Turing machine,
    it is much easier to do so in the context of a
    more recent problem posed by Tibor Radó in the
    early 1960s

What is the largest finite number of 1s that can
be produced on blank tape using a Turing machine
with n states?
Tibor Radó (1895-1965)
  • This problem is called the Busy Beaver Problem.

15
The Function BB(n)
  • The Busy Beaver problem has a natural expression
    as a mathematical function. If n represents the
    number of states, let BB(n) represent the largest
    finite number of 1s that can be written on blank
    tape by a machine of that size.
  • For very small values on n, it is fairly easy to
    determine the value of the BB function

BB(1) 1
BB(2) 4
BB(3) 6
  • From there, the situation gets much harder.
    Proving that BB(4) 14 was a Ph.D. thesis. No
    one is yet sure of the values for any higher
    number, although conjectures exist for BB(5) and
    BB(6).

16
Known Bounds for BB(n)
17
Computing BB(n)
  • Given that BB(n) is a mathematical function, it
    makes sense to ask whether that function can be
    computed by a Turing machine. In other words, is
    there a machine MBB that takes a number of 1s
    representing n as input and writes out a number
    of 1s representing BB(n) as output?
  • It turns out that the answer is no. There is no
    Turing machine MBB that computes the BB function.
    Whats more, well be able to prove that such a
    function cannot be computed at all.
  • The BB function is an example of an uncomputable
    function, which is the profound new idea that
    Alan Turing and several of his contemporaries
    introduced to the mathematical world.

18
Observations about BB(n)
  • In order to resolve the question about whether
    BB(n) can be computed by a Turing machine, it
    helps to make two observations about the BB
    function

19
Proof by Contradiction
  • In seeking to prove that BB(n) is not computable
    by a Turing machine, the simplest approach is to
    employ a strategy called proof by contradiction.
    In proof by contradiction, you start by assuming
    the opposite of what you wish to prove, and then
    showtypically by constructing a specific
    examplethat leads to an absurd conclusion or
    that violates one of the assumptions. If the
    steps in your construction are correct, the only
    questionable part of the process is the original
    assumption.
  • Thus, to prove that BB(n) is not computable by a
    Turing machine, we start by assuming that it is.
    That means that we can assume the existence of a
    machine MBB with ? states that takes n as input
    and writes out BB(n) 1s as output.
  • The essence of the contradiction is to construct
    a machine with k states that writes out more than
    BB(k) 1s.

20
Steps in the Proof
21
But Wait . . . Why Cant You . . .
  • Despite the proof by contradiction, the idea that
    BB(n) is uncomputable seems wrong. After all, we
    can simulate a Turing machine. Why isnt it
    possible to solve this problem using the
    following approach
  • There is a problem here. Some of the machines go
    on forever, so there is no way to terminate the
    computation in step 2.
  • If it were possible to tell whether a Turing
    machine would halt, it would be possible to
    compute the BB(n) function.

22
The Halting Problem in Java
/ File HaltCheck.java --------------------
This program purports to determine whether
some other program, specified by entering the
name of the file containing the code, goes
into an infinite loop when executed. / public
class HaltCheck extends ConsoleProgram
public void run() print("Enter name of
source file ") String filename
readLine() if (doesProgramHalt(filename))
println("This program halts.")
else println("This program goes into
an infinite loop.") public
boolean doesProgramHalt(String filename)
. . . code to test the test whether the program
halts . . .
23
The Halting Problem in Java
/ File Paradox.java ------------------
This program uses doesProgramHalt to establish a
contradiction. / public class Paradox extends
ConsoleProgram public void run() if
(doesProgramHalt("Paradox.java"))
while (true) / loop forever /
else println("This
program halts.") public boolean
doesProgramHalt(String filename) . . .
code to test the test whether the program halts .
. .
24
The Church-Turing Thesis
  • The question of what is computable by a Turing
    machine is important in a search for what is
    generally computable mostly because no one has
    ever found a more powerful model.
  • Most computer scientists believe what has come to
    be known as the Church-Turing thesis

No method of computation carried out by a
mechanical process can be more powerful than a
Turing machine.
Alonzo Church (1903-1995)
  • This claim remains a conjecture, and it is not
    clear there is any way to prove it. At the same
    time, it has so far resisted all efforts to
    disprove it.

25
The Plan for Thursday
  • I will look more closely at the Church-Turing
    thesis and how one can prove that two
    computational models are equivalent.
  • Discuss the arguments in the section of Turings
    paper entitled Contrary views on the main
    question.
  • The theological objection
  • The head in the sands objection
  • The mathematical objection
  • The argument from consciousness
  • Arguments from various disabilities
  • Lady Lovelaces objection
  • Arguments from continuity in the nervous system
  • The argument from informality of behaviour
  • The argument from extra-sensory perception

You should come to class prepared to discuss any
of these viewpoints and be prepared to defend at
least one.
26
The End
Write a Comment
User Comments (0)
About PowerShow.com