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

Slides:



Advertisements
Similar presentations
Source of slides: Introduction to Automata Theory, Languages and Computation.
Advertisements

By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Formal Models of Computation Part III Computability & Complexity
Lecture 10: Context-Free Languages Contextually David Evans
Addition 1’s to 20.
25 seconds left…...
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Week 1.
Introduction to Computability Theory
Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 26: Proving Uncomputability Visualization.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 13: Turing Machines.
CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
Turing -Recognizable vs. -Decidable
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
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.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 20 Instructor: Paul Beame.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
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.
CS21 Decidability and Tractability
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Class 19: Undecidability in Theory and Practice David Evans cs302: Theory of Computation University of Virginia Computer.
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Reductions. Prof. Busch - LSU2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
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,
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
Cs3102: Theory of Computation Class 24: NP-Completeness Spring 2010 University of Virginia David Evans.
Class 21: Introducing Complexity David Evans cs302: Theory of Computation University of Virginia Computer Science.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 16: Universality and Undecidability.
Class 24: P=NP? David Evans cs302: Theory of Computation University of Virginia Computer Science PS6 (the last one) is.
Decidable languages Section 4.1 CSC 4170 Theory of Computation.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 7 Undecidability cont. Jan Maluszynski, IDA, 2007
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
Sofya Raskhodnikova Intro to Theory of Computation L ECTURE 20 Last time Mapping reductions Computation history method Today Computation history method.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Decidability.
Decidability and Undecidability Proofs
Busch Complexity Lectures: Reductions
CSE 311 Foundations of Computing I
Reductions.
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
CS154, Lecture 11: Self Reference, Foundation of Mathematics
Reducibility The Chinese University of Hong Kong Fall 2010
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
CS154, Lecture 8: Undecidability, Mapping Reductions
CSCE 411 Design and Analysis of Algorithms
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
CS154, Lecture 8: Undecidability, Mapping Reductions
Decidable Languages Costas Busch - LSU.
Undecidable problems:
CS21 Decidability and Tractability
More undecidable languages
More Undecidable Problems
Intro to Theory of Computation
Presentation transcript:

David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability

2 Lecture 17: Proving Undecidability Proofs of Decidability How can you prove a language is decidable?

3 Lecture 17: Proving Undecidability What Decidable Means A language L is decidable if there exists a TM M such that for all strings w : –If w L, M enters q Accept. –If w L, M enters q Reject. To prove a language is decidable, we can show how to construct a TM that decides it. For a correct proof, need a convincing argument that the TM always eventually accepts or rejects any input.

4 Lecture 17: Proving Undecidability Proofs of Undecidability How can you prove a language is undecidable?

5 Lecture 17: Proving Undecidability Proofs of Undecidability To prove a language is undecidable, need to show there is no Turing Machine that can decide the language. This is hard: requires reasoning about all possible TMs.

6 Lecture 17: Proving Undecidability Proof by Reduction 1. We know X does not exist. (e.g., X = a TM that can decide A TM ) X 2. Assume Y exists. (e.g., Y = a TM that can decide B ) Y 3. Show how to use Y to make X. Y 4. Since X does not exist, but Y could be used to make X, then Y must not exist.

7 Lecture 17: Proving Undecidability Reduction Proofs B reduces to A means Y that can solve B can be used to make X that can solve A The name reduces is confusing: it is in the opposite direction of the making. Hence, A is not a harder problem than B.

8 Lecture 17: Proving Undecidability Converse? Y that can solve B can be used to make X that can solve A A is not a harder problem than B. A reduces to B Does this mean B is as hard as A? No! Y can be any solver for B. X is one solver for A. There might be easier solvers for A.

9 Lecture 17: Proving Undecidability Reduction Pitfalls Be careful: the direction matters a great deal –Showing a machine that decides B can be used to build a machine that decides A shows that A is not harder than B. –To show equivalence, need reductions in both directions. The transformation must involve only things you know you can do: otherwise the contradiction might be because something else doesnt exist. What does can do mean here?

