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
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
Advertisements

Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
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.
Pushdown Automata Chapter 12. Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2) Say yes or no,
Turing -Recognizable vs. -Decidable
Resource-Bounded Computation Previously: can it be done? Now: how efficiently can it be done? Goal: conserve computational resources: Time, space, other.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
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.
Alternation Alternation: generalizes non-determinism, where each state is either “existential” or “universal”: Old: existential states New: universal states.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
CS Department Fireside Chat All are welcome! Wed Nov 18, 5-6pm, Ols 228e/236d Kim Hazelwood and Wes Weimer Meet and ask them questions in a non-academic.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
The Halting Problem Sipser 4.2 (pages ). CS 311 Mount Holyoke College 2 Taking stock All languages Turing-recognizable Turing-decidable Context-free.
The Halting Problem Sipser 4.2 (pages ).
Mapping Reducibility Sipser 5.3 (pages ). CS 311 Fall Computable functions Definition 5.17: A function f:Σ*→Σ* is a computable function.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
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.
Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.
CHAPTER 4 Decidability Contents Decidable Languages
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
CS 310 – Fall 2006 Pacific University CS310 The Halting Problem Section 4.2 November 15, 2006.
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
January 28, 2015CS21 Lecture 101 CS21 Decidability and Tractability Lecture 10 January 28, 2015.
CS21 Decidability and Tractability
Halting Problem. Background - Halting Problem Common error: Program goes into an infinite loop. Wouldn’t it be nice to have a tool that would warn us.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
1 Undecidability Reading: Chapter 8 & 9. 2 Decidability vs. Undecidability There are two types of TMs (based on halting): (Recursive) TMs that always.
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
Theory of Computing Lecture 21 MAS 714 Hartmut Klauck.
Cs3102: Theory of Computation Class 14: Turing Machines Spring 2010 University of Virginia David Evans.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 16: Universality and Undecidability.
Aaron Bloomfield CS 4102 Spring 2011
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
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
Computability Review homework. Video. Variations. Definitions. Enumerators. Hilbert's Problem. Algorithms. Summary Homework: Give formal definition of.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
Pushdown Automata Chapter 12. Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2) Say yes or no,
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
 2005 SDU Lecture14 Mapping Reducibility, Complexity.
Chapters 11 and 12 Decision Problems and Undecidability.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
Decidability and Undecidability Proofs
The Acceptance Problem for TMs
CSE 105 theory of computation
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Lecture12 The Halting Problem
CSE 105 theory of computation
Summary.
Jaya Krishna, M.Tech, Assistant Professor
CS21 Decidability and Tractability
CS21 Decidability and Tractability
CSE 105 theory of computation
Turing -Recognizable vs. -Decidable
Cpt S 317: Spring 2009 Reading: Chapter 8 & 9
CSE 105 theory of computation
More Undecidable Problems
The Extended Chomsky Hierarchy Reloaded
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

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 Decidable Warning: Rice’s theorem applies to properties (i.e., sets of languages), not (directly to) TM’s or other object types!

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 Solutions to polynomials N-body problems Fluid dynamics Compressibility Enscheidungsproblem M w x

Recognizing vs. Deciding Turing-decidable: 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. Turing-recognizable: A language L is “Turing-recognizable” if there exists a TM M such that for all strings w: If w  L eventually M enters q accept If w  L either M enters q reject or M never terminates “Computable” “Non-Computable”

Recognizable Languages Revised Hierarchy Decidable Languages Regular Languages CFLs finite Languages Deterministic CFLs Computable Non- Computable

Example of a Recognizable Language The Halting Problem, or A TM Algorithm: Universal Turing Machine. Universal Turing Machine M w Output Tape for running TM- M starting on tape w

Closure Properties of Recognizable Languages Theorem: The recognizable languages are closed under . 1.Copy input 2.Run machine 1 on copy of input (never cross $) 1.If reject then move into reject state 3.Erase everything to right of $ 4.Run machine 2 abba$abba input copy M1 M2

Closure Properties of Recognizable Languages Theorem: The recognizable languages are closed under union. 1.Copy input 2.Run machine 1 on copy of input (never cross $) 1.If accept then move into accept state 3.Erase everything to right of $ 4.Run machine 2 Problem: What if the machine runs forever?

Closure Properties of Recognizable Languages Theorem: The recognizable languages are closed under union. 1.Copy input to second tape 2.Run machine 1 on tape 1, machine 2 on tape 2 “in parallel”, “time-multiplexed” 1.If either accept then move into accept state M1 M2 Time Accept!

Closure Properties of Recognizable Languages Theorem: The recognizable languages are closed under concat. Using non-determinism: Tape 1: input Tape 2: tape for Machine 1 Tape 3: tape for Machine 2 Copy some characters from the first tape to tape 2 Nondeterminstically decide when to copy the rest onto tape 3 abba ab ba “choose” Non- deterministically!

