Decidable Questions About Regular languages 1)Membership problem: “Given a specification of known type and a string w, is w in the language specified?”

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
Lecture 6 Nondeterministic Finite Automata (NFA)
DFA Minimization Jeremy Mange CS 6800 Summer 2009.
Finite Automata CPSC 388 Ellen Walker Hiram College.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
Transparency No. 4-1 Formal Language and Automata Theory Chapter 4 Patterns, Regular Expressions and Finite Automata (include lecture 7,8,9) Transparency.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Fall 2006Costas Busch - RPI1 Deterministic Finite Automata And Regular Languages.
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.
Regular Expression (EXTRA)
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
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.
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
1 Non-Deterministic Automata Regular Expressions.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
Prof. Busch - RPI1 Decidable Problems of Regular Languages.
1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY For next time: Read 2.1 & 2.2.
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
Transparency No. 8-1 Formal Language and Automata Theory Chapter 8 DFA state minimization (lecture 13, 14)
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
DFA Minimization 1 2 Equivalent States Consider the accept states c and g. They are both sinks meaning that any string which ever reaches them is guaranteed.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
Chapter 4 Properties of Regular Languages
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.
1 Decision Properties of Regular Languages General Discussion of “Properties” The Pumping Lemma Minimizing DFA.
Finite State Machines 1.Finite state machines with output 2.Finite state machines with no output 3.DFA 4.NDFA.
1.2 Three Basic Concepts Languages start variables Grammars Let us see a grammar for English. Typically, we are told “a sentence can Consist.
1 Chapter Constructing Efficient Finite Automata.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA.
Overview of Previous Lesson(s) Over View  A token is a pair consisting of a token name and an optional attribute value.  A pattern is a description.
Algorithms for hard problems Automata and tree automata Juris Viksna, 2015.
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
1 Section 11.3 Constructing Efficient Finite Automata First we’ll see how to transform an NFA into a DFA. Then we’ll see how to transform a DFA into a.
Finite Automata A simple model of computation. 2 Finite Automata2 Outline Deterministic finite automata (DFA) –How a DFA works.
Lecture #5 Advanced Computation Theory Finite Automata.
1/29/02CSE460 - MSU1 Nondeterminism-NFA Section 4.1 of Martin Textbook CSE460 – Computability & Formal Language Theory Comp. Science & Engineering Michigan.
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
Introduction to Automata Theory Theory of Computation Lecture 3 Tasneem Ghnaimat.
Busch Complexity Lectures: Reductions
Reductions Costas Busch - LSU.
Nondeterministic Finite Automata
Two issues in lexical analysis
Review: NFA Definition NFA is non-deterministic in what sense?
Jaya Krishna, M.Tech, Assistant Professor
Properties of Regular Languages
CS 154, Lecture 4: Limitations on DFAs (I),
More on DFA minimization and DFA equivalence
4. Properties of Regular Languages
Decidable Languages Costas Busch - LSU.
Minimal DFA Among the many DFAs accepting the same regular language L, there is exactly one (up to renaming of states) which has the smallest possible.
Finite Automata State Transition Graph (Non)deterministic FA: DFA, NFA
CSE322 Minimization of finite Automaton & REGULAR LANGUAGES
Finite Automata.
Decidable Problems of Regular Languages
Chapter 1 Regular Language - 02
Instructor: Aaron Roth
Chapter 1 Regular Language
Regular Language Equivalence and DFA Minimization
Presentation transcript:

Decidable Questions About Regular languages 1)Membership problem: “Given a specification of known type and a string w, is w in the language specified?” 2) Emptiness problem: “Given a specification of known type, does it specify the empty set?” 3) Finiteness problem: “Given a specification of known type, does it specify finite set?” 4)Equivalence problem: “Given two specifications of the same known type, do they specify the same language?”

Algorithm: (Decision of membership problem for DFA) Input: A DFA M=(Q, , , q 0, F) and w in  *. Output: “YES” if w is in L(M), “NO’ otherwise. Method: If  (q 0, w) is in F, say “YES”; If not say “NO”.

Algorithm: (Decision of emptiness problem for finite automata.) Input: A DFA M=(Q, , , q 0, F). Output: “YES” if L(M) = , “NO’ otherwise. Method: Compute the set of states accessible from q 0. {p | (q 0, w) = p } If this contains NO final state, say “YES”; If not say “NO”.

Algorithm: (Decision of finiteness problem for finite automata.) Input: A DFA M=(Q, , , q 0, F). Output: “YES” if L(M) = is a finite set, “NO’ otherwise. Method: Test if there are any cycles. Answer “YES” if there are no cycles, otherwise “NO”.

Definition: let M = (Q, , , q 0, F) be a DFA, and let q 1 and q 2 be two distinct states. We say that a string x in  * distinguishes q 1 from q 2 if exactly one of (q 1, x) and (q 2, x) is in F. We say q 1 and q 2 are k-indistinguishable if and only if there is no x, with |x|  k, which distinguishes q 1 and q 2.

Definition: We say q 1 and q 2 are (q 1  q 2 ) indistinguishable if and only if they are k-indistinguishable for all k  0. q 1 and q 2 are equivalent states.

start 0 A B D C E F G

Table filling algorithm (p157) Basis: If p is an accepting state and q is a nonaccepting state, then (p, q) is a distinguishable pair of states. Induction: Let p and q be states such that  (p,a) = r and  (q,a) = s for some input symbol a. If (r, s) is a known pair of distinguishable states, then (p,q) is also a pair of distinguishable states.

Table of state inequivalences B C D E F G ABCDEF

Theorem 4.20: It two states are not distinguished by the table-filling algorithm, then the states are equivalent Theorem4.24: If we create for each state q of a DFA a block consisting of q and all the states equivalent to q, then the different blocks of states form a partition of the set of states. State minimization algorithm (p162)

Algorithm: (Decision of equivalence problem for DFA) Input: Two DFA M 1 = (Q 1,  1,  1, q 1, F 1 ) and M 2 = (Q 2,  2,  2, q 2, F 2 ) such that Q 1  Q 2 = . Output: “YES” if L(M 1 ) = L(M 2 ), “NO” otherwise Method: Construct the FA M = (Q 1  Q 2,  1   2,  1   2, q 1, F 1  F 2 ). Determine if q 1  q 2. If so say “YES”; otherwise say “NO”.

Observation: L(M 1 ) = L(M 2 ) if and only if (L(M 1 )  L(M 2 ))  (L(M 1 )  L(M 2 )) = .