9 Pumping Lemma Examples
-
Upload
ronildo-oliveira -
Category
Documents
-
view
236 -
download
0
Transcript of 9 Pumping Lemma Examples
-
7/26/2019 9 Pumping Lemma Examples
1/2
Scribe: M. Phillips
CMSC 303 | Spring 2016
Lecture 9
Review of Pumping LemmaThe three parts of the pumping lemma:Let A be a regular language. There exists a number p, called the pumping length, such that for
all s
A of length |s| p, there exists decomposition of s as s=xyz such that:1.
For All i 0, xy iz A2.
|y| > 0 [y cannot be empty, but x and/or z can.]3.
|xy| p
A regular language is any language that can be built as a DFA.For these proofs, were trying to prove that a language is not regular. Were trying to show thata DFA cannot be made for a given language.
Proof ExamplesTextbook section 1.7, page 80
Goal in proofs: Give a specific string where you know what y must be, and then prove thatrepeating or using this y causes the Pumping Lemma to break.
Example 1.74
Given:Some language C = { w | w has an equal number of 0s and 1s }Claim:C is not a regular language.Proof via Contradiction:
Assume C is regular. By Pumping Lemma there exists a pumping length p, and a strings such that s=0p1p. Since |s| p, by the Pumping Lemma there exists x,y,z such thats=x,y,z such that |y| 0 and |xy| p.By this definition, y can only be zeros.
Consider xyyz. The Pumping Lemma says xyyz should be in C.However, this would contain more 0s than 1s, and would no longer fulfill Csrequirements. Therefore xyyz C which is a contradiction.Therefore C is not a regular language.
Example 1.75
Given:Some language F = { ww | w {0,1}* }[This definition means that the string must be symmetrical, example strings for F could be: 0101 or001001 or 101101. The string before and string after the middle point must be the same as eachother 1010 | 1010 ]
Claim:F is not a regular languageProof via Contradiction:
Assume F is regular. By Pumping Lemma there exists a pumping length p, and a strings such that s=0p1p0p1p. Since |s| p, by the Pumping Lemma there exists x,y,z such thats=x,y,z such that |y| 0 and |xy| p.Consider 0p10p1. This would be accepted in F.However, this would fail the Pumping Lemma. |xy| would be greater than or equal to p.Therefore F cannot be pumped, and F is not a regular language.
-
7/26/2019 9 Pumping Lemma Examples
2/2
Example 1.76
Given:Some language D = {1n^2| n 0}[A string of 1s where the total number of 1s is a perfect square. n^2 here means n to the power of 2]
Claim:D is not a regular languageProof via Contradiction:
Assume D is regular. By Pumping Lemma there exists a pumping length p, and a strings such that s = 1p^2and s p. Since |s| p, by the Pumping Lemma there exists x,y,zsuch that s=x,y,z such that |y| 0 and |xy| p.We know that |xyz| = p2in this case.|xy2z| p2+ pHowever, p2+ p < p2+ 2p+1= (p + 1)2Thus xy2z lies between p2and (p+1)2and therefore is NOT a perfect square.Therefore xy2z
D which is a contradiction. Thus D is not a regular language.
Example 1.77
Given: Some language E = {0i1j| i > j }[There are more 0s than 1s in this language.]
Claim:E is not a regular languageProof via Contradiction:
Assume E is regular. By Pumping Lemma there exists a pumping length p, and a strings such thats = 0p+11p. Since |s| p, by the Pumping Lemma there exists x,y,z such thats=x,y,z such that |y| 0 and |xy| p.By condition 3 of the pumping lemma, y consists of only 0s. By the same definition wecan also say that z must contain at least one 0.By definition s has one more 0 than 1s.However, xz cannot have more 0s than 1s, because y must contain 0s and have a sizeof at least one. This is a contradiction, and therefore E is not a regular language.
[Double check the book on these examples. We were walking through the examples in class and went down manypossible proof paths. I may have typed these incorrectly or mixed up a few possible solutions. It was an in-classexample day and we did not cover any new topics]