Closure Properties of Recognizable Languages Theorem: The recognizable languages are closed under Kleene star. Similar to concatenation, but now we also try all possible numbers of concatenations. Non-deterministically insert $’s into the input. The machine must accept each of these substrings. a$bb$a Inserted Non- deterministically! Each substring then used as input to the machine

Closure Properties of Recognizable Languages Theorem: The recognizable languages are not closed under complement. Hint: reduction from halting problem. This one takes some new tools

Co-Recognizable Languages Turing-recognizable: A language L is “Turing-recognizable” if there exists a TM M such that for all strings w: If w  L eventually M enters q accept If w  L either M enters q reject or M never terminates Co-Turing-recognizable: A language L is “Co-Turing-recognizable” if there exists a TM M such that for all strings w: If w  L eventually M enters q accept If w  L either M enters q reject or M never terminates

Closure Properties of Recognizable Languages Theorem: If a language is both Recognizable and Co-Recognizable then it is decidable. Proof: Let M1 be a recognizer for L, M2 be a Co-Recognizer for L. We build MD, a Decider for L: Simulate M1 and M2 “in parallel” (time multiplexed)on input w. If M1 accepts then accept, else if M2 accepts, then reject. Every string will be accepted by exactly one machine in finite time. M1 M2 Time Reject!

Closure Properties of Recognizable Languages

Oracles Originated in Turing’s Ph.D. thesis Named after the “Oracle of Apollo” at Delphi, ancient Greece Black-box subroutine / language Can compute arbitrary functions Instant computations “for free” Can greatly increase computation power of basic TMs E.g., oracle for halting problem

The “Oracle of Omaha”

The “Oracle” of the Matrix

A special case of “hyper-computation” Allows “what if” analysis: assumes certain undecidable languages can be recognized An oracle can profoundly impact the decidability & tractability of a language Any language / problem can be “relativized” WRT an arbitrary oracle Undecidability / intractability exists even for oracle machines! Turing Machines with Oracles Theorem [Turing]: Some problems are still not computable, even by Turing machines with an oracle for the halting problem!

Reaching a Contradiction What happens if we run D on its own description, ? Define D ( ) = Construct a TM that: Outputs the opposite of the result of simulating H on input (M, ) Assume there exists some TM H that decides A TM. If M accepts its own description, D( ) rejects. If M rejects its own description, D( ) accepts. If D accepts its own description, D( ) rejects. If D rejects its own description, D( ) accepts. substituting D for M… M* is Relativized to O H* is Relativized to O D* is Relativized to O * * * * * * * * * * * * * * * * * * * * *

Ø Turing (1937); studied by Post (1944) and Kleene (1954) Quantifies the non-computability (i.e., algorithmic unsolvability) of (decision) problems and languages Some problems are “more unsolvable” than others! Turing Degrees Emil Post Alan Turing Stephen Kleene Students of Alonzo Church: H H H*H* Turing degree 0 Turing degree 1 Turing degree 2 Defines computation “relative” to an oracle. “Relativized computation” - an infinite hierarchy! A “relativity theory of computation”! Georg Cantor Diagonalization

Turing degree of a set X is the set of all Turing-equivalent (i.e., mutually-reducible) sets: an equivalence class [X] Turing degrees form a partial order / join-semilattice [0]: the unique Turing degree containing all computable sets For set X, the “Turing jump” operator X’ is the set of indices of oracle TMs which halt when using X as an oracle [0’]: Turing degree of the halting problem H; [0’’]: Turing degree of the halting problem H* for TMs with oracle H. Turing Degrees Emil Post Alan Turing Stephen Kleene Students of Alonzo Church: Turing jump Turing jump

Turing Degrees Emil Post Alan Turing Stephen Kleene Students of Alonzo Church: Turing jump Turing jump Each Turing degree is countably infinite (has exactly  0 sets) There are uncountably many (2  0 ) Turing degrees A Turing degree X is strictly smaller than its Turing jump X’ For a Turing degree X, the set of degrees smaller than X is countable; set of degrees larger than X is uncountable (2  0 ) For every Turing degree X there is an incomparable degree (i.e., neither X  Y nor Y  X holds). There are 2  0 pairwise incomparable Turing degrees For every degree X, there is a degree D strictly between X and X’ so that X < D < X’ (there are actually  0 of them) The structure of the Turing degrees semilattice is extremely complex!

PSPACE-complete QBF The Extended Chomsky Hierarchy Finite {a,b} Regular a* Det. CF a n b n Context-free ww R PanbncnPanbncn NP PSPACE EXPSPACE Recognizable Not Recognizable H H Decidable Presburger arithmetic NP-complete SAT Not finitely describable  ** EXPTIME EXPTIME-complete Go EXPSPACE-complete =RE  Turing Context sensitive LBA H* degrees