# Reducibility Sipser 5.1 (pages 187-198).

## Presentation on theme: "Reducibility Sipser 5.1 (pages 187-198)."— Presentation transcript:

Reducibility Sipser 5.1 (pages )

Reducibility

Driving directions Boston Cambridge Western Mass

If you can’t drive to London…

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?

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?

HALTTM is undecidable. Proof: Suppose R decides HALTTM. Define
S = "On input <M,w>, where M is a TM and w a string: Run TM R on input <M,w>. If R rejects, then reject. If R accepts, simulate M on input w until it halts. If M enters its accept state, accept; if M enters its reject state, reject."

What about emptiness? ETM = {<M> | M is a TM and L(M) = Ø}
Theorem 5.2: ETM is undecidable.

A step along the way Given an input <M,w>, define a machine Mw as follows. Mw = "On input x: If x ≠ w, reject. If x = w, run M on input w and accept if M does.”

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>: Use the description of M and w to construct Mw. Run R on input <Mw>. If R accepts, reject; if R rejects, accept."

With power comes uncertainty
M accepts w L(M) = Ø L(M1) = L(M2) Turing machines PDA Finite automata

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

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.

REGULARTM is undecidable
Proof: Assume R is a TM that decides REGULARTM. Define S = "On input <M,w>: Construct TM M2 = "On input x: If x has the form 0n1n, accept. Otherwise, run M on input w and accept if M accepts w." Run R on input <M2>. If R accepts, accept; if R rejects, reject."

Download ppt "Reducibility Sipser 5.1 (pages 187-198)."

Similar presentations