44+Slides--The+Halting+Problem

44+Slides--The+Halting+Problem - CS103 HO#44 Slides-The...

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

View Full Document Right Arrow Icon
CS103 HO#44 Slides--The Halting Problem 5/13/11 1 reduces to solves EQ DFA E DFA Symmetric Difference A, B A B T: E DFA Accept Reject We have solved EQ DFA by using the solution to E DFA , i.e., we have REDUCED EQ DFA to E DFA . F: EQ DFA Theorem 4.11: A TM = { M, w | M is a Turing machine and M accepts w } is undecidable. First note that we can build a recognizer for A TM : U = "On input M, w , where M is a Turing machine and w is a string: 1. Simulate M on w. 2. If M ever enters an accept state, ACCEPT; if M ever enters a reject state, REJECT." Theorem 4.11: A TM = { M, w | M is a Turing machine and M accepts w } is undecidable. First note that we can build a recognizer for A TM : U = "On input M, w , where M is a Turing machine and w is a string: 1. Simulate M on w. 2. If M ever enters an accept state, ACCEPT; if M ever enters a reject state, REJECT." Why is U not a decider for A TM ? U will loop on M, w if M loops on w. If U could determine that M was not halting, it could reject, and we would have a decider for A TM . Thus building a decider for A TM is one form of the Halting Problem . Theorem 4.11: A TM = { M, w | M is a Turing machine and M accepts w } is undecidable. Suppose H is a decider for A TM . Decider for A TM M w M accepts w M rejects or loops on w Accept Reject H Theorem 4.11: A TM = { M, w | M is a Turing machine and M accepts w } is undecidable. Suppose H is a decider for A TM . Build the machine D. H M M M accepts M M rejects or loops on M D M Accept Reject Decider for A TM Theorem 4.11: A TM = { M, w | M is a Turing machine and M accepts w } is undecidable. Suppose H is a decider for A TM . Build the machine D. Run D on its own description. H D D D accepts D D Accept Reject If D accepts D , it rejects it, and if D rejects D , it accepts it. Thus D and H cannot exist, and since D could easily be built from H, we conclude that A TM is undecidable . D rejects or loops on D Decider for A TM D
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS103 HO#44 Slides--The Halting Problem 5/13/11 2 Suppose H' can decide HALT TM : does machine M halt on input w . Build the machine D'. Run D' on its own description. H' D' D' D' halts on D' D' D' Halt Loop If D' halts on D' , it loops, and if D' loops on D' , it halts. Thus D' and H' cannot exist, and we cannot solve the halting problem. D' loops on D' Decider for HALT TM Applying the machine D to it's own description reminds us of a diagonal argument : M 1  M 2 M 3 D M 1 accept reject accept ... accept M 2 reject accept accept ... reject M 3 reject accept reject ... reject .
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 07/18/2011.

Page1 / 6

44+Slides--The+Halting+Problem - CS103 HO#44 Slides-The...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online