10 Lecture 17: Proving Undecidability What Can Do Means The transformations in a reduction proof are limited by what you are proving For undecidability proofs, you are proving something about all TMs: the reduction transformations are anything that a TM can do that is guaranteed to terminate For complexity proofs (later), you are proving something about how long it takes: the time it takes to do the transformation is limited

11 Lecture 17: Proving Undecidability The Halting Problem HALT TM = { | M is a TM description and M halts on input w } Alternate statement as problem: Input: A TM M and input w Output: True if M halts on w, otherwise False.

12 Lecture 17: Proving Undecidability Is HALT TM Decidable? Possible Yes answer: Prove it is decidable Possible No answer: prove it is undecidable Design a TM that can decide HALT TM Show that no TM can decide HALT TM Show that a TM that could decide HALT TM could be used to decide A TM which we already proved is undecidable.

13 Lecture 17: Proving Undecidability Acceptance Language A TM = { | M is a TM description and M accepts input w } We proved A TM is undecidable last class. Since we know ATM is undecidable, we can show a new language B is undecidable if a machine that can decide B could be used to build a machine that can decide A TM.

14 Lecture 17: Proving Undecidability Reducing A TM to HALT TM HALT TM = { | M is a TM description and M halts on input w } A TM = { | M is a TM description and M accepts input w } is in A TM if and only if: M halts on input w and when M halts it is in accepting state.

15 Lecture 17: Proving Undecidability Deciding A TM Assume HALT TM is decidable. Then some TM R can decide HALT TM. We can use R to build a machine that decides A TM : –Simulate R on –If R rejects, it means M doesnt halt: reject. –If R accepts, it means M halts: Simulate M on w, accept/reject based on M s accept/reject. Since any TM that decides HALT TM could be used to build a TM that decides A TM (which we know is impossible) this proves that no TM exists that can decide HALT TM.

16 Lecture 17: Proving Undecidability Equivalence of DFA D and TM M EQ DM = { | D is a DFA description, T is a TM description and L(T) = L(D) } Is EQ DM decidable?

17 Lecture 17: Proving Undecidability EQ DM Is Undecidable Suppose R decides EQ DM. Can we use R to decide HALT TM ? HALT TM = { | M is a TM description and M halts on input w } EQ DM = { | D is a DFA description, T is a TM description and L(T) = L(D) } Given M and w, how can you construct D and T so R( ) tells you if M halts on w ?

18 Lecture 17: Proving Undecidability EQ DM Is Undecidable HALT TM = { | M is a TM description and M halts on input w } EQ DM = { | D is a DFA description, T is a TM description and L(T) = L(D) } D = DFA that accepts all strings. T = TM that ignores input and simulates M on w, and if simulated M accepts or rejects, accept.

19 Lecture 17: Proving Undecidability EQ DM Is Undecidable HALT TM = { | M is a TM description and M halts on input w } EQ DM = { | D is a DFA description, T is a TM description and L(T) = L(D) } D = DFA that rejects all strings. T = TM that ignores input and simulates M on w, and if simulated M accepts or rejects, reject.

20 Lecture 17: Proving Undecidability Rices Theorem Any nontrivial property about the language of a Turing machine is undecidable. Henry Gordon Rice, 1951 Nontrivial means the property is true for some TMs, but not for all TMs.

21 Lecture 17: Proving Undecidability Which of these are Undecidable? Does TM M accept any strings? Does TM M accept all strings? Does TM M accept Hello? Does TM M 1 accept more strings than TM M 2 ? Does TM M take more than 1000 steps to process input w ? Does TM M 1 take more steps than TM M 2 to process input w ? Decidable Undecidable

22 Lecture 17: Proving Undecidability Next Class Examples of some problems we actually care about that are undecidable Are there any problems that we dont know if they are decidable or undecidable? PS5 Due next Tuesday (April 1) Exam 2 in two weeks