February 1, 2016CS21 Lecture 121 CS21 Decidability and Tractability Lecture 12 February 1, 2016.

Slides:



Advertisements
Similar presentations
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,
Advertisements

Pushdown Automata Chapter 12. Recognizing Context-Free Languages We need a device similar to an FSM except that it needs more power. The insight: Precisely.
February 6, 2015CS21 Lecture 141 CS21 Decidability and Tractability Lecture 14 February 6, 2015.
Reducibility 2 Theorem 5.1 HALT TM is undecidable.
CS21 Decidability and Tractability
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Introduction to Computability Theory
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.
1 … NPDAs continued. 2 Pushing Strings Input symbol Pop symbol Push string.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
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.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2009 with acknowledgement.
January 14, 2015CS21 Lecture 51 CS21 Decidability and Tractability Lecture 5 January 14, 2015.
Linear Bounded Automata LBAs
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG)
January 15, 2014CS21 Lecture 61 CS21 Decidability and Tractability Lecture 6 January 16, 2015.
CS21 Decidability and Tractability
February 4, 2015CS21 Lecture 131 CS21 Decidability and Tractability Lecture 13 February 4, 2015.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
Decidability A decision problem is a problem with a YES/NO answer. We have seen decision problems for - regular languages: - context free languages: [Sections.
Pushdown Automata (PDA) Intro
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Pushdown Automata (PDAs)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 5 Reducibility 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,
Lecture 11  2004 SDU Lecture7 Pushdown Automaton.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
PDAs Accept Context-Free Languages
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Reductions Costas Busch - LSU.
CS21 Decidability and Tractability
Intro to Theory of Computation
Chapter 7 PUSHDOWN AUTOMATA.
MCC 2093 Advanced Theoretical Computer Science
LIMITS OF ALGORITHMIC COMPUTATION
Post Machine.
NPDAs Accept Context-Free Languages
Intro to Theory of Computation
Turing acceptable languages and Enumerators
Summary.
Jaya Krishna, M.Tech, Assistant Professor
CS154, Lecture 8: Undecidability, Mapping Reductions
CS154, Lecture 8: Undecidability, Mapping Reductions
CS21 Decidability and Tractability
Decidable Languages Costas Busch - LSU.
Turing acceptable languages and Enumerators
Reducability Sipser, pages
CS21 Decidability and Tractability
CS21 Decidability and Tractability
CS21 Decidability and Tractability
CS21 Decidability and Tractability
CS21 Decidability and Tractability
Decidability and Tractability
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
CS21 Decidability and Tractability
… NPDAs continued.
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Instructor: Aaron Roth
Subject Name: FORMAL LANGUAGES AND AUTOMATA THEORY
Decidability continued….
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Pushdown automata Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Presentation transcript:

February 1, 2016CS21 Lecture 121 CS21 Decidability and Tractability Lecture 12 February 1, 2016

CS21 Lecture 122 Outline undecidable problems –computation histories –surprising contrasts between decidable/undecidable Rice’s Theorem Post Correspondence problem

February 1, 2016CS21 Lecture 123 Definition of reduction More refined notion of reduction: –“many-one” reduction (commonly) –“mapping” reduction (book) yes no yes no AB reduction from language A to language B f f

February 1, 2016CS21 Lecture 124 Definition of reduction function f should be computable Definition: f : Σ*→ Σ* is computable if there exists a TM M f such that on every w  Σ* M f halts on w with f(w) written on its tape. yes no yes no AB f f

February 1, 2016CS21 Lecture 125 Dec. and undec. problems the boundary between decidability and undecidability is often quite delicate –seemingly related problems –one decidable –other undecidable We will see two examples of this phenomenon next.

February 1, 2016CS21 Lecture 126 Computation histories Recall configuration of a TM: string uqv with u,v   *, q  Q The sequence of configurations M goes through on input w is a computation history of M on input w –may be accepting, or rejecting –reserve the term for halting computations –nondeterministic machines may have several computation histories for a given input.

February 1, 2016CS21 Lecture 127 Linear Bounded Automata LBA definition: TM that is prohibited from moving head off right side of input. –machine prevents such a move, just like a TM prevents a move off left of tape How many possible configurations for a LBA M on input w with |w| = n, m states, and p = |  | ? –counting gives: mnp n

February 1, 2016CS21 Lecture 128 Dec. and undec. problems two problems we have seen with respect to TMs, now regarding LBAs: –LBA acceptance: A LBA = { : LBA M accepts input w} –LBA emptiness: E LBA = { : LBA M has L(M) = Ø} Both decidable? both undecidable? one decidable?

February 1, 2016CS21 Lecture 129 Dec. and undec. problems Theorem: A LBA is decidable. Proof: –input where M is a LBA –key: only mnp n configurations –if M hasn’t halted after this many steps, it must be looping forever. –simulate M for mnp n steps –if it halts, accept or reject accordingly, –else reject since it must be looping

February 1, 2016CS21 Lecture 1210 Dec. and undec. problems Theorem: E LBA is undecidable. Proof: –reduce from co-A TM (i.e. show co-A TM ≤ m E LBA ) –what should f( ) produce? –Idea: produce LBA B that accepts exactly the accepting computation histories of M on input w

February 1, 2016CS21 Lecture 1211 Dec. and undec. problems Proof: –f( ) = described below on input x, check if x has form #C 1 #C 2 #C 3 #...#C k # check that C 1 is the start configuration for M on input w check that C i  1 C i+1 check that C k is an accepting configuration for M is B an LBA? is f computable? YES maps to YES?  co-A TM  f(M, w)  E LBA NO maps to NO?  co-A TM  f(M, w)  E LBA

February 1, 2016CS21 Lecture 1212 Dec. and undec. problems two problems regarding Context-Free Grammars: –does a CFG generate all strings: ALL CFG = { : G is a CFG and L(G) = Σ*} –CFG emptiness: E CFG = { : G is a CFG and L(G) = Ø} Both decidable? both undecidable? one decidable?

February 1, 2016CS21 Lecture 1213 Dec. and undec. problems Theorem: E CFG is decidable. Proof: –observation: for each nonterminal A, the set S A = {w : A  * w} is non-empty iff there is some rule: A → x and  non-terminals B in string x, S B  Ø

February 1, 2016CS21 Lecture 1214 Dec. and undec. problems Proof: –on input –mark all terminals in G –repeat until no new non-terminals get marked: if there is a production A→x 1 x 2 x 3 …x k and each symbol x 1, x 2, …, x k has been marked then mark A –if S marked, reject (G  E CFG ), else accept (G 2 E CFG ). –terminates? correct?

February 1, 2016CS21 Lecture 1215 Dec. and undec. problems Theorem: ALL CFG is undecidable. Proof: –reduce from co-A TM ( i.e. show co-A TM ≤ m ALL CFG ) –what should f( ) produce? –Idea: produce CFG G that generates all strings that are not accepting computation histories of M on w

February 1, 2016CS21 Lecture 1216 Dec. and undec. problems Proof: –build a NPDA, then convert to CFG –want to accept strings not of this form, #C 1 #C 2 #C 3 #...#C k # plus strings of this form but where C 1 is not the start config. of M on input w, or C k is not an accept. config. of M on input w, or C i does not yield in one step C i+1 for some i

February 1, 2016CS21 Lecture 1217 Dec. and undec. problems Proof: –our NPDA nondeterministically checks one of: C 1 is not the start config. of M on input w, or C k is not an accept. config. of M on input w, or C i does not yield in one step C i+1 for some i input has fewer than two #’s –details of first two? –to check third condition: nondeterministically guess C i starting position how to check that C i doesn’t yield in 1 step C i+1 ?

February 1, 2016CS21 Lecture 1218 Dec. and undec. problems Proof: –checking: C i does not yield in one step C i+1 for some i –push C i onto stack –at #, start popping C i and compare to C i+1 accept if mismatch away from head location, or symbols around head changed in a way inconsistent with M’s transition function. –is everything described possible with NPDA?

February 1, 2016CS21 Lecture 1219 Dec. and undec. problems Proof: –Problem: cannot compare C i to C i+1 –could prove in same way that proved {ww: w  Σ*} not context-free –recall that {ww R : w  Σ*} is context-free –free to tweak construction of G in the reduction –solution: write computation history: #C 1 #C 2 R #C 3 #C 4 R...#C k #

February 1, 2016CS21 Lecture 1220 Dec. and undec. problems Proof: –f( ) = equiv. to NPDA below: on input x, accept if not of form: #C 1 #C 2 R #C 3 #C 4 R...#C k # accept if C 1 is the not the start configuration for M on input w accept if check that C i does not yield in one step C i+1 accept if C k is not an accepting configuration for M is f computable? YES maps to YES?  co-A TM  f(M, w)  ALL CFG NO maps to NO?  co-A TM  f(M, w)  ALL CFG