0% found this document useful (0 votes)
15 views2 pages

Pumping Lemma Proof for Non-Regular Language

1. The document presents a proof by contradiction that the language E = {w ∈ (01)∗ | w has an equal number of 0s and 1s} is not regular using the pumping lemma for regular languages. 2. It considers the string s = 0p1p, which cannot be pumped in a way that satisfies the conditions of the pumping lemma, providing the required contradiction. 3. Choosing a different string like (01)p would not have worked for the proof as that string can be pumped.

Uploaded by

Ahmad Sheeraz
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Pumping Lemma Proof for Non-Regular Language

1. The document presents a proof by contradiction that the language E = {w ∈ (01)∗ | w has an equal number of 0s and 1s} is not regular using the pumping lemma for regular languages. 2. It considers the string s = 0p1p, which cannot be pumped in a way that satisfies the conditions of the pumping lemma, providing the required contradiction. 3. Choosing a different string like (01)p would not have worked for the proof as that string can be pumped.

Uploaded by

Ahmad Sheeraz
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Example Proof using the Pumping Lemma for Regular Languages

Andrew P. Black
22 April 2008

Prove that the language E = {w (01) | w has an equal number of 0s and 1s} is not regular.
Proof
We prove the required result by contradiction. So, we assume that E is regular. Then, by the pumping lemma, there is a pumping length p such that all strings s in E of length p or more can be written as s = xyz where 1. y = 2. | xy | p, and 3. xy i z E, for all i 0 Consider the string s = 0p 1p . Clearly, p E and | s | p, so we should be able to nd a decomposition of s into xyz that meets conditions 13 above. How about x = z = , y = 0p 1p ? This meets conditions 1 and 3. But no, it fails to meet condition 2. If | xy | p, then xy must contain just 0s and no 1s. Hence, y must contain just 0s and no 1s. So, if s = xyz E, it follows that xz E, since xz has fewer 0s than xyz but the same number of / 1s. Thus, we have found a string in E that cannot be pumped, which contradicts the assumption that E is regular.

Note that we get to choose a string s to suit our purposes. If, instead, we had chosen (01)p , then we would not have been able to complete the proof. Why not? Because that particular string can be pumped. But this is not a problem: the lemma says that all strings can be pumped, so all that we need do is nd one string that cannot be pumped, and we have the contradiction that we are looking for. 1

What is the minimum pumping length for the language L = 0001 ?


The minimum pumping length for a language L is the smallest p such that all strings of length p or more can be pumped. In L = 0001 : 1. 000 cant be pumped (because 0000 is not in L) 2. 0001 can be pumped: put x = 000, y = 1, z = . So the minimum pumping length is 4. How many states would you expect to nd in a DFA recognizing L?

You might also like