Understanding the Pumping Lemma

1.7k Views Asked by At

I have been having an extremely hard time proving a language is irregular using the pumping lemma. I looked and dozens of examples and spent hours on this one topic, and I am still not able to wrap my head around it. Below is my first example that I worked out from my understanding until this point. I would truly appreciate it if someone looked at whether or not I am on the right track, and possibly what I can do to make proof stronger.

OR An over-simplified explanation of Pumping lemma will also be greatly appreciated.

Many thanks in advance!

$$L = \{0^{(n)}1^{(n)}2^{(n)}\}$$

Let $s = 0^{(p)}1^{(p)}2^{(p)}$ where $|s| > p$.

Consider $$x=0^i, i >=0$$ $$y=0^j, j >=0$$ $$z=0^{(p-i-j)}1^{(p)}2^{(p)}$$

Consider $xy^2z$

$$=0^{(p-i-2j)}0^{(j)}0^{(i)}1^{(p)}2^{(p)}$$

$$=0^{(p+j)}1^{(p)}2^{(p)}$$

Since, $p+j \neq p$

$$0^{(n)}1^{(n)}2^{(n)} \not\in L$$

2

There are 2 best solutions below

0
On BEST ANSWER

Each time a character is consumed, a transition takes place from one state to another. Let's say the DFA has 5 states. The longest string this can accept without visiting any state more than once is 4 characters long. So let's say you have a string that is longer than that, 5 characters for example, and the states the DFA visits (in order) are $s_0, s_1, s_2, s_3, s_4, s_1$. The part of the string matched between the repeated $s_1$ states can be repeated (pumped) because whatever character the DFA saw when it was in $s_1$ the first time will be seen again the next time it is in $s_1$, so it'll repeat the transition. And so on for the other transitions from $s_2$ to $s_3$, etc.

3
On

Pumping lemma: If a language $L$ is regular, then there is a 'loop size' constant $p\ $ such that any word longer than $p\ $ has a pumpable part in the middle.

Language is regular = can be decided by a state automata, and the constant $p$ then comes from a(ny such) particular automata, as you described in the comment. The 'pumpable part' in the middle corresponds to the loops, of course. In formulas, if $x\in L,\ |x|>p$, then $x$ can be written as $x=uvw$ for some $|v|\ge 1$, and $u(v)^kw\in L$ for all $k=1,2,3,\dots$

For the language $L_1=\{0^n1^n2^n \mid n\in\Bbb N\}$ above, if it was regular, consider any $n$ such that $3n>p$, then the word $x=0^n1^n2^n$ could be written as $uvw$, but it is not guaranteed that the borders of $u,v,w$ would fit to the borders of $0$'s and $1$'s and $2$'s.

So, you should consider some possibilities according to the length of $u$ and $w$. For example, either $v$ may be contained totally in one of the $0^n$, $1^n$ or $2^n$ blocks, or $v$ may intersect the $0$ and $1$-blocks, being $v=0^a1^b$; or, $v=1^b2^c$, or finally $v=0^a1^n2^b$.

In either case, already $uvvw\notin L$.