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.

Slides:



Advertisements
Similar presentations
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
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,
The Recursion Theorem Sipser – pages Self replication Living things are machines Living things can self-reproduce Machines cannot self reproduce.
Rice ’ s Theorem. Def: A property of the Turing-recognizable languages is simply a subset of all Turing- recognizable languages.
Turing -Recognizable vs. -Decidable
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]
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.
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 ).
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.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
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]
Recursively Enumerable and Recursive Languages
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Rules have form String of variables and terminals String of variables and terminals.
Decidable and undecidable problems deciding regular languages and CFL’s Undecidable problems.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
CHAPTER 4 Decidability Contents Decidable Languages
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Linear Bounded Automata LBAs
Homework #9 Solutions.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
CS21 Decidability and Tractability
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
1 Undecidability Reading: Chapter 8 & 9. 2 Decidability vs. Undecidability There are two types of TMs (based on halting): (Recursive) TMs that always.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
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 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
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.
Recursively Enumerable and Recursive Languages
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.
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Productions String of variables and terminals String of variables and terminals.
Undecidability and The Halting Problem
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets
Recursively Enumerable and Recursive Languages
CSCI 2670 Introduction to Theory of Computing
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Undecidable Problems Costas Busch - LSU.
CSCI 2670 Introduction to Theory of Computing
Reductions Costas Busch - LSU.
MCC 2093 Advanced Theoretical Computer Science
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Decidable Languages Costas Busch - LSU.
Proposed in Turing’s 1936 paper
Formal Languages, Automata and Models of Computation
CS21 Decidability and Tractability
CSCI 2670 Introduction to Theory of Computing
More undecidable languages
CSCI 2670 Introduction to Theory of Computing
More Undecidable Problems
Presentation transcript:

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 the set of all languages is uncountable Undecidability –We have seen that ATM is undecidable. –Let’s look at some more undecidable problems.

TM properties 2 kinds of TMs  2 kinds of languages. –Turing-recognizable (a.k.a. recursively enumerable) Example: A TM –Decidable (a.k.a. recursive) Example: 0* If L is decidable, then L’ is decidable. If L and L’ are both Turing-recognizable, then L is decidable. (since either L or L’ must accept) Therefore, the complement of A TM is not even Turing recognizable.

Decidable? for n = 3.. maxint: for each combo of (x, y, z) starting at 1: if (x n + y n == z n ) print (“hello, world”); Are we able to tell if this program will print “ hello, world ” or not? –Only since For 300 years we didn’t know. –Solving this problem in general (for any program) must be hard… but what if it could be done?

“hello, world” tester Suppose H can decide the question. Then we can create similar algorithm H2. –Returns “hello, world” instead of “no”. –Let’s run H2 on itself! H program & input Print “yes” Print “no” H2 Print “yes” Print “hello, world”

Regular? REG = “Is there an algorithm to determine if a TM recognizes a regular language?” Proof by contradiction, p. 191 Assume REG is decidable. –Then,  TM “R” that can tell if an input recognizes a regular language. –We’ll use R to solve the A TM problem by creating a decider S. –In other words: Machine R solves REG -- which implies existence of …. Machine S which solves A TM. –Do we understand the I/O of R and S?

Regular, continued Here is how to build machine S, which will “solve” A TM. Input to S is. Create a new TM “M2” –M2 sees if its input, x, is of the form 0 n 1 n. If so, M2 accepts x. –If x is not of the form 0 n 1 n, M2 runs T on w. If T accepts w, M2 accepts x. –Thus, L(M2) is either Σ*, if T accepts w, or 0 n 1 n. –The only way for M2 to accept Σ* is for T to accept w. Feed M2 into R. –If R says that M2 accepts a regular language, we can conclude T accepts w, so S can say “yes”, i.e. accept. Otherwise S rejects. –But S can’t exist. So we have a contradiction. REG undecidable.

Rice’s Theorem Any question Q about a TM language is undecidable. Proof by contradiction: Assume Q is decidable. Then  TM “QD” that –always halts, and –answers Q for any input TM it receives. Using QD, we can build a machine AD to decide A TM. (But we know that AD can’t exist, therefore QD can’t exist. That is the contradiction.)

Building TM “AD” AD will do the following: –Its input is. –Build a TM “Q1” that satisfies Q. –Build a TM “M2” whose input is x. M2 runs T on w. If T loops/rejects, M2 will loop/reject. If T accepts w, next run Q1 on x. M2 accepts if Q1 accepts. Note that L(M2) = L(Q1) if T accepts w. L(M2) =  if T does not accept w. In other words, if T accepts, then M2 satisfies Q. –Feed M2 into QD. If QD accepts, AD accepts. Otherwise AD rejects. Thus: QD is a decider  AD is a decider.

Glossary to proof Q = some question or property about a TM language QD = a TM that can decide Q Q1 = a TM for which Q is true, built inside AD A TM = the acceptance question for TM’s, already known to be undecidable AD = a hypothetical decider for A TM T = the TM input to AD w = the corresponding word also input to AD M2 = a second TM built inside AD Rice’s theorem is a little complex because  5 TM’s!

Examples Let Q = “Is the language infinite?” or …. “Does the language include 001?” “Is the language finite?” “Is the language nonregular?” Can also prove by contradiction: –Is it decidable to determine if one TM language is the subset of another?