# Chapter 5: Reducibility

## Chapter 5.1, Undecidable Problems from Language Theory

### What is a Reduction?

• A reduction is a way of converting problem A to problem B in such a way that problem B can be used to solve problem A.
• Could problem A be easier than problem B?
• Could problem A have the same difficulty as problem B?
• Could problem A be more difficult than problem B?
• The previous chapter proved that ATM = { <M, w> | M is a TM and M accepts w} is undecidable.
• A problem can be shown to be undecidable by reducing a known undecidable problem to it.
• (Also, a problem can be shown to be decidable by reducing it to a known decidable problem.)

### The Halting Problem is Undecidable

• HALTTM = { <M, w> | M is a TM and M halts on input w}.
• Proof by Contradiction: Assume HALTTM is decidable. If this assumption tells us that ATM is decidable, we have a contradiction and we would then know that HALTTM is undecidable.
• If HALTTM is decidable, we can build TM R that decides HALTTM.
• How does this help us know if TM S that takes input <M, w>, an encoding of TM M and string w, will accept or reject?

### ETM is Undecidable

• ETM = {<M> | M is a TM and L(M) = empty}.
• Assume TM R can decide ETM.
• The string that encodes the problem, S = <M, w>
• Construct M1 such that it rejects all inputs except for w.
• Where does the argument go from here?

### EQTM is Undecidable

• EQTM = {<M1, M2> | M1 and M2 are TMs and L(M1) = L(M2)}.
• Assume TM R can decide EQTM.
• The string that encodes the problem is S = <M>
• Construct M1 to reject all inputs.
• Run R on <M, M1>. If R accepts, M is empty. If R rejects, M is not empty.

### REGULARTM is Undecidable

• REGULARTM = {<M> | M is a TM and L(M) is a regular language}.
• The proof appears on page 219.