Presentation is loading. Please wait.

Presentation is loading. Please wait.

Reducibility Sipser 5.1 (pages 187-198). CS 311 Fall 2008 2 Reducibility.

Similar presentations


Presentation on theme: "Reducibility Sipser 5.1 (pages 187-198). CS 311 Fall 2008 2 Reducibility."— Presentation transcript:

1 Reducibility Sipser 5.1 (pages 187-198)

2 CS 311 Fall 2008 2 Reducibility

3 CS 311 Fall 2008 3 Driving directions Western Mass Cambridge Boston

4 CS 311 Fall 2008 4 If you can’t drive to London…

5 CS 311 Fall 2008 5 If something’s impossible… Theorem 4.11: A TM = { | M is a TM and M accepts w } is undecidable. Define: HALT TM = { | M is a TM and M halts on input w } Is HALT TM decidable?

6 CS 311 Fall 2008 6 The Halting Problem (again!) Theorem 5.1: HALT TM is undecidable. Proof Idea: –We know A TM is undecidable. –We need to reduce one of HALT TM or A TM to the other. Which way to go?

7 CS 311 Fall 2008 7 HALT TM is undecidable. Proof: Suppose R decides HALT TM. Define S = "On input, where M is a TM and w a string: 1.Run TM R on input. 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."

8 CS 311 Fall 2008 8 What about emptiness? E TM = { | M is a TM and L(M) = Ø} Theorem 5.2: E TM is undecidable.

9 CS 311 Fall 2008 9 A step along the way Given an input, define a machine M w as follows. M w = "On input x : 1.If x ≠ w, reject. 2.If x = w, run M on input w and accept if M does.”

10 CS 311 Fall 2008 10 E TM = { | M is a TM and L(M) = Ø} Proof: Suppose TM R decides E TM. Define a TM to decide A TM S = "On input : 1.Use the description of M and w to construct M w. 2.Run R on input. 3.If R accepts, reject; if R rejects, accept."

11 CS 311 Fall 2008 11 With power comes uncertainty M accepts w L(M) = ØL(M 1 ) = L(M 2 ) Turing machines ✗✗✗ PDA ✔✔✗ Finite automata ✔✔✔

12 CS 311 Fall 2008 12 Is there anything that can be done? Rice’s Theorem: Testing any nontrivial property of the languages recognized by Turing machines is undecidable!

13 CS 311 Fall 2008 13 We can’t even tell when something’s regular! REGULAR TM = { | M is a TM and L(M) is regular} Theorem 5.3: REGULAR TM is undecidable.

14 CS 311 Fall 2008 14 REGULAR TM is undecidable Proof: Assume R is a TM that decides REGULAR TM. Define S = "On input : 1.Construct TM M 2 = "On input x : 1.If x has the form 0 n 1 n, accept. 2.Otherwise, run M on input w and accept if M accepts w." 2.Run R on input. 3.If R accepts, accept; if R rejects, reject."


Download ppt "Reducibility Sipser 5.1 (pages 187-198). CS 311 Fall 2008 2 Reducibility."

Similar presentations


Ads by Google