Computability - PowerPoint PPT Presentation

About This Presentation
Title:

Computability

Description:

Computability Universal Turing Machine. Countability. Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural numbers. – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 18
Provided by: Jeani176
Category:

less

Transcript and Presenter's Notes

Title: Computability


1
Computability
  • Universal Turing Machine. Countability. Halting
    Problem.
  • Homework Show that the integers have the same
    cardinality (size) as the natural numbers.
    Postings.

2
Enumerator definition?
  • Need to describe parts
  • Transition function
  • Output

3
Universal Turing Machine
  • is a Turing Machine U in which the input comes
    in two parts
  • Description/encoding of a Turing Machine M and
  • Input string w
  • U (ltM,wgt) is the same as M(ltwgt)
  • Accepts if M accepts w
  • Rejects if M rejects w
  • Loops (fails to halt) if M fails to halt

4
Claim
  • We can build such a U.
  • Use 3 tapes.
  • For initial information (definition of M and w)
  • Hold status info for which state of M and
    position in w
  • Working tape.
  • First step is to set up tape 2 with initial state
    and starting position and tape 3 with w.
  • Operation states of U use status to simulate M
    operating on tape 3.

5
Stored program
  • The notion of a universal Turing machine MAY
    have helped in development of stored programs.
  • Note calculators do not have stored programs.
  • The notion of a program being treated as data,
    such as done when compiling or interpreting code,
    was critical in the development of computers.
  • Topic research idea.

6
Last class
  • Atm ltM,wgtM is a TM and w is a string and M
    accepts w is
  • Turing recognizable because U recognizes it.
  • May not halt because U only simulates M and M
    may not halt.
  • But maybe another technique could be better than
    M...
  • This is the halting problem

7
Digression infinite sets
  • How do we compare infinite sets?
  • Certainly,
  • the counting numbers (1, 2, 3, ) are contained
    in
  • the integers( 0, 1, 2, , -1, -2, ) are
    contained in
  • the rationals (all numbers of the form p/q, where
    p and q are integers) are contained in
  • the reals (numbers with decimals, possibly
    infinite)

8
New concept cardinality
  • Note Sipser uses size.
  • Georg Cantor (1873) noticed that two finite sets
    are the same size if the elements in each can be
    paired.
  • Definition Two sets A B have the same
    cardinality (size?) if there exists a function
  • f A ? B, that is 1 to 1 and onto1 to 1 means
    if f(a) f(b) then ab.
  • onto means if b is in B, then there is an a
    such that f(a) b

9
Example
  • The natural numbers N are the same cardinality as
    the even natural numbers!
  • Let f(n) 2 n. This is 1 to 1 and onto!

10
Countable
  • A set is countable if it is finite OR if it has
    the same cardinality as the natural numbers.
  • My words a set of countable if you can put all
    the elements in a list (describe the list in the
    case of an infinite set).

11
Rationals are countable!
  • Construct a table. Redundant numbers will be
    removed. Red line represents the list.
  • 1/1 ½ 1/3 ¼ 1/5
  • 2/1 2/2 2/3 2/4 2/5 .
  • 3/1 3/2 3/3 ¾ 3/5

12
Are the reals countable?
  • Proof by contradiction.
  • Suppose there is a list
  • 1.0000000000
  • 3.14159
  • .111222333
  • .
  • Let x by a number such with whole number 1 and
    number at ith position from decimal point is NOT
    equal to the ith position of the ith element on
    the list. Avoid 0 or 9. Then x is NOT on the
    list!

13
Diagonalization
  • General technique, possible only if there is a
    list.

14
Halting Problem
  • Atm ltM,wgtM is a TM and w is a string and M
    accepts w is undecidable.
  • Proof assume that H is a decider for Atm. Define
    a new Turing Machine D as follows
  • D(ltMgt) run H on (M, ltMgt). Output reject if H
    accepts and accept if H rejects. (Like the
    diagonalization). Claim if H exists, then we can
    build D that calls it as a subroutine.

15
Proof, continued
  • Then, what is D(ltDgt)? Run H(D, ltDgt). By
    definition, this is D running on ltDgt. If H
    returns accept (D running on ltDgt accepts) then H
    rejects. If it rejects, then accept.
  • Contradiction!
  • Contradiction arises because H could not be built
    to be used by D.

16
Practical implications
  • Before there were computers, mainly stored
    program computers, there is a result that there
    can't be full-proof debuggers/checkers.

17
Homework
  • Produce proof that the integers are countable.
  • Posting on practical implications of Halting
    problem.
  • Posting on history / origin of stored program
    concepts.
Write a Comment
User Comments (0)
About PowerShow.com