Nathan Brunelle Department of Computer Science University of Virginia www.cs.virginia.edu/~njb2b/theory Theory of Computation CS3102 – Spring 2014 A tale.

Slides:



Advertisements
Similar presentations
Formal Models of Computation Part III Computability & Complexity
Advertisements

David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
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,
Lecture 19. Reduction: More Undecidable problems
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.
Rice ’ s Theorem. Def: A property of the Turing-recognizable languages is simply a subset of all Turing- recognizable languages.
Turing -Recognizable vs. -Decidable
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
1 CSC3130 Formal Languages and Automata Theory Tutorial 9 Undecidable Problem KN Hung SHB 1026.
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.
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
CS 302: Discrete Math II A Review. An alphabet Σ is a finite set (e.g., Σ = {0,1}) A string over Σ is a finite-length sequence of elements of Σ For x.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
CS21 Decidability and Tractability
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.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Cs3102: Theory of Computation Class 17: Undecidable Languages Spring 2010 University of Virginia David Evans.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
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.
Cs3102: Theory of Computation Class 24: NP-Completeness Spring 2010 University of Virginia David Evans.
Halting Problem Introduction to Computing Science and Programming I.
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.
CS 3813: Introduction to Formal Languages and Automata Chapter 12 Limits of Algorithmic Computation These class notes are based on material from our textbook,
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
 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
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
Turing -Recognizable vs. -Decidable
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
Fundamentals of Informatics Lecture 12 The Halting Problem Bas Luttik.
Recursively Enumerable and Recursive Languages
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
CSCI 2670 Introduction to Theory of Computing
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)
CSE 105 theory of computation
CS154, Lecture 8: Undecidability, Mapping Reductions
CSCE 411 Design and Analysis of Algorithms
CS154, Lecture 8: Undecidability, Mapping Reductions
CSCI 2670 Introduction to Theory of Computing
Decidable Languages Costas Busch - LSU.
Undecidable problems:
CS21 Decidability and Tractability
More undecidable languages
Instructor: Aaron Roth
More Undecidable Problems
CSE 105 theory of computation
Presentation transcript:

Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

Proving Undecidability Define D ( ) = Construct a TM that: Outputs the opposite of the result of simulating H on input > Assume there exists some TM H that decides A TM. Whatever D does, it must do the opposite, so there is a contraction! So, D cannot exist. But, if H exists, we know how to make D. So, H cannot exist. Thus, there is no TM that decides A TM.

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.

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.

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. Opening a door Lighting a fire Alcohol, wood, matchesKeg cannon battering ram

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.

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 doesn’t exist. What does can do mean here?

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

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.

Is HALT TM Decidable? Possible “Yes” answer: Prove it is decidable – Design a TM that can decide HALT TM Possible “No” answer: prove it is undecidable – 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.

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.

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.

Deciding A TM Assume HALT TM is decidable. Then some TM R can decide HALT TM. We can use R to build a machine D that decides A TM : – Simulate R on – If R rejects, it means M doesn’t 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. Machine D: 1)Run R(, w) 2)If it halts then simulate M on w, give same answer 3)Else reject M w

M w x

M w x

Rice’s Theorem Any nontrivial property about the language of a Turing machine is undecidable. A property is trivial if it either applies to ALL languages of Turing Machines, or NONE of them. Henry Gordon Rice, 1951 M w x

Which of these are Undecidable? Does TM M accept any strings? Does TM M accept “Hello”? Does TM M take more than 1000 steps to process input w ? Does TM M accept a finite number of strings? Does TM M accept a Decidable Language? Does TM M accept a Recognizable Language? Decidable Undecidable

Undecidability + Rice + Church-Turing Undecidability: undecidable languages that cannot be decided by any Turing Machine Rice’s Theorem: all nontrivial properties about the language of a TM are undecidable Church-Turing Thesis: any mechanical computation can be done by some TM Conclusion: any nontrivial property about general mechanical computations cannot be decided! Language and Problems: any problem can be restated as a language recognition problem

Some “useful” undecidable Problems? Malware detection Virus Scanning Bug detection Program equivalence Type checking Enscheidungsproblem Automatic theorem provers Solutions to polynomials N-body problems Fluid dynamics Compressibility M w x