COSC 3340: Introduction to Theory of Computation

Slides:



Advertisements
Similar presentations
Pumping Lemma Problem: Solution:
Advertisements

THE PUMPING LEMMA PROVING A LANGUAGE IS NOT REGULAR Dr. Cynthia Lee - UCSD - Spring 2011 Theory of Computation Peer Instruction Lecture Slides by Dr. Cynthia.
Fall 2006Costas Busch - RPI1 Non-regular languages (Pumping Lemma)
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.
CSCI 2670 Introduction to Theory of Computing September 13, 2005.
1 Introduction to Computability Theory Discussion3: Uses of the Pumping Lemma Prof. Amos Israeli.
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
Lecture 15UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 15.
Courtesy Costas Busch - RPI1 More Applications of the Pumping Lemma.
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Courtesy Costas Busch - RPI1 The Pumping Lemma for Context-Free Languages.
CS5371 Theory of Computation Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)
1 The Pumping Lemma for Context-Free Languages. 2 Take an infinite context-free language Example: Generates an infinite number of different strings.
Costas Busch - RPI1 The Pumping Lemma for Context-Free Languages.
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.
Courtesy Costas Busch - RPI1 Non-regular languages.
Fall 2003Costas Busch1 More Applications of The Pumping Lemma.
Fall 2004COMP 3351 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Fall 2006Costas Busch - RPI1 More Applications of the Pumping Lemma.
Lecture 7UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 7.
Lecture 27UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 27.
Lecture 5UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 5.
Lecture 4UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 4.
Prof. Busch - LSU1 Non-regular languages (Pumping Lemma)
Prof. Busch - LSU1 More Applications of the Pumping Lemma.
1 Non-regular languages. 2 Regular languages Non-regular languages.
Costas Busch1 More Applications of The Pumping Lemma.
CS355 - Theory of Computation Regular Expressions.
Non-Context-Free Languages Section 2.3 CSC 4170 Theory of Computation.
Lecture 11UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 11.
1 Find as many examples as you can of w, x, y, z so that w is accepted by this DFA, w = x y z, y ≠ ε, | x y | ≤ 7, and x y n z is in L for all n ≥ 0.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
 2004 SDU Lecture8 NON-Context-free languages.  2004 SDU 2 Are all languages context free? Ans: No. # of PDAs on  < # of languages on  Pumping lemma:
Lecture 8UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 8.
Dept. of Computer Science & IT, FUUAST Automata Theory 2 Automata Theory III Properties of Regular Languages 1.Closure 2.Union 3.Concatenation 4.Complement(Negation)
CSE 105 theory of computation
Non-regular languages - The pumping lemma
Complexity and Computability Theory I
Pumping Lemma.
Non-regular languages
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
COSC 3340: Introduction to Theory of Computation
Nonregular Languages Section 2.4 Wed, Oct 5, 2005.
COSC 3340: Introduction to Theory of Computation
Intro to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Lecture5 Non-regular languages
Infiniteness Test The Pumping Lemma Nonregular Languages
Non-Context-Free Languages
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Elementary Questions about Regular Languages
Non-regular languages
Pumping Lemma September 29, 2006
Pumping Lemma.
Recap lecture 26 Example of nonregular language, pumping lemma version I, proof, examples,
COSC 3340: Introduction to Theory of Computation
More Applications of the Pumping Lemma
COSC 3340: Introduction to Theory of Computation
Recap lecture 25 Intersection of two regular languages is regular, examples, non regular languages, example.
COSC 3340: Introduction to Theory of Computation
Applications of Regular Closure
COSC 3340: Introduction to Theory of Computation
CHAPTER 1 Regular Languages
CSCI 2670 Introduction to Theory of Computing
COSC 3340: Introduction to Theory of Computation
Presentation transcript:

COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 8 Lecture 8 UofH - COSC 3340 - Dr. Verma

Pumping lemma applications. Proving L = {anbn | n  0 } is not regular. Proof: Assume L is regular. Certainly L is infinite and therefore the pumping lemma applies to L. Let p be the constant for L (of the pumping lemma). Lecture 8 UofH - COSC 3340 - Dr. Verma

Pumping lemma applications (contd.) To show there exist a string w  L of length at least p such that Q where Q is the rest of the statement of pumping lemma. Let w = apbp such that |w|  p write apbp = xyz But according to pumping lemma, Lecture 8 UofH - COSC 3340 - Dr. Verma

Pumping lemma applications (contd.) PL statement (i)  |xy|  p Therefore, a…aa…ab…b p p x y z y = am m > 0 xyz = apbp Lecture 8 UofH - COSC 3340 - Dr. Verma

Pumping lemma applications (contd.) PL statement (ii)  xyiz  L i = 0,1,2,3,… Therefore, xy2z  L xy2z = xyyz = ak+mbk  L But, L = {anbn | n  0 } which means ap+mbp  L since m > 0 CONTRADICTION !! Lecture 8 UofH - COSC 3340 - Dr. Verma

Pumping lemma applications (contd.) Therefore our assumption that L = {anbn | n  0 } is a regular language cannot be true. Lecture 8 UofH - COSC 3340 - Dr. Verma

Using Pumping Lemma -- Very Important points Above example is the typical application of pumping lemma, to show that a language is not regular. You must choose string w so that w in L and |w| is at least the pumping length. Example: choosing w = aaabbb is wrong since we do not know the exact value of p. You must consider all possibilities for x, y and z such that w = xyz and |xy|  p. The pumping lemma CANNOT be used to show that a language is regular, since it assumes that L is regular. Lecture 8 UofH - COSC 3340 - Dr. Verma