1 / 7

COSC 3340: Introduction to Theory of Computation

COSC 3340: Introduction to Theory of Computation. University of Houston Dr. Verma Lecture 8. Pumping lemma applications. Proving L = {a n b n | n  0 } is not regular. Proof: Assume L is regular. Certainly L is infinite and therefore the pumping lemma applies to L .

Download Presentation

COSC 3340: Introduction to Theory of Computation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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). UofH - COSC 3340 - Dr. Verma

  3. 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, UofH - COSC 3340 - Dr. Verma

  4. 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 UofH - COSC 3340 - Dr. Verma

  5. 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 !! UofH - COSC 3340 - Dr. Verma

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

  7. 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 Land |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. UofH - COSC 3340 - Dr. Verma

More Related