reducibility sipser 5.1 (pages 187-198). cs 311 mount holyoke college 2 reducibility
Post on 19-Dec-2015
219 views
TRANSCRIPT
![Page 1: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/1.jpg)
Reducibility
Sipser 5.1 (pages 187-198)
![Page 2: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/2.jpg)
CS 311Mount Holyoke College
2
Reducibility
![Page 3: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/3.jpg)
CS 311Mount Holyoke College
3
Driving directions
Western MassCambridge
Boston
![Page 4: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/4.jpg)
CS 311Mount Holyoke College
4
If you can’t drive to London…
![Page 5: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/5.jpg)
CS 311Mount Holyoke College
5
If something’s impossible…
• Theorem 4.11: ATM = {<M,w> | M is a TM and M accepts w}
is undecidable.
• Define:HALTTM =
{<M,w> | M is a TM and M halts on input w}• Is HALTTM decidable?
![Page 6: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/6.jpg)
CS 311Mount Holyoke College
6
The Halting Problem (again!)
• Theorem 5.1: HALTTM is undecidable.
• Proof Idea: –We know ATM is undecidable.
–We need to reduce one of HALTTM or ATMto the other. • Which way to go?
![Page 7: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/7.jpg)
CS 311Mount Holyoke College
7
HALTTM is undecidable.
• Proof: Suppose R decides HALTTM. Define
S = "On input <M,w>, where M is a TM and w a string: 1. Run TM R on input <M,w>. 2. If R rejects, then reject. 3. If R accepts, simulate M on input w until it
halts.4. If M enters its accept state, accept;
if M enters its reject state, reject."
![Page 8: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/8.jpg)
CS 311Mount Holyoke College
8
What about emptiness?
• ETM = {<M> | M is a TM and L(M) = Ø}
• Theorem 5.2: ETM is undecidable.
![Page 9: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/9.jpg)
CS 311Mount Holyoke College
9
A step along the way
• Given an input <M,w>, define a machine Mw as follows.
• Mw = "On input x: 1. If x ≠ w, reject.2. If x = w, run M on input w and
accept if M does.”
![Page 10: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/10.jpg)
CS 311Mount Holyoke College
10
ETM = {<M> | M is a TM and L(M) = Ø}
• Proof:Suppose TM R decides ETM. Define a TM to decide ATM
S = "On input <M,w>: 1. Use the description of M and w to
construct Mw.
2. Run R on input <Mw>.
3. If R accepts, reject; if R rejects, accept."
![Page 11: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/11.jpg)
CS 311Mount Holyoke College
11
With power comes uncertaintyM accepts w L(M) = Ø L(M1) = L(M2)
Turing machines ✗ ✗ ✗
PDA ✔ ✔ ✗
Finite automata ✔ ✔ ✔
![Page 12: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/12.jpg)
CS 311Mount Holyoke College
12
Is there anything that can be done?
• Rice’s Theorem: Testing any nontrivial property of the languages recognized by Turing machines is undecidable!
![Page 13: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/13.jpg)
CS 311Mount Holyoke College
13
We can’t even tell when something’s regular!
• REGULARTM =
{<M> | M is a TM and L(M) is regular} • Theorem 5.3: REGULARTM is
undecidable.
![Page 14: Reducibility Sipser 5.1 (pages 187-198). CS 311 Mount Holyoke College 2 Reducibility](https://reader035.vdocuments.us/reader035/viewer/2022062516/56649d2e5503460f94a053c8/html5/thumbnails/14.jpg)
CS 311Mount Holyoke College
14
REGULARTM is undecidable
• Proof: Assume R is a TM that decides REGULARTM.
Define S = "On input <M,w>: 1. Construct TM
M2 = "On input x: 1. If x has the form 0n1n, accept. 2. Otherwise, run M on input w and accept if M
accepts w."
2. Run R on input <M2>.
3. If R accepts, accept; if R rejects, reject."