1 Recap lecture 27 Pumping lemma version II, proof, examples, Myhill Nerode theorem, examples.

Slides:



Advertisements
Similar presentations
Properties of Regular Languages
Advertisements

Properties of Regular Sets
Theory Of Automata By Dr. MM Alam
Theory Of Automata By Dr. MM Alam
Lecture 9,10 Theory of AUTOMATA
3.2 Pumping Lemma for Regular Languages Given a language L, how do we know whether it is regular or not? If we can construct an FA to accept the language.
CS21 Decidability and Tractability
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
Regular Expression (EXTRA)
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 12: 10/5.
1 More Applications of the Pumping Lemma. 2 The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we.
FSA Lecture 1 Finite State Machines. Creating a Automaton  Given a language L over an alphabet , design a deterministic finite automaton (DFA) M such.
1 Module 24 Myhill-Nerode Theorem –distinguishability –equivalence classes of strings –designing FSA’s –proving a language L is not regular.
Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { ‘{‘, ‘}’ } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite language,
Lecture 03: Theory of Automata:08 Finite Automata.
Theory Of Automata By Dr. MM Alam
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
Lecture 07: Formal Methods in SE Finite Automata Lecture # 07 Qaisar Javaid Assistant Professor.
MYHILL NERODE THEOREM By Anusha Tilkam. Myhill Nerode Theorem: The following three statements are equivalent 1.The set L є ∑* is accepted by a FSA 2.L.
Lecture 05: Theory of Automata:08 Kleene’s Theorem and NFA.
Module 2 How to design Computer Language Huma Ayub Software Construction Lecture 8.
Lecture-2 Recap Lecture-1
Lecture # 5 Pumping Lemma & Grammar
Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No Roll No Roll No Roll No Group No. 3 Presented To Mam.
Chapter 4 Pumping Lemma Properties of Regular Languages Decidable questions on Regular Languages.
Lecture # 12. Nondeterministic Finite Automaton (NFA) Definition: An NFA is a TG with a unique start state and a property of having single letter as label.
Lecture 4 Theory of AUTOMATA
Regular Expressions Chapter 6. Regular Languages Regular Language Regular Expression Finite State Machine L Accepts.
CS 203: Introduction to Formal Languages and Automata
CSC312 Automata Theory Nonregular Languages Chapter # 10 by Cohen
Lecture 04: Theory of Automata:08 Transition Graphs.
Lecture # 4.
CSC312 Automata Theory Lecture # 8 Chapter # 5 (Cont…) Finite Automata.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Lecture # 17 Theory Of Automata By Dr. MM Alam 1.
Lecture 03: Theory of Automata:2014 Asif Nawaz Theory of Automata.
1 Recap lecture 28 Examples of Myhill Nerode theorem, Quotient of a language, examples, Pseudo theorem: Quotient of a language is regular, prefixes of.
Lecture # 8 (Transition Graphs). Example Consider the language L of strings, defined over Σ={a, b}, having (containing) triple a or triple b. Consider.
1 Advanced Theory of Computation Finite Automata with output Pumping Lemma Theorem.
Recap Lecture 3 RE, Recursive definition of RE, defining languages by RE, { x}*, { x}+, {a+b}*, Language of strings having exactly one aa, Language of.
Lecture #5 Advanced Computation Theory Finite Automata.
Lecture 15: Theory of Automata:2014 Finite Automata with Output.
Recap lecture 5 Different notations of transition diagrams, languages of strings of even length, Odd length, starting with b, ending in a (with different.
Pumping Lemma.
Transition Graphs.
Lecture 9 Theory of AUTOMATA
Recap lecture 29 Example of prefixes of a language, Theorem: pref(Q in R) is regular, proof, example, Decidablity, deciding whether two languages are equivalent.
Kleene’s Theorem Muhammad Arif 12/6/2018.
CSE322 Minimization of finite Automaton & REGULAR LANGUAGES
Pumping Lemma.
Recap lecture 6 Language of strings, beginning with and ending in different letters, Accepting all strings, accepting non-empty strings, accepting no string,
Recap lecture 26 Example of nonregular language, pumping lemma version I, proof, examples,
ReCap Chomsky Normal Form, Theorem regarding CNF, examples of converting CFG to be in CNF, Example of an FA corresponding to Regular CFG, Left most and.
Recap lecture 42 Row language, nonterminals defined from summary table, productions defined by rows, rules for defining productions, all possible productions.
Recap lecture 18 NFA corresponding to union of FAs,example, NFA corresponding to concatenation of FAs,examples, NFA corresponding to closure of an FA,examples.
Recap lecture 11 Proof of Kleene’s theorem part II (method with different steps), particular examples of TGs to determine corresponding REs.
Recap lecture 25 Intersection of two regular languages is regular, examples, non regular languages, example.
Recap lecture 19 NFA corresponding to Closure of FA, Examples, Memory required to recognize a language, Example, Distinguishing one string from another,
RECAP Lecture 7 FA of EVEN EVEN, FA corresponding to finite languages(using both methods), Transition graphs.
Recap lecture 23 Mealy machines in terms of sequential circuit.
Recap Lecture 15 Examples of Kleene’s theorem part III (method 3), NFA, examples, avoiding loop using NFA, example, converting FA to NFA, examples, applying.
Recap Lecture 4 Regular expression of EVEN-EVEN language, Difference between a* + b* and (a+b)*, Equivalent regular expressions; sum, product and closure.
Recap Lecture 3 RE, Recursive definition of RE, defining languages by RE, { x}*, { x}+, {a+b}*, Language of strings having exactly one aa, Language of.
LECTURE # 07.
Mealy and Moore Machines
CHAPTER 1 Regular Languages
CSC312 Automata Theory Lecture # 24 Chapter # 11 by Cohen Decidability.
Presentation transcript:

1 Recap lecture 27 Pumping lemma version II, proof, examples, Myhill Nerode theorem, examples

2 Example Example:Consider the language L which is EVEN-EVEN, defined over  ={a,b}. It can be observed that L partitions  * into the following four classes C 1 = set of all strings with even number of a’s and odd number of b’s. C 2 = set of all strings with odd number of a’s and odd number of b’s. C 3 = set of all strings with odd number of a’s and even number of b’s. C 4 = set of all strings with even number of a’s and even number of b’s.

3 Example continued … Since there are finite many classes generated by L, so L is regular and hence following is an FA, built with the help of C 1, C 2, C 3 and C 4, accepting L. b b b b a a aa C4C4 C1C1 C2C2 C3C3

4 Example Example: Consider the language L = {w  {a,b} * : length(w)  2, w ends in either ab or ba}. It can be observed that L partitions  * into the following seven classes C 1 = set containing only null string. C 2 = set containing only letter a. C 3 = set containing only letter b. C 4 = set of strings ending in aa. C 5 = set of strings ending in ab. C 6 = set of strings ending in ba. C 7 = set of strings ending in bb.

5 Example continued … S ince there are finite many classes generated by L, so L is regular and hence following is an FA, built with the help of C 1, C 2, C 3, C 4, C 5, C 6 and C 7, accepting L

6 Example continued … a a b a c3c3 c1c1 a b a a b b b b ab c5c5 c7c7 c4c4 c2c2 c6c6 Following is an FA equivalent to the above FA

7 Example continued … Note: It can be noted from the above two FAs accepting the same language that if the language L, partitions  * into n distinct classes, then L may partition  * into finite many distinct classes other than n. b a b 4+ b 2 a a 5+ a 3 b 1– a b

8 Quotient of a language into another Remark: The theorem has been proved to show under what conditions a language is regular. It has also been proved that the product of two regular languages is regular. The question arises that whether there exists a theorem showing that quotient of regular languages is regular. There is a problem in defining the quotient of two regular languages. There is an approach in defining the quotient of regular languages i.e.

9 Quotient of a language into another continued … the language Q is said to be quotient of two regular languages P and R, denoted by Q=R/P if PQ=R. It is to be noted that this definition does not determine a unique language e.g. for P=Q=R expressed by a * then PQ=R and so Q=R/P i.e. a * =a * / a *. But for Q={  }, P=R expressed by a *, PQ=R is still true which shows that Q={  }=R/P expressed by a * / a * Similarly, for the same P and R, Q may be taken as {  },{a},{aaaa},{aaaaaaaa}, … Thus there exist infinite many choices for defining the quotient language in this case of one-letter alphabet.

10 Pseudo theorem Statement: For three languages P,Q and R, while PQ=R the language Q must be regular if both P and R are regular. Note: It is to be noted that since this theorem is not true, so the theorem is called pseudo theorem. Disproof: The theorem can be disproved by contradiction i.e. supposing that Q is regular.

11 Disproof continued … Let P=a *, Q be the product of {a n b n :n=0,1,2,…} and b * then PQ=a * {a n b n }b * =a * b * =R which shows that R is regular. To disproof this theorem, it is sufficient to prove that Q is not regualr. By definition, the words in Q are of the form a x b y where x  y. Let Q be regualr and hence there exists an FA that accepts Q. Suppose the number of states in this machine be N. Now the word a N b N is also in Q and must be accepted by this FA.

12 Disproof continued … Since the number of states in this machine is N, there must be a circuit in this machine to run the substring a N. Thus while accepting the word a N b N, the machine looping the circuit once again, can accept the word a more than N b N, which is not in Q. Hence it is impossible to find any FA that accepts exactly the language Q. Thus Q is not regular and hence the theorem is disproved.

13 Prefixes of a language in another language If two languages R and Q are given, then the language the prefixes of Q in R denoted by Pref(Q in R) is the set of strings of letters that, when concatenated to the front of some word in Q to produce some word in R i.e. Pref(Q in R)=the set of all strings p such that there exists words q in Q and w in R such that pq=w. Following are the examples in this regard

14 Example Let Q={aa,abaaabb,bbaaaaa,bbbbbbbbbb} and R={b,bbbb,bbbaaa,bbbaaaaa} It can be observed that aa and bbaaaaa occur at the ending parts of some words of R, hence these words help in defining the language pref(Q in R). Thus pref(Q in R) = {b,bbba,bbbaaa} Note: The language of prefixes may be consisting of word , while there is also a possibility that this language may not contain any string (even not the null string).

15 Summing Up Examples of Myhill Nerode theorem, Quotient of a language, examples, Pseudo theorem: Quotient of a language is regular, prefixes of a language, example