Automata, Grammars and Languages

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,
Variants of 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.
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]
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.
1 Introduction to Computability Theory Lecture14: Recap 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.
Fall 2004COMP 3351 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 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Homework #9 Solutions.
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
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.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
 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.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 7 Undecidability cont. Jan Maluszynski, IDA, 2007
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.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
Decidability and Undecidability Proofs
CIS Automata and Formal Languages – Pei Wang
The Halting Problem.
Busch Complexity Lectures: Reductions
Reductions.
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
Automata, Grammars and Languages
LIMITS OF ALGORITHMIC COMPUTATION
CSE 105 theory of computation
Turing Machines Acceptors; Enumerators
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
CSE 105 theory of computation
Jaya Krishna, M.Tech, Assistant Professor
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
CSCI 2670 Introduction to Theory of Computing
Decidable Languages Costas Busch - LSU.
Undecidable problems:
Proposed in Turing’s 1936 paper
CSE 105 theory of computation
Instructor: Aaron Roth
More undecidable languages
Turing -Recognizable vs. -Decidable
CSE 311: Foundations of Computing
Decidability continued….
Instructor: Aaron Roth
Instructor: Aaron Roth
Automata, Grammars and Languages
More Undecidable Problems
CSE 105 theory of computation
Lecture 4: Unsolvable Problems
CIS Automata and Formal Languages – Pei Wang
CSE 105 theory of computation
Presentation transcript:

Automata, Grammars and Languages C SC 473 Automata, Grammars and Languages 9/12/2018 Automata, Grammars and Languages Discourse 08 Rice’s Theorem C SC 473 Automata, Grammars and Languages

Predicates, Properties and Sets predicate, n. 1. Logic. That which is predicated or said of the subject in a proposition; the second term of a proposition, which is affirmed or denied of the first term by means of the copula, as in ‘paper is white’, ‘ink is not white’. 2. a. Gram. The statement made about a subject, including the logical copula (`is’, `are’, etc.). b. Math. An assertion or propositional function. c. Synonyms: `assertion’, `proposition’ Mathematically: a function which returns a truth-value (true or false). If the function P returns `true’ for an argument x, this indicates the property holds for that x: Predicates can be about objects of any universe: C SC 473 Automata, Grammars and Languages

Predicates, Properties and Sets property: the quality or attribute that is asserted to hold by a predicate, as in `whiteness (or white) is a property of paper’, `blackness (or black) is a property of ink’. Used synonymously with quality or attribute. A property of Turing-recognizable sets is defined by a predicate on Turing-recognizable sets. example: the property of “emptiness” for a language is defined by the predicate P (L )  [ L = ]. C SC 473 Automata, Grammars and Languages

Rice’s Theorem A machine tool for proving problems undecidable Any property of TMs that can be expressed as a property of languages [a machine independent property] is undecidable—except trivial properties. Trivial property: a property true for all Turing-recognizable sets, or for none. Michine independent properties: “the language accepted by M is a regular set.” Machine dependent properties C SC 473 Automata, Grammars and Languages

Rice’s Theorem (cont.) Theorem (Rice’s Theorem). The language is decidable iff P is a trivial property. (Hence no non-trivial property of the Turing-recognizable sets can be decided.) Proof: (). If P is true for all TMs M, then is decidable. If P is false for all TMs then is decidable. (  ). (contrapositive). Assume that P is non-trivial. Without loss of generality, we can assume that [ For if not, we can use the property and show that the complementary language is undecidable.] C SC 473 Automata, Grammars and Languages

Rice’s Theorem (cont.) Since property P is non-trivial, there is some recognizable language B with Our goal is to reduce to To prove we assume there is a decider for and from it plus a reduction function, construct a decider for . What is decider good at? Given an input it can tell whether M has property P or not. Our reduction function (“program translator”) will transform a pair to a program having “dual” behavior: if M accepts w then behaves like an acceptor for B; otherwise it behaves like an acceptor for . Since B has the property P while  does not, the decider will say “yes” iff M accepts w. C SC 473 Automata, Grammars and Languages

Rice’s Theorem (cont.) Construct from input a transformed program so that the following holds: Here is what the “translator” C constructs: Note: if then: if then : So (*) holds as desired. With this reduction function, we proceed to the reduction itself. yes yes start C SC 473 Automata, Grammars and Languages

C SC 473 Automata, Grammars and Languages Rice’s Theorem (Cont.) 9/12/2018 Reduction: Suppose there is a decider for Since the language is undecidable, so must be undecidable.  yes yes no no C SC 473 Automata, Grammars and Languages

Rice’s Theorem (Cont.) Corollary: Given a TM M the following properties of the language L(M) are all undecidable: Is L(M) empty? Is L(M) finite? Is L(M) regular? Is L(M) a CFL? Is the string foo  L(M) ? Does L(M) have more than 3 members? Does L(M) have fewer than 10 members? … C SC 473 Automata, Grammars and Languages

Machine-Dependent Problems Not all problems about TM-recognizable sets can be settled by Rice’s Theorem Rice’s Theorem only applies to properties of languages recognized Properties of the TM itself might be decidable or undeciable—the approach has to be ad hoc. Ex: Given a TM M, does it have an even number of states? Easily decidable Ex: Given TM M,q. Is there any configuration with p  q yielding a configuration with state q? Decidable. If there is a transition in  of form (p,a) = (q,-,-), pq, then yes else no. (We do not require any of these configurations to be reachable from the initial configuration.) C SC 473 Automata, Grammars and Languages

Machine-Dependent Problems Ex: Undecidable Machine-Dependent Problem Predicate: Given TM M with ={0,1,blank}, does it ever print 3 consequtive 1’s on its tape (for any input). Reduction: reduction func. in 2 stages. uses 01 for 0 and 10 for 1, making changes in the rules accordingly. When M has a 0 in cell j then has a 0 in cell 2j and a 1 in cell 2j+1 (never a 111 on tape) modifies so that if accepts, prints 111 and halts in the accept state. prints 111  accepts   accepts   C SC 473 Automata, Grammars and Languages