1 / 17

Computability

Computability. Universal Turing Machine. Countability . Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural numbers. Postings. Enumerator definition?. Need to describe parts… Transition function Output. Universal Turing Machine.

mckinleyl
Télécharger la présentation

Computability

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 (<M,w>) is the same as M(<w>) • 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 = {<M,w>|M 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 a=b. 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 = {<M,w>|M 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(<M>) : run H on (M, <M>). 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(<D>)? Run H(D, <D>). By definition, this is D running on <D>. If H returns accept (D running on <D> 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.

More Related