1 / 26

Announcements

Announcements. Homework HW8 due Tues 5/29 11am HW5 grades are out Monday is Memorial Day; no office hours, etc. Go see a parade, or some fireworks, or something TA Evaluations at the end of class ! There’s a lot of stuff in today’s lecture. CSE 105 Theory of Computability.

vine
Download Presentation

Announcements

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Announcements • Homework • HW8 due Tues 5/29 11am • HW5 grades are out • Monday is Memorial Day; no office hours, etc. • Go see a parade, or some fireworks, or something • TA Evaluations at the end of class! • There’s a lot of stuff in today’s lecture

  2. CSE 105Theory of Computability Dr. Alexander Tsiatas Spring 2012

  3. Preparing for DIAGONALIZATION proof!! Review

  4. Sizes of infinite sets: countably infinite • The natural numbers {0, 1, 2, 3, 4, …} are countably infinite. • Any set that’s the same size as the natural numbers is countably infinite. • 2 sets are the same sizeif there’s a correspondence between them. • Informal, but equivalent: a set is countably infiniteif you can list themsystematically like the natural numbers. • The list will eventually contain ALL elements

  5. Sizes of infinite sets: strings • For any alphabet (here, {0, 1}), the set of all strings is countably infinite: • ε, 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, 100, 101, 110, 111, 0000, ….

  6. Sizes of infinite sets: Turing machines • The set of all Turing machines is countably infinite: • You can just encode TM’s as strings.

  7. Sizes of infinite sets: Languages • Remember: a language is a set of strings. • Can we make a list of ALL languages? • Let’s try

  8. Sizes of infinite sets: Languages Claim: no matter the order you list languages, there is ALWAYS one that’s not on the list. BAD = {si | si is NOT in Li}

  9. So what?!?! • No matter how you try to list languages, there’s always a BAD language not on the list. • The set of languages is NOT countably infinite! The set of TM’s IS countably infinite! • |Languages| > |TM’s| • Pigeonhole principle: there are languages that are NOT accepted by any TM.

  10. ATM= {<M,w> | M is a TM, M accepts w} ATM is: • A language • An operation • A set of strings • A Turing Machine • None or more than one of the above

  11. The TM Acceptance ProblemATM

  12. ATM= {<M,w> | M is a TM, M accepts w} ATM is Recognizable • TRUE • FALSE • Other

  13. At last the proof you’ve all been waiting for! ATMIs UNDecidable

  14. The Game Plan: • Recall: ATM = {<M,w> | M is a TM, M accepts w} • Thm: ATM is undecidable • Proof by Contradiction: • Assume (towards contradiction) that ATM is decidable, so there exists some TM MATM decides ATM. • Want to show: A TM D that uses MATM as a subroutine, allowing D to do something impossible/contradictory. • D(w): //w is a string • What D is or what it does is totally up to us—but we will have to be very clever to come up with something that will cause an impossibility/contradiction. • Then, because we will have reached a contradiction, we will conclude that the assumption is false, and ATM is not decidable.

  15. Let’s look at MATM: • Assume (towards contradiction) that ATM is decidable, so there exists some TM MATM decides ATM. • Let TM G be a recognizer s.t. L(G) = {w | |w| is even} • What will happen if we run MATM(<G,111>)? • MATM accepts • MATM rejects • MATMloops • Not enough information • Other ATM = {<M,w> | M is a TM, M accepts w}

  16. Proof: • Thm: ATM = {<M,w> | M is a TM, M accepts w} is undecidable • Assume (towards contradiction) that ATM is decidable, so there exists some TM MATM that decides ATM. • Construct a TM D as follows: • D(<M>): //input is a string description of a TM • MATM(<M,<M>>) //MATM is a decider, so no infinite looping—it will tell us if <M> is in L(M) or not, even if M loops on <M> • If MATM accepts, we reject • If MATM rejects, we accept // we do the opposite of MATM • Now, it will take one more step to show how D can do something impossible

  17. Pause to Examine TM D D(<M>): //input is a string description of a TM • MATM(<M,<M>>) //MATM is a decider, so no infinite looping—it will tell us if <M> is in L(M) or not, even if M loops on <M> • If MATM accepts, we reject • If MATM rejects, we accept // we do the opposite of MATM • Let Mx be a TM, where L(Mx) = {}. What happens when we input Mx to D like this: D(<Mx>)? • D accepts • D rejects • D loops • Not enough information • Other A ATM = {<M,w> | M is a TM, M accepts w}

  18. Pause to Examine TM D D(<M>): //input is a string description of a TM • MATM(<M,<M>>) //MATM is a decider, so no infinite looping—it will tell us if <M> is in L(M) or not, even if M loops on <M> • If MATM accepts, we reject • If MATM rejects, we accept // we do the opposite of MATM ML(w): • Go into an infinite loop • What happens when we input ML to D like this: D(<ML>)? • D accepts • D rejects • D loops • Not enough information • Other A A ATM = {<M,w> | M is a TM, M accepts w}

  19. Pause to Examine TM D D(<M>): //input is a string description of a TM • MATM(<M,<M>>) //MATMis a decider, so no infinite looping—it will tell us if <M> is in L(M) or not, even if M loops on <M> • If MATM accepts, we reject • If MATM rejects, we accept // we do the opposite of MATM • Let Mvbe a TM where L(Mv) = Σ*.What happens when we input Mv to D like this: D(<Mv>)? • D accepts • D rejects • D loops • Not enough information • Other B ATM = {<M,w> | M is a TM, M accepts w}

  20. Pause to Examine TM D D(<M>): //input is a string description of a TM • MATM(<M,<M>>) //MATM is a decider, so no infinite looping—it will tell us if <M> is in L(M) or not, even if M loops on <M> • If MATM accepts, we reject • If MATM rejects, we accept // we do the opposite of MATM • What happens when we input D to D like this: D(<D>)? • D accepts • D rejects • D loops • Not enough information • Other E ATM = {<M,w> | M is a TM, M accepts w}

  21. Proof: • Thm: ATM = {<M,w> | M is a TM, M accepts w} is undecidable • Assume (towards contradiction) that ATM is decidable, so some TM MATM decides ATM. • Construct a TM D as follows: • D(<M>): //input is a string description of a TM • MATM(<M,<M>>)– MATM is a decider, so it will either accept or reject (no infinite looping) • If MATM accepts, we reject • If MATM rejects, we accept // we do the opposite of MATM • Run D(<D>). Observe that D(<D>) should accept when D(<D>) rejects, and D(<D>) should reject when D(<D>) accepts, a contradiction. Therefore the assumption is false, and ATM is undecidable.

  22. Proving it is undecidable The Halting ProblemHALTTM

  23. The Halting Problem • HALTTM = {<M,w> | M is a TM and M halts on input w} • Doesn’t say if M accepts or rejects w, just that it halts • Imagine we have a hypothetical TM Mhalt that decides HALTTM. • Could we use Mhaltto build a decider for ATM? • (recall: ATM = {<M,w> | M is a TM and M accepts w}) Showing HALT is undecidable by reduction from ATM

  24. Thm. HALTTM is undecidable. • Proof by contradiction. • Assume that HALTTM is decidable, and some TM Mhaltdecides it. • Construct a TM MATM that decides ATM: • But is ATM is undecidable, a contradiction. So the assumption is false and HALTTM is undecidable.

  25. We just did a reduction! • We will do a LOT more of this next week!

  26. TA Evaluations!!!!!111 • Class number: CSE 105 • TA’s name: SrdjanKrsticOR Wenbo Zhao • Evaluate whoever you had the MOST contact with • Only evaluate ONE of the TA’s • If you didn’t have much TA contact: leave it blank • When finished: bring to front and you can go

More Related