[Math] Pumping Lemma for regular languages proof template

automataregular-language

http://www.cs.uiuc.edu/class/fa06/cs273/Lectures/pumping-lemma/pumping-lemma.html

So, I went to that site and it says:

  • $w = xyz$
  • $|xy| \leq p$
  • $|y| \geq 1$
  • for all $i$, $xy^iz$ is in $L$.

There exists a string $w^p$ in $L$ of length at least $p$ such that if we choose any strings $x$,$y$,and $z$ satisfying conditions (1)-(3), then there is some number $i$ such that $xy^iz$ is not in $L$.

So, we can choose the values for $x$, $y$ and $z$, and we get to choose the $i$ in $xy^iz$, but not $p$, which remains $p$, right?

How do we choose a good string for the pumping lemma?

I asked a question and one of the guy said:

Mr. Pumping Lemma divides $s$ into three parts $u,v,w$, subject to the restrictions that $|uv|≤p$, $|v|≥1$.

which implies I cannot choose a particular value of $x$, $y$ and $z$, but that's not the case, right?

I only have to make sure that $i$ is an integer, amongst other things. What are those other things?

Also, I have another question: there is a case where we have to cover several cases. Like there may be a case where y can take different values and we have to prove that for every case there is a contradiction if I remember well. When does that happen?

Best Answer

My professor, when teaching us the pumping lemma for the first time, he introduced it as a game between two people. The goal for you is to prove that a language is not regular.

  1. Step 1: You choose some $p\in\mathbb{Z}$. So, $p$ is already an integer. You don't have to show this. It is by assumption.
  2. Step 2: Your opponent chooses some $w\in L$, with $|w|\geq p$.
  3. Step 3: You choose some $x,y$ and $z$ such, that $w=xyz$ with the constraints $|xy|<p$ and $|y|\geq 1$. Here is were you might need to take cases for the $x,y$ and $z$ that you have to choose.
  4. Step 4: For each case from step 3, you find some $i$, such that $xy^iz\notin L$.

You win if you manage until step 4. The opponent wins if you don't.

Of course, when applying the pumping lemma to prove that a language is not regular, you don't actually play this game with another person. You get to do the roles of yourself and of your opponent. You can think of it like you're having identity disorders (here we laugh) and the two personalities are your opponent and yourself.

So, basically, what you have to find is $p$, $x,y,z$ and $i$. But most of the times it is convenient to keep $p$ as a fixed variable and not give it some value. In this case, you choose $p$ by saying "let $p\in\mathbb{Z}$" and move on as if $p$ is a non-negative integer. So actually, what you need to find are $x, y, z$ and $i$, for given $w$.

Related Question