COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.

Slides:



Advertisements
Similar presentations
Properties of Regular Languages
Advertisements

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.
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY (For next time: Read Chapter 1.3 of the book)
Courtesy Costas Busch - RPI1 More Applications of the Pumping Lemma.
CS 310 – Fall 2006 Pacific University CS310 Pumping Lemma Sections:1.4 page 77 September 27, 2006.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
CS5371 Theory of Computation Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
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.
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
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.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
Transparency No. 7-1 Formal Language and Automata Theory Chapter 7 Limitations of Finite Automata (lecture 11 and 12)
Fall 2006Costas Busch - RPI1 More Applications of the Pumping Lemma.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
FSA Lecture 1 Finite State Machines. Creating a Automaton  Given a language L over an alphabet , design a deterministic finite automaton (DFA) M such.
Prof. Busch - LSU1 More Applications of the Pumping Lemma.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
Formal Methods in SE Theory of Automata Qasiar Javaid Assistant Professor Lecture # 06.
1 Language Definitions Lecture # 2. Defining Languages The languages can be defined in different ways, such as Descriptive definition, Recursive definition,
1 Chapter 1 Introduction to the Theory of Computation.
Lecture # 19. Example Consider the following CFG ∑ = {a, b} Consider the following CFG ∑ = {a, b} 1. S  aSa | bSb | a | b | Λ The above CFG generates.
Module 2 How to design Computer Language Huma Ayub Software Construction Lecture 8.
L ECTURE 3 Chapter 4 Regular Expressions. I MPORTANT T ERMS Regular Expressions Regular Languages Finite Representations.
Lecture # 5 Pumping Lemma & Grammar
Solution Exercise 1.43 a A r r s q q > b b e b s’ q r q’ b r’ a A’
CS 3240 – Chapter 4.  Closure Properties  Algorithms for Elementary Questions:  Is a given word, w, in L?  Is L empty, finite or infinite?  Are L.
1 Recap lecture 27 Pumping lemma version II, proof, examples, Myhill Nerode theorem, examples.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
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.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
CSC312 Automata Theory Lecture # 3 Languages-II. Formal Language A formal language is a set of words—that is, strings of symbols drawn from a common alphabet.
CS 203: Introduction to Formal Languages and Automata
CSC312 Automata Theory Nonregular Languages Chapter # 10 by Cohen
Lecture # 4.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Nonregular Languages How do you prove a language to be regular? How do you prove a language to be nonregular? A Pumping Lemma.
Lecture # 17 Theory Of Automata By Dr. MM Alam 1.
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.
Lecture 8UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 8.
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.
Pumping Lemma.
Theory of Computation Lecture #
Lecture # 2.
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
Theory of Automata.
Infiniteness Test The Pumping Lemma Nonregular Languages
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.
Pumping Lemma.
Recap lecture 26 Example of nonregular language, pumping lemma version I, proof, 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 23 Mealy machines in terms of sequential circuit.
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.
CHAPTER 1 Regular Languages
Presentation transcript:

COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University pursuant to Part VB of the Copyright Act 1968 (the Act). The material in this communication may be subject to copyright under the Act. Any further reproduction or communication of this material by you may be the subject of copyright protection under the Act. Do not remove this notice.

Pumping Lemma for Regular Languages CSE2303 Formal Methods I Lecture 9

Overview Circuits Pumping Lemma Non-regular Languages Intersection of Regular Languages

A Circuit - + a a a a a a a b b b b b b b … abbab...

Definitions A circuit is a path which starts and ends at the same state. The length of a circuit is the number of edges in the path.

Observation Take any Finite Automaton. Take any string with has more letters than there are states in that Finite Automaton. Then the path taken when this string is used as input must contain a circuit.

- + a a a a a a a b b b b b b b babaaabbab

- + a a a a a a a b b b b b b b x y z

- + a a a a a a a b b b b b b b ba baaab baaab bab x y y z

- + a a a a a a a b b b b b b b babbabbabaaba

- + a a a a a a a b b b b b b b x y z

- + a a a a a a a b b b b b b b ba bbabba bbabba baaba x y y z

Pumping Lemma Let L be a regular language with an infinite number of words. Then there exists strings x, y, and z. Where –y   –xyz, xyyz,.., xy n z are words in L

Proof By Kleene’s theorem there is a Finite Automaton which defines L. Take a word in L with more letters than states in the finite automaton. Let –x be the letters up to the first circuit. –y be the letters corresponding to the circuit. –z be the remaining letters.

Consequence Using the Pumping Lemma we can show there are non-regular languages. Method –Assume L is regular –Then there exists x, y  , and z s.t. xy n z are words in L. –Show for some n > 1, xy n z is not a word in L. –Contradiction.

L = {a n b n } L = {  ab aabb aaabbb … } Assume L is regular Then there exists x, y  , and z s.t. xyz, xyyz,.., xy n z are words in L. Case 1 : y is all a ’s Case 2: y is all b ’s Case 3: y contains an ab Now consider xyyz

Intersection The intersection of the languages L 1 and L 2 is the set of words which belong to both L 1 and L 2. We denote the intersection of L 1 and L 2 by: L 1  L 2 E.g. L 1 = { abb baa} L 2 = { ab aa abb} L 1  L 2 ={ abb}

Intersection of Regular Languages Suppose L 1 and L 2 are regular languages. Then L 1  L 2 = ( L 1 ’ + L 2 ’)’ So L 1  L 2 is regular

EQUAL All words which have an equal number of a ’s as b ’s. {  ab ba aabb abab abba baba … } {a n b n } = EQUAL  a*b* EQUAL is non-regular

Theorem Let L be a regular language with an infinite number of words accepted by a FA with N states. Then for all words w in L with more than N letters. There exists strings x, y  , and z. Where –w = xyz –length(x) + length(y)  N –xyz, xyyz,.., xy n z are words in L

Proof Take any word w in L with more letters than N. Let –x be the letters up to the first circuit. –y be the letters corresponding to the circuit. –z be the remaining letters.

PALINDROME All the strings which are the same if they are spelt backwards E.g.  a b aa bb aaa aba bab bbb

PALINDROME is non-regular Assume PALINDROME is regular. Then exists a FA with N states which accepts PALINDROME. Let w = a N ba N There exists strings x, y  , and z s.t. –w = xyz –length(x) + length(y)  N –xyz, xyyz,.., xy n z are words in PALINDROME Consider xyyz.

Preparation Read –Chapters 12 of the Text Book Revision Know what the Pumping Lemma is used to show. Know some examples of non-regular languages.