You are on page 1of 2

Scribe: M.

Phillips
CMSC 303 | Spring 2016

Lecture 9

Review of Pumping Lemma

The 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, xyiz A
2. |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 that
a DFA cannot be made for a given language.

Proof Examples

Textbook section 1.7, page 80


Goal in proofs: Give a specific string where you know what y must be, and then prove that
repeating 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 string
s such that s=0p1p. Since |s| p, by the Pumping Lemma there exists x,y,z such that
s=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 Cs
requirements. 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 or
001001 or 101101. The string before and string after the middle point must be the same as each
other 1010 | 1010 ]

Claim: F is not a regular language


Proof via Contradiction:
Assume F is regular. By Pumping Lemma there exists a pumping length p, and a string
s such that s=0p1p0p1p. Since |s| p, by the Pumping Lemma there exists x,y,z such that
s=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.

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 language


Proof via Contradiction:
Assume D is regular. By Pumping Lemma there exists a pumping length p, and a string
s such that s = 1p^2 and s p. Since |s| p, by the Pumping Lemma there exists x,y,z
such that s=x,y,z such that |y| 0 and |xy| p.
We know that |xyz| = p2 in this case.
|xy2z| p2 + p
However, p2 + p < p2 + 2p+1 = (p + 1)2
Thus xy2z lies between p2 and (p+1)2 and 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 language


Proof via Contradiction:
Assume E is regular. By Pumping Lemma there exists a pumping length p, and a string
s such that s = 0p+11p. Since |s| p, by the Pumping Lemma there exists x,y,z such that
s=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 we
can 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 size
of 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 many
possible proof paths. I may have typed these incorrectly or mixed up a few possible solutions. It was an in-class
example day and we did not cover any new topics]

You might also like