 2005 SDU Lecture11 Decidability.  2005 SDU 2 Topics Discuss the power of algorithms to solve problems. Demonstrate that some problems can be solved.

Slides:



Advertisements
Similar presentations
Applied Computer Science II Chapter 4: Decidability Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany.
Advertisements

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
CSE 311 Foundations of Computing I
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Closure Properties of CFL's
Summary Showing regular Showing non-regular construct DFA, NFA
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.
1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
Decidable languages Sipser 4.1 (pages ). CS 311 Mount Holyoke College 2 Hierarchy of languages All languages Turing-recognizable Turing-decidable.
CS5371 Theory of Computation
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata (cont.) Prof. Amos Israeli.
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.
Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.
Decidable and undecidable problems deciding regular languages and CFL’s Undecidable problems.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 4 Context-free grammars Jan Maluszynski, IDA, 2007
CS 310 – Fall 2006 Pacific University CS310 Decidability Section 4.1/4.2 November 10, 2006.
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
Foundations of (Theoretical) Computer Science Chapter 4 Lecture Notes (Section 4.1: Decidable Languages) David Martin With modifications.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
Remaining Topics Decidability Concept 4.1 The Halting Problem 4.2
Pushdown Automata (PDAs)
Computer Language Theory
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
Decidable languages Section 4.1 CSC 4170 Theory of Computation.
CSCI 2670 Introduction to Theory of Computing October 12, 2005.
 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.
The decidability of Presburger Arithmetic By Guillermo Guillen 04/13/05 Dr. Smith COT 6421 FIU Spring 2005.
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 Physics North Carolina Central University 1 Chapter 2 Context-Free Languages Some slides are in courtesy.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
 2004 SDU Lecture4 Regular Expressions.  2004 SDU 2 Regular expressions A third way to view regular languages. Say that R is a regular expression if.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Decidable.
Lecture 11  2004 SDU Lecture7 Pushdown Automaton.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Standard Representations of Regular Languages
CSE 105 theory of computation
BCS 2143 Theory of Computer Science
CSE 2001: Introduction to Theory of Computation Fall 2013
CSCI 2670 Introduction to Theory of Computing
Chapter 2 FINITE AUTOMATA.
CSE 105 theory of computation
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Intro to Theory of Computation
Jaya Krishna, M.Tech, Assistant Professor
Decidable Languages Costas Busch - LSU.
CSC 4170 Theory of Computation Decidable languages Section 4.1.
Decidable and undecidable languages
Theory of Computability
Theory of Computability
Theory of Computability
CSE 105 theory of computation
Automata, Grammars and Languages
Intro to Theory of Computation
CSE 105 theory of computation
Presentation transcript:

 2005 SDU Lecture11 Decidability

 2005 SDU 2 Topics Discuss the power of algorithms to solve problems. Demonstrate that some problems can be solved by algorithms while other cannot. Explore the limits of algorithmic solvability. Demonstrate the un-solvability of certain problems.

 2005 SDU 3 Example problems Consider the acceptance problem for DFAs: test whether a particular finite automaton accepts a given string. This can be expressed as a language A DFA. A DFA contains the encodings of all DFAs together with strings the DFAs accept, i.e., A DFA ={ | B is a DFA that accepts w} Hence, testing whether DFA B accepts w is the same as testing whether  A DFA.

 2005 SDU 4 Decidability related to DFA A DFA is a decidable language Proof idea: construct a TM M that decides A DFA M=“On input, where B is a DFA and w is a string: 1.Simulate B on w; 2.If the simulation ends in an accept state then accept; if it ends in a non-accept state then reject.” Note: w is finite and simulation always ends.

 2005 SDU 5 Decidability related to NFA A NFA = { | B is an NFA that accepts string w} is decidable. N = “On input, where B is an NFA and w is a string: 1.Convert NFA B to a DFA C; 2.Run TM M on ; 3.If M accepts, accept; otherwise reject.” Note: running M in stage 2 means incorporating M into the design of N as a sub-procedure, where M is the decider of A DFA.

 2005 SDU 6 Concerning regular expression A REX = { | R is a regular expression that yields string w} Conclusion: A REX is a decidable language. The following TM P decides A REX P=“On input, where R is a regular expression and w is a string 1.Convert R to an equivalent DFA A; 2.Run TM M on input ; 3.If M accepts, accept; if M rejects, reject.”

 2005 SDU 7 Emptiness problem E DFA = { | A is a DFA and L(A)=  } is decidable. Proof idea: A DFA accepts some string iff reaching a final state from the start state by traveling along the arrows of the DFA is possible. To test this condition we can construct the TM T that marks states of DFA using the state transition function of the DFA. Use T to solve the emptiness problem. T = “On input, where A is a DFA: 1.Mark the start state of A 2.Repeat until no new states get marked: –Mark any state that has a transition coming into it from any state that is already marked. 3.If no final state is marked, accept; otherwise, reject. ”

 2005 SDU 8 Language equality The problem: for two DFA-s A and B, is L(A) = L(B)? The language: EQ DFA = { | A and B are DFAs and L(A) = L(B)} EQ DFA is decidable. Proof idea: 1.Construct a DFA C from A and B where C accepts only those strings that are accepted either by A or B but not by both. 2.If A and B recognize the same language, then C accepts nothing. 3.The language of C is defined by, which is called the symmetric difference of L(A) and L(B) 4. Use T to check whether L(C) is empty.

 2005 SDU 9 Decide language equality F = “On input, where A and B are DFAs: 1.Construct DFA C that recognizes L(C) as described above; 2.Run TM T on input ; 3.If T accepts, accept; if T rejects, reject.”

 2005 SDU 10 String generation problem Problem: For a given CFG grammar G =(V, , R, S) and a string w  *, does G generates w (i.e., is S=>*w true?) Language: A CFG ={ | G is a CFG that generates string w} A CFG is decidable.

 2005 SDU 11 Decidability concerning CFG Proof idea: For a CFG G and a string w: First idea: Go through all derivations generated by G checking whether any is a derivation of w.  Since there are infinitely many derivations this idea does not work. If G does not generates w, the algorithm does not halt, i.e., this idea provides a recognizer but not a decider. If G is a CFG in Chomsky normal form then for any w  L(G), where |w|=n, exactly 2n-1 steps are required for any derivation of w. Proof. Derivation rules of a Chomsky normal form are of the forms: A  A 1 A 2 |A  a. The rule A  A 1 A 2 adds 1 to the length of w. That is if |w|=n, then S=>A 1 A 2 =>A 1 A 2 A 3 =>…A 1 A 2 …A n, using n-1 steps. To eliminate A 1, A 2, …, A n by rules of the from A  a we need another n steps. Hence, only 2n-1 steps are required.

 2005 SDU 12 Decide A CFG The TM S that decides A CFG is: S = “On input, where G is a CFG and w is a string: 1.Convert G to an equivalent grammar in Chomsky normal form; 2.List all derivations with 2n-1 steps, n = length (w) except if n  1; for n  1 list all derivations with 1 step; 3. If any of the derivations listed above generates w, accept; if not, reject.” Theorem 2.12 provides a mechanism to convert a CFG into a PDA and vice versa; hence, everything about decidability of problems concerning CFG applies equally to PDA.

 2005 SDU 13 Decide CFL Every CFL is decidable Proof. Let A be a CFL and G be a CFG for A. Design a TM M G that decides A. We build a copy of G into M G. M G =“On input w: 1. Run TM S on input 2. If S accepts, accept, if it rejects, reject.” regular Context free decidable recognizable