CSCI 2670 Introduction to Theory of Computing

Slides:



Advertisements
Similar presentations
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Advertisements

1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
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.
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 310 – Fall 2006 Pacific University CS310 Decidability Section 4.1/4.2 November 10, 2006.
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.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
CSCI 2670 Introduction to Theory of Computing November 4, 2004.
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
Midterm 2 review Jundong Liu School of EECS
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.
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 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.
CSCI 2670 Introduction to Theory of Computing
Properties of Context-Free Languages
CSE 105 theory of computation
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
Linear Bounded Automata LBAs
CSCI 2670 Introduction to Theory of Computing
CSCE 355 Foundations of Computation
Context Sensitive Languages and Linear Bounded Automata
Intro to Theory of Computation
PDAs Accept Context-Free 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
Intro to Theory of Computation
CSE 105 theory of computation
Undecidable Problems (unsolvable problems)
Intro to Theory of Computation
Jaya Krishna, M.Tech, Assistant Professor
Automata and Formal Languages (Final Review)
CSE 105 theory of computation
CSCI 2670 Introduction to Theory of Computing
Decidable Languages Costas Busch - LSU.
CSC 4170 Theory of Computation Decidable languages Section 4.1.
Decidable and undecidable languages
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
Instructor: Aaron Roth
Theory of Computability
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
Automata, Grammars and Languages
CSE 105 theory of computation
Intro to Theory of Computation
Intro to Theory of Computation
Intro to Theory of Computation
CSE 105 theory of computation
CSE 105 theory of computation
CSE 105 theory of computation
Presentation transcript:

CSCI 2670 Introduction to Theory of Computing October 19, 2004

Agenda Last week This week Variants of Turing machines Definition of algorithm This week Chapter 4 Decidable and undecidable languages The halting problem October 19, 2004

Announcements Homework due next Tuesday (10/26) 4.2, 4.5, 4.7, 4.11, 4.14, 4.20 October 19, 2004

Decidable languages A language is decidable if some Turing machine decides it Every string in * is either accepted or rejected Not all languages can be decided by a Turing machine October 19, 2004

Some decidable languages ADFA = {<B,w> | B is a DFA that accepts input string w} ANFA = {<B,w> | B is an NFA that accepts input string w} AREX = {<R,w> | R is a regular expression that generates string w} EDFA = {<A> | A is a DFA and L(A) = } October 19, 2004

One more decidable regular language EQDFA = {<A,B> | A and B are DFA’s and L(A) = L(B)} Theorem: EQDFA is a decidable language Proof: Consider the following language (L(A)  L(B))  (L(A)  L(B)) October 19, 2004

One more decidable regular language (L(A)  L(B))  (L(A)  L(B)) L(A) L(B) October 19, 2004

One more decidable regular language EQDFA = {<A,B> | A and B are DFA’s and L(A) = L(B)} Theorem: EQDFA is a decidable language Proof: Consider DFA C that accepts L(C) = (L(A)  L(B))  (L(A)  L(B)) How do we know such a DFA exists? If L(C) = , then L(A) = L(B) October 19, 2004

ALLDFA = {<A> | A is a DFA that recognizes *} Question How would we show that the following language is decidable? ALLDFA = {<A> | A is a DFA that recognizes *} October 19, 2004

ACFG = {<G,w> | G is a CFG that generates string w} Deciders and CFG’s Consider the following language ACFG = {<G,w> | G is a CFG that generates string w} Is ACFG decidable? Problem: How can we get a TM to simulate a CFG? Must be certain CFG tries a finite number of steps! Solution: Use Chomsky normal form October 19, 2004

Chomsky normal form review All rules are of the form A →BC A →a Where A, B, and C are any variables (B and C cannot be the start variable) S → ε is the only εrule, where S is the start variable October 19, 2004

How many steps to generate w? If |w| = 0 1 step If |w| = n > 0? 2n – 1 steps October 19, 2004

TM simulating ACFG Convert G into Chomsky normal form If |w| = 0 If there is an S → εrule, accept Otherwise, reject List all derivations with 2|w|-1 steps If any generate w, accept October 19, 2004

ECFG = {<G> | G is a CFG and L(G) = } Empty CFG’s Consider the following language ECFG = {<G> | G is a CFG and L(G) = } Theorem: ECFG is decidable Can we use the TM in ACFG to prove this? No. There are infinitely many possible strings in Σ* Instead, we need to check if there is any way to get from the start variable to some string of terminals October 19, 2004

Work backwards Mark all terminals Repeat until no new variables are marked Mark any variable A if G has a rule A→U1U2…Uk where U1, U2, …, Uk are all marked If S is marked, reject Otherwise, accept October 19, 2004

(L(A)  L(B))  (L(A)  L(B)) What about EQCFG? Recall for EQDFA, we considered (L(A)  L(B))  (L(A)  L(B)) Will this work for CFG’s? No. CFG’s are not closed under complementation or intersection ECFG is not a decidable language! October 19, 2004

Decidability of CFL’s Theorem: Every context-free language L is decidable Proof: For each w, we need to decide whether or not w is in L. Let G be a CFG for L. This problem boils down to ACFG, which we showed is decidable. Question: Why don’t we just make a TM that simulates a PDA? October 19, 2004

Relationship of classes of languages Turing-recognizable Decidable Context-free Regular October 19, 2004