Turing -Recognizable vs. -Decidable

Slides:



Advertisements
Similar presentations
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Advertisements

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,
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.
Formal Languages: Review Alphabet: a finite set of symbols String: a finite sequence of symbols Language: a set of strings String length: number of symbols.
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]
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.
Computability and Complexity 5-1 Classifying Problems Computability and Complexity Andrei Bulatov.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
More Turing Machines Sipser 3.2 (pages ). CS 311 Fall Multitape Turing Machines Formally, we need only change the transition function to.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Reducibility Sipser 5.1 (pages ).
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 ).
More Turing Machines Sipser 3.2 (pages ).
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
Mapping Reducibility Sipser 5.3 (pages ). CS 311 Fall Computable functions Definition 5.17: A function f:Σ*→Σ* is a computable function.
Fall 2004COMP 3351 Undecidable problems for Recursively enumerable languages continued…
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Reducibility A reduction is a way of converting one problem into another problem in such a way that a solution to the second problem can be used to solve.
Costas Busch - RPI1 Undecidable problems for Recursively enumerable languages continued…
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.
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
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.
Context-Free Grammars: Review Basic idea: set of production rules induces a language Finite set of variables: V = {V 1, V 2,..., V k } Finite set of terminals:
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
CSCI 2670 Introduction to Theory of Computing November 4, 2004.
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.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
1 The Halting Problem and Decidability How powerful is a TM? Any program in a high level language can be simulated by a TM. Any algorithmic procedure carried.
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
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.
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
Lecture 21 Reducibility. Many-one reducibility For two sets A c Σ* and B c Γ*, A ≤ m B if there exists a Turing-computable function f: Σ* → Γ* such that.
Formal Languages Alphabet: a finite set of symbols String: a finite sequence of symbols Language: a (possibly  ) set of strings String length: number.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
Decidability Decidable/Undecidable problems. Jaruloj Chongstitvatana Decidability2 Accepting: Definition Let T = (Q, , , , s) be a TM. T accepts.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Chapters 11 and 12 Decision Problems and Undecidability.
Recursively Enumerable Languages
CSCI 2670 Introduction to Theory of Computing
Busch Complexity Lectures: Reductions
Reductions Costas Busch - LSU.
Theory of Computation CS302 – Spring 2009
CSCI 2670 Introduction to Theory of Computing
Decidable Languages Costas Busch - LSU.
Decidability and Undecidability
Undecidable problems:
Proposed in Turing’s 1936 paper
Turing -Recognizable vs. -Decidable
Instructor: Aaron Roth
More Undecidable Problems
Turing -Recognizable vs. -Decidable
Presentation transcript:

Turing -Recognizable vs. -Decidable √ Accept & halt ´ Reject & halt Never runs forever w→ Input Def: A language is Turing-decidable iff it is exactly the set of strings accepted by some always-halting TM. wÎΣ* = a b aa ab ba bb aaa aab aba abb baa bab bba bbb aaaa … M(w)Þ √ ´ L(M) = { a, aa, aaa, …} Note: M must always halt on every input.

Turing -Recognizable vs. -Decidable √ Accept & halt ´ Reject & halt ≡ ∞ Run forever w→ Input Def: A language is Turing-recognizable iff it is exactly the set of strings accepted by some Turing machine. wÎΣ* = a b aa ab ba bb aaa aab aba abb baa bab bba bbb aaaa … M(w)Þ √ ´ ∞ L(M) = { a, aa, aaa, …} Note: M can run forever on an input, which is implicitly a reject (since it is not an accept).

Recognition vs. Enumeration Def: “Decidable” means “Turing-decidable” “Recognizable” means “Turing-recognizable” Theorem: Every decidable language is also recognizable. Theorem: Some recognizable languages are not decidable. Ex: The halting problem is recognizable but not decidable. Note: Decidability is a special case of recognizability. Note: It is easier to recognize than to decide.

Famous Deciders “A wrong decision is better than indecision.” “I'm the decider, and I decide what is best.”

Famous Deciders

Recognition and Enumeration Def: An “enumerator” Turing machine for a language L prints out precisely all strings of L on its output tape. b $ a Note: The order of enumeration may be arbitrary. Theorem: If a language is decidable, it can be enumerated in lexicographic order by some Turing machine. Theorem: If a language can be enumerated in lexicographic order by some TM, it is decidable.

Recognition and Enumeration Def: An “enumerator” Turing machine for a language L prints out precisely all strings of L on its output tape. b $ a Note: The order of enumeration may be arbitrary. Theorem: If a language is recognizable, then it can be enumerated by some Turing machine. Theorem: If a language can be enumerated by some TM, then it is recognizable.

√ ´ Decidability Accept & halt Reject & halt Never runs forever w→ Input Def: A language is Turing-decidable iff it is exactly the set of strings accepted by some always-halting TM. Theorem: The finite languages are decidable. Theorem: The regular languages are decidable. Theorem: The context-free languages are decidable.

A “Simple” Example Let S = {x3 + y3 + z3 | x, y, z Î ℤ } Q: Is S infinite? A: Yes, since S contains all cubes. Q: Is S Turing-recognizable? A: Yes, since dovetailing TM can enumerate S. Q: Is S Turing-decidable? A: Unknown! Q: Is 29ÎS? A: Yes, since 33+13+13=29 Q: Is 30ÎS? A: Yes, since (2220422932)3+(-2218888517)3+(-283059965)3=30 Q: Is 33ÎS? Theorem [Matiyasevich, 1970]: Hilbert’s 10th problem (1900), namely of determining whether a given Diophantine (i.e., multi-variable polynomial) equation has any integer solutions, is not decidable.

