Decidable languages Section 4.1 CSC 4170 Theory of Computation.

Slides:



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

CSE 311 Foundations of Computing I
Variants of Turing machines
1 CSC3130 Formal Languages and Automata Theory Tutorial 9 Undecidable Problem KN Hung SHB 1026.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Reducibility Sipser 5.1 (pages ).
Decidable languages Sipser 4.1 (pages ). CS 311 Mount Holyoke College 2 Hierarchy of languages All languages Turing-recognizable Turing-decidable.
CSCI 2670 Introduction to Theory of Computing October 19, 2005.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Fall 2006Costas Busch - RPI1 Regular Expressions.
CS 310 – Fall 2006 Pacific University CS310 Converting NFA to DFA Sections:1.2 Page 54 September 15, 2006.
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.
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.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
1 Non-Deterministic Automata Regular Expressions.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Costas Busch - LSU1 Non-Deterministic Finite Automata.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
Prof. Busch - LSU1 NFAs accept the Regular Languages.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
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.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 7 Undecidability cont. Jan Maluszynski, IDA, 2007
CSCI 2670 Introduction to Theory of Computing September 13.
Regular Expressions Costas Busch - LSU.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
 2005 SDU Lecture11 Decidability.  2005 SDU 2 Topics Discuss the power of algorithms to solve problems. Demonstrate that some problems can be solved.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Decidable.
Turing Machines- Cont. Theory of Computation Lecture 11 Tasneem Ghnaimat.
Theory of Computability
Non Deterministic Automata
CSCI 2670 Introduction to Theory of Computing
Busch Complexity Lectures: Reductions
Reductions Costas Busch - LSU.
Theory of Computability
CSE 2001: Introduction to Theory of Computation Fall 2013
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
Intro to Theory of Computation
Jaya Krishna, M.Tech, Assistant Professor
Non-Deterministic Finite Automata
Non-Deterministic Finite Automata
CSCI 2670 Introduction to Theory of Computing
Non Deterministic Automata
CSC 4170 Theory of Computation Decidable languages Section 4.1.
Decidable and undecidable languages
CSCI 2670 Introduction to Theory of Computing
Undecidable problems:
CSCI 2670 Introduction to Theory of Computing
CSC 4170 Theory of Computation Mapping Reducibility Section 5.3.
Theory of Computability
CSCI 2670 Introduction to Theory of Computing
Theory of Computability
Theory of Computability
CSC 4170 Theory of Computation Mapping Reducibility Section 5.3.
Theory of Computability
CSE 105 theory of computation
Automata, Grammars and Languages
CSCI 2670 Introduction to Theory of Computing
Intro to Theory of Computation
CSE 105 theory of computation
Presentation transcript:

Decidable languages Section 4.1 CSC 4170 Theory of Computation

Examples of decidable languages 4.1.a Decidable: {1,3,5}  {x | x is even} {x | x is a perfect square} {x | x 2 -10x = 0} {x | x=y * z for some integers y,z>1 (i.e. x is not prime)} {x | x is a prime (i.e. x is not divisible by anything except 1 and itself)} { | G is a connected graph} { | P is a one-variable polynomial expression with an integral root} Undecidable: { | P is a two-variable polynomial expression with an integral root}

The acceptance problem for DFAs is decidable 4.1.b Theorem 4.1: A DFA is a decidable language. Let A DFA = { | B is a DFA that accepts input string w} Proof idea: Here is a Turing machine M that decides A DFA : M = “On input, where B is a DFA and w is a string: 1. Simulate B on input w. 2. If the simulation ends in an accept state, accept. If the simulation ends in a nonaccept state, reject.”

The acceptance problem for NFAs is decidable 4.1.c Theorem 4.2: A NFA is a decidable language. Let A NFA = { | B is an NFA that accepts input string w} Proof idea: Here is a Turing machine N that decides A NFA : N = “On input, where B is an NFA and w is a string: 1. Convert NFA B to an equivalent DFA C using the procedure for this conversion that we learned. 2. Run TM M from Theorem 4.1 on input. 3. If M accepts, accept. If M rejects, reject.”

The string generation problem for REs is decidable 4.1.d Theorem 4.3: A REX is a decidable language. Let A REX = { | R is a regular expression that generates string w} Proof idea: Here is a Turing machine P that decides A REX : P = “On input, where R is a regular expression and w is a string: 1. Convert R to an equivalent NFA B using the procedure for this conversion that we learned. 2. Run TM N from Theorem 4.2 on input. 3. If N accepts, accept. If N rejects, reject.”

The emptiness problem for the language of a DFA is decidable 4.1.e Theorem 4.4: E DFA is a decidable language. Let E DFA = { | A is a DFA and L(A)=  } Proof idea: Here is a Turing machine T that decides E DFA : T = “On input, where A is a DFA: 1. Mark the start state of A. 2. Repeat until no new states get marked: 3. Mark any state that has a transition coming into it from any state that is already marked. 4. If no accept state is marked, accept; otherwise reject.”

Other decidable problems from the language theory 4.1.f Each the following languages are also decidable: EQ DFA = { | A and B are DFAs and L(A)=L(B)} A CFG = { | G is a CFG that generates string w} Theorem 4.9: Every context-free language is decidable. Proof idea: Suppose L is a context-free language. Let G be the CFG that generates L, and S be a TM that decides A CFG. Here is a Turing machine H that decides L: H = “On input w: 1. Run S on input. 2. If the machine accepts, accept; if it rejects, reject.”