Tutorial: Reduction from A TM Proofs Dr. Cynthia Lee CSE 105, UCSD Spring 2011 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee,

Slides:



Advertisements
Similar presentations
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
Advertisements

Theory Of Automata By Dr. MM Alam
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
The Recursion Theorem Sipser – pages Self replication Living things are machines Living things can self-reproduce Machines cannot self reproduce.
Turing -Recognizable vs. -Decidable
THE PUMPING LEMMA PROVING A LANGUAGE IS NOT REGULAR Dr. Cynthia Lee - UCSD - Spring 2011 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
1 CSC3130 Formal Languages and Automata Theory Tutorial 9 Undecidable Problem KN Hung SHB 1026.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Reducibility Sipser 5.1 (pages ).
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Lecture 8 Recursively enumerable (r.e.) languages
Tutorial CSC3130 : Formal Languages and Automata Theory Tu Shikui ( ) SHB 905, Office hour: Thursday 2:30pm-3:30pm
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
Lecture 27UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 27.
CS21 Decidability and Tractability
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning.
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Remaining Topics Decidability Concept 4.1 The Halting Problem 4.2
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
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,
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Theory of Computing Lecture 21 MAS 714 Hartmut Klauck.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
Introduction to Programming in MATLAB Intro. MATLAB Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Theory of Computation 1 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
Lecture 17 Undecidability Topics:  TM variations  Undecidability June 25, 2015 CSCE 355 Foundations of Computation.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
1 Chapter 9 Undecidability  Turing Machines Coded as Binary Strings  Universal Turing machine  Diagonalizing over Turing Machines  Problems as Languages.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Decidable.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
THE HALTING PROBLEM - PROOF. Review  What makes a problem decidable?  3 properties of an efficient algorithm?  What is the meaning of “complete”, “mechanistic”,
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Introduction to Programming in MATLAB
CSCI 2670 Introduction to Theory of Computing
Automata, Grammars and Languages
CS154, Lecture 11: Self Reference, Foundation of Mathematics
Reducibility The Chinese University of Hong Kong Fall 2010
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
CSE 105 theory of computation
CS154, Lecture 8: Undecidability, Mapping Reductions
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
CS154, Lecture 8: Undecidability, Mapping Reductions
CSCI 2670 Introduction to Theory of Computing
More undecidable languages
More undecidable languages
Theory of Computability
CSE 105 theory of computation
Presentation transcript:

Tutorial: Reduction from A TM Proofs Dr. Cynthia Lee CSE 105, UCSD Spring 2011 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia Lee, UCSD are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Based on a work at Cynthia Lee, UCSDCreative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported Licensewww.peerinstruction4cs.org

What is the very best AND fastest/most efficient way to really understand reduction from A TM proofs? Don’t bother with this tutorial! Instead: Take all the examples we did in class, and write a formal 2- part correctness proof for each example Recall correctness proofs look like this: – Let be a string that is in A TM, then…(explain step by step how we arrive at accepting the string ) – Let be a string that is not in A TM, then…(explain step by step how we arrive at rejecting the string ) This may sound like awful, cruel advice. But I honestly believe that tracing the progress of these constructions repeatedly can help you have that “aha!” moment as to how they work

Reduction from A TM Proofs May Seem Complicated, But They Typically Follow A Few Simple Steps! The example on the next page illustrates the classic approach We did this example in class, so it should be familiar Take a moment to read over it again – I’ve noted classic attributes of this kind of problem using ink – After you read it, then we’ll talk about what is going on conceptually

Thm. T = { | M is a TM and both “101” and “111” are in L(M)} is undecidable Proof by contradiction: (Reduce from A TM.) Assume T is decidable by TM M T. Use M T to construct TM X that decides A TM. X( ): – Construct Z(s): If s != “111” and s != “101” then reject. Else: Run M(w), if it accepts then accept. If it rejects then reject (might loop in which case obviously Z loops). – Run M T ( ). If it accepts then accept, otherwise reject. But A TM is undecidable, a contradiction. So the assumption is false and T is undecidable. QED. 4 What is L(Z)? (a) Σ * (b) {“101”, “111”} (c) {“101”,”111”} if M(w) accepts, otherwise empty set (d) Σ * if M(w) accepts, and {“101”,”111”} if M(w) does not accept

The importance of M T The magical tool we have to work with in a reduction proof is the decider that we assume exists, in this case M T This M T —and all M T ’s in A TM reduction proofs of this kind—can distinguish between two kinds of TM’s: – Those TMs whose languages have some property – Those TMs whose languages do not have that property

The importance of Z There’s a reason I always ask in class: “What is L(Z)?”—it’s the key to all of this! We want to design a Z such that: – If M(w) accepts, L(Z) has some property – If M(w) rej or loops, L(Z) does not have that property Now M T can distinguish between the two kinds of Z’s— meaning M T can distinguish between M(w) accepts and M(w) rej or loops!!! M T helps us decide A TM !!

How do we design Z? I hope you have a better understanding now of the “big picture,” but now the question is, “OK, but how do I do that?” For many languages you want to show are undecidable* (*options for some other languages are discussed on a later slide), there are a few simple steps: – Z(s): 1.(optional—it just makes it easier for me personally to think about Z’s design) reject any strings that are “extra” so you only have a few strings left to deal with 2.If needed, accept a few strings that will make L(Z) not have the property M T tests for (you may not need step 2, if L(Z) = {} is an L(Z) that does not have the property M T tests for) 3.Accept more strings if M(w) accepts (if M(w) rejects then reject)— make sure that step 3 will make L(Z) have the property M T tests for (could involve accepting all strings if M(w) accepts—the following examples show this—or only accepting particular strings if M(w) accepts) On the next two slides, Z is labeled with these 1,2,3 steps so you can see how it works

Thm. T = { | M is a TM and both “101” and “111” are in L(M)} is undecidable Proof by contradiction: (Reduce from A TM.) Assume T is decidable by TM M T. Use M T to construct TM X that decides A TM. X( ): – Construct Z(s): If s != “111” and s != “101” then reject. Else: Run M(w), if it accepts then accept. If it rejects then reject (might loop in which case obviously Z loops). – Run M T ( ). If it accepts then accept, otherwise reject. But A TM is undecidable, a contradiction. So the assumption is false and T is undecidable. QED. 8 What is L(Z)? (a) Σ * (b) {“101”, “111”} (c) {“101”,”111”} if M(w) accepts, otherwise empty set (d) Σ * if M(w) accepts, and {“101”,”111”} if M(w) does not accept

Thm. T = { | M is a TM that accepts w R whenever it accepts w} is undecidable Proof by contradiction: (Reduce from A TM.) Assume T is decidable by TM M T. Use M T to construct TM X that decides A TM. X( ): – Construct Z(s): If s != “01” and s != “10” then reject If s == “01” accept Run M(w), if it accepts then accept. If it rejects then reject (might loop in which case obviously Z loops). – Run M T ( ). If it accepts then accept, otherwise reject. But A TM is undecidable, a contradiction. So the assumption is false and T is undecidable. QED. 9

What about that fine print? On a previous slide I said, “For many languages you want to show are undecidable* … there are a few simple steps:” What about some of the other languages? – This happened in class on Thursday with the language I made up on the spot One quick fix that handles many cases is to make just a couple changes: 1.Make L(Z) so that it is “vice-versa” of the usual way: When M(w) acc, L(Z) does not meet the property M T tests for When M(w) rej or loops, L(Z) does meet the property M T tests for 2.When you run M T ( ), you’ll want to do “vice versa” on that as well: Reject when M T accepts Accept when M T rejects.