Reducibilities computable function/map ƒ:å*®å* where "w wÎA Û ƒ(w)ÎB Def: A language A is reducible to a language B if computable function/map ƒ:å*®å* where "w wÎA Û ƒ(w)ÎB Note: ƒ is called a “reduction” of A to B Denotation: A £ B Intuitively, A is “no harder” than B

Reducibilities computable function/map ƒ:å*®å* where "w wÎA Û ƒ(w)ÎB Def: A language A is reducible to a language B if computable function/map ƒ:å*®å* where "w wÎA Û ƒ(w)ÎB Theorem: If A £ B and B is decidable then A is decidable. Theorem: If A £ B and A is undecidable then B is undecidable. Note: be very careful about the direction!

Reduction Example 1 x Note: M’ is not run! Def: Let He be the halting problem for TMs running on w=e. “Does TM M halt on e?” He = { <M>Îå*| M(e) halts } Theorem: He is not decidable. Proof: Reduction from the Halting Problem H: Given an arbitrary TM M and input w, construct new TM M’ that if it ran on input x, it would: Overwrite x with the fixed w on tape; Simulate M on the fixed input w; Accept Û M accepts w. Note: M’ halts on e (and on any xÎå*) Û M halts on w. A decider (oracle) for He can thus be used to decide H! Since H is undecidable, He must be undecidable also. x M’ Ignore x Simulate M on w If M(w) halts then halt Note: M’ is not run!

Reduction Example 2 x Note: M’ is not run! Def: Let LØ be the emptyness problem for TMs. “Is L(M) empty?” LØ = { <M>Îå*| L(M) = Ø } Theorem: LØ is not decidable. Proof: Reduction from the Halting Problem H: Given an arbitrary TM M and input w, construct new TM M’ that if it ran on input x, it would: Overwrite x with the fixed w on tape; Simulate M on the fixed input w; Accept Û M accepts w. Note: M’ halts on every xÎå* Û M halts on w. A decider (oracle) for LØ can thus be used to decide H! Since H is undecidable, LØ must be undecidable also. x M’ Ignore x Simulate M on w If M(w) halts then halt Note: M’ is not run!

Reduction Example 3 x Note: M’ is not run! Def: Let Lreg be the regularity problem for TMs. “Is L(M) regular?” Lreg = { <M>Îå*| L(M) is regular } Theorem: Lreg is not decidable. Proof: Reduction from the Halting Problem H: Given an arbitrary TM M and input w, construct new TM M’ that if it ran on input x, it would: Accept if xÎ0n1n Overwrite x with the fixed w on tape; Simulate M on the fixed input w; Accept Û M accepts w. Note: L(M’)=å* Û M halts on w L(M’)=0n1n Û M does not halt on w A decider (oracle) for Lreg can thus be used to decide H! x M’ Accept if xÎ0n1n Ignore x Simulate M on w If M(w) halts then halt Note: M’ is not run!

Rice’s Theorem The two trivial properties Def: Let a “property” P be a set of recognizable languages. Ex: P1={L | L is a decidable language} P2={L | L is a context-free language} P3={L | L = L*} P4={{e}} P5= Ø P6={L | L is a recognizable language} L is said to “have property P” iff LÎP Ex: (a+b)* has property P1, P2, P3 & P6 but not P4 or P5 {wwR} has property P1, P2, & P6 but not P3, P4 or P5 Def: A property is “trivial” iff it is empty or it contains all recognizable languages. The two trivial properties

Rice’s Theorem Proof: Pnone = Ø x Theorem: The two trivial properties are decidable. Proof: Pnone = Ø Pall={L | L is a recognizable language} Q: What other properties (other than Pnone and Pall) are decidable? A: None! x Mnone Ignore x Say “no” Stop no Mnone decides Pnone x Mall Ignore x Say “yes” Stop yes Mall decides Pall

Rice’s Theorem Theorem [Rice, 1951]: All non-trivial properties of the Turing-recognizable languages are not decidable. Proof: Let P be a non-trivial property. Without loss of generality assume ØÏP, otherwise substitute P’s complement for P in the remainder of this proof. Select LÎP (note that L ¹ Ø since ØÏP), and let ML recognize L (i.e., L(ML)=L ¹ Ø ). Assume (towards contradiction) that $ some TM MP that decides property P: x MP Does the language denoted by <x> have property P? no yes Note: x can be e.g., a TM description.

Rice’s Theorem Note: M’ is not run! w x Reduction strategy: use Mp to “solve” the halting problem. Recall that LÎP, and let ML recognize L (i.e., L(ML)=L ¹ Ø). Given an arbitrary TM M & string w, construct M’: M’ Note: M’ is not run! w M start halt yes ML x yes What is the language of M’? L(M’) is either Ø or L(ML)=L If M halts on w then L(M’)=L(ML)= L If M does not halt on w then L(M’)= Ø since ML never starts => M halts on w iff L(M’) has property P “Oracle” MP can determine if L(M’) has property P, and thereby “solve” the halting problem, a contradiction! MP Does the language denoted by <x> have property P? no yes

Rice’s Theorem Corollary: The following questions are not decidable: given a TM, is its language L: Empty? Finite? Infinite? Co-finite? Regular? Context-free? Inherently ambiguous? Decidable? L= å* ? L contains an odd string? L contains a palindrome? L = {Hello, World} ? L is NP-complete? L is in PSPACE? Warning: Rice’s theorem applies to properties (i.e., sets of languages), not (directly to) TM’s or other object types!