381hw11solns

# 381hw11solns - CS381 Prove that the halting problem for...

• Homework Help
• 501844684_ch
• 4

This preview shows pages 1–3. Sign up to view the full content.

CS381 Homework 11: Problem 1 Prove that the halting problem for Turing machine is undecidable. We can think of the Turing machine for the following pseudocode. The function halt takes two para- meters as input. The first parameter is a program and the second is the argument to that program. We send breakHalt in as the argument to itself. The program therefore says that if breakHalt doesn’t halt then we are done, otherwise we loop forever. This creates a contradiction, therefore the halting problem is undecidable. function breakHalt(string s) if halt(s, s) = false return true else loop forever 1

This preview has intentionally blurred sections. Sign up to view the full version.

Rice’s Theorem: Every nontrivial property of the RE languages is undecidable. Proof: Assume Ø, the empty language is not in the nontrivial property P. Let L be a nonempty language in P and M L be a Turing Machine accepting L. Explanation: The reduction from L u to L P will be sufficient in proving L P is undecidable since we’ve already established that L u is. We need to construct a Turing Machine M’ that takes as input (M,w) which is just another Turing Machine and a string.
This is the end of the preview. Sign up to access the rest of the document.
• Fall '05
• HOPCROFT
• Halting problem

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern