Limits on Efficient Computation in the Physical World Dissertation Talk Scott Aaronson.
Limits of Algorithmic Computation
-
Upload
janna-ryan -
Category
Documents
-
view
38 -
download
0
description
Transcript of Limits of Algorithmic Computation
CS 3240 – Chapter 12
CS 3240 - Chapter 12 2
An unfortunate library intern is given the task of creating a list of all books in the library that do not mention themselves. She toils all summer. In the end, she has a list. This she triumphantly adds to the reference section as “Non Self-Mentioning Books.”
She is just about to head back to campus, when the head librarian asks, “Shouldn’t that book itself be added to the list?” But when the intern adds it to the list, the book is no longer non-self-mentioning. And yet, if it’s not added, it should be added.”
The Halting Dog Problem see online document
3CS 3240 - Chapter 12
Question: Is there a Universal TM (H) that takes another TM (M) as input, along with an input string (w), and decides whether or not M halts on w? In other words, is there such an algorithm?
This would be very useful Could detect infinite loops in bad code! Could save us from wasting precious time
4CS 3240 - Chapter 12
The halting algorithm, H, is depicted below:
5CS 3240 - Chapter 12
Now define the TM, N(M) = H(M,M)
CS 3240 - Chapter 12 6
The machine N
CS 3240 - Chapter 12 7
Now define the machine D(M) which calls N(M) and: loops forever if M does halt on M returns No if M does not halt on M
CS 3240 - Chapter 12 8
The Machine D
What is the result of D(D)?
CS 3240 - Chapter 12 9
If D halts on D, then it loops forever (doesn’t halt)
If D does not halt on D, it halts on D with the result “N”
Both cases are self-contradictoryTherefore, there is no such
TM/procedure HThe Halting Problem is undecidable
10CS 3240 - Chapter 12
Suppose h(M,w) is computable the algorithm h tells whether M halts on w
Construct the function g (M,w): if h(M,w) loop forever else return false
Now compute g(g,g): if g halts on g, then it doesn’t if g doesn’t halt on g, then it does (returning
false)CS 3240 - Chapter 12 11
CS 3240 - Chapter 12 12
If the halting problem were decidable, we could build the machine above. (H is the halting algorithm)
For any recursively enumerable language, L, we feed its recognizing machine, M, and any string, w, to H. If M will halt on w, we return its answer. Otherwise we return No. This constitutes a procedure that decides any r.e. language (the “membership problem”). This implies that all r.e. languages are actually recursive. Contradiction! So H can’t exist.
Problem A is reducible to problem B if B’s decidability implies A’s decidability in other words, we can use B to solve A A ⪯ B if S(B) ➱S(A) (B solvable implies A
solvable) We did this earlier:
we just reduced the Membership Problem to the Halting Problem (by “solving” M with H)
S(H) ➱S(M) Equivalent to ¬S(M) ➱¬S(H) (contrapositive)
CS 3240 - Chapter 12 13
We will reduce H to B “If B is solvable so is H”
We do so by using B to “solve” H The construction of H from B in 2 steps:
Let Mw start with a blank tape and write w on it, then run M on w▪ Mw halts on a blank tape iff M halts on w
Construct H by taking (M,w) as input, building Mw and then feeding Mw to B (see next slide…)
CS 3240 - Chapter 12 14
CS 3240 - Chapter 12 15
Decide which unsolvable problem (A) to reduce usually the Halting or Membership problems key idea: arrange for M to accept w iff B
succeeds Modify M to interface with B
call the new machine Mw
you often run M on w inside Mw
Feed Mw and any other input (w) to B show that the output of Mw solves A
CS 3240 - Chapter 12 16
Let R be the problem of deciding whether a TM, M, ever writes a given character, c, say, when applied to any string w.
We can reduce the Halting problem to R. Modify M to always write a # whenever it
halts. Call this machine Mw. Hence M halts iff Mw writes a #.
Now compute (M,w)->(Mw,#)->R See next slide.
CS 3240 - Chapter 12 17
CS 3240 - Chapter 12 18
Does a given TM, M, ever enter a given state, q?
We can reduce the Halting Problem, H, to this problem (call it E)
Given M and w, build Mw to always halt in q’:
▪ just draw an arrow for every letter from each halting state to a new state, q’
▪ arrange for w to be the input for Mw
now feed Mw,q’ to ECS 3240 - Chapter 12 19
CS 3240 - Chapter 12 20