Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI 2670 Introduction to Theory of Computing

Similar presentations


Presentation on theme: "CSCI 2670 Introduction to Theory of Computing"— Presentation transcript:

1 CSCI 2670 Introduction to Theory of Computing
October 27, 2004

2 Agenda Yesterday Today Revisit the ATM proof Finish Chapter 4 Problems
Begin Chapter 5 (pp. 171 – 176) October 27, 2004

3 Announcements Announcements
No tutorials this week -- extra office hours instead Tuesday & Wednesday 3:00 – 5:00 Or by appointment October 27, 2004

4 Some decidable languages
FDFA = {<A> | A is a DFA and L(A) is finite} PRIME = { n | n is a prime number} CONN = {<G> | G is a connected graph} L10DFA = {D | D is a DFA that accepts every string w with |w| = 10} INTCFG = {<G1, G2, w> | G1 and G2 are CFG’s and w is accepted by both} INTLCFG = L(G1  G2), where G1 and G2 are CFG’s October 27, 2004

5 Classes of languages We have shown some language falls within each of the following classes Regular Context-free Decidable Non-Turing recognizable (ATM) Today we will show some languages are undecidable The fact that ATM is not Turing recognizable means there is no computer algorithm that recognizes it! October 27, 2004

6 Undecidable languages
We can prove a problem is undecidable by contradiction Assume the problem is decidable Show that this implies something impossible October 27, 2004

7 The halting problem HALTTM
HALTTM = {<M,w> | M is a TM and M halts on input w} Theorem: HALTTM is undecidable Proof: (by contradiction) Show that if HALTTM is decidable then ATM is also decidable If M does not halt on w, then reject If M halts on w, then run M on w and return result HALTTM is undecidable because there’s no single strategy that will work for all TM’s October 27, 2004

8 Proof (cont.) Assume R decides HALTTM Let S be the following TM
S = “on input <M,w> Run R on <M,w> If R rejects, reject If R accepts, simulate M on w until it halts If M accepts, accept; if M rejects, reject” October 27, 2004

9 Recap If HALTTM is decidable then ATM is decidable
Since ATM is not decidable, HALTTM cannot be decidable October 27, 2004

10 Proving language L is undecidable
Assume L is decidable Let N be a TM that decides the language Show that a known undecidable language L’ will be decidable if it can use N to make decisions This is called reducing problem L’ to problem L Conclude N cannot exist The language L is not decidable Trick: Figuring out which undecidable language to use October 27, 2004

11 Undecidability of ETM ETM = {<M> | M is a TM and L(M) = }
Theorem: ETM is undecidable Proof: Assume ETM is decidable with decider TM R. Use R to decide ATM. Recall ATM = {<M,w> | M is a TM that accepts w}. How can we use R (which takes <M> as input) to determine if M accepts w? Hint: make new TM October 27, 2004

12 Proof (cont.) New TM: Reject everything other than w, do whatever M does on input w. M1 = “On input x If x ≠ w, reject If x = w, run M on input w Accept if M accepts” L(M1) ≠  if and only if M accepts w October 27, 2004

13 Use R and M1 to decide ATM Consider the following TM
S = “On input <M,w> Construct M1 that rejects all but w and simulates M on w Run R on <M1> that accepts iff L(M1)= If R accepts, reject; if R rejects, accept” S decides ATM – a contradiction Therefore, ETM is not decidable October 27, 2004

14 Have a fantastic fall break!
October 27, 2004


Download ppt "CSCI 2670 Introduction to Theory of Computing"

Similar presentations


Ads by Google