Understanding the Pumping Lemma

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.

$$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$$

-
Do you understand the proof of the pumping lemma itself? – user58512 Jan 28 '13 at 17:48
Yes, it is based on the Pigeon Hole Principle, basically stating that if the string goes on for long enough in a finite state machine, it is going to revisit some states, and the string should still be accepted regardless of the number of loops encountered. – Epsilon Jan 28 '13 at 17:56

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.

-

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$.

-
I appreciate the effort, however, this still does not make any sense to me. When you say 'loop size' you mean the number of states that make up the loop? What do you mean exactly by "pumpable part in the middle" in terms of a finite state machine? Also, I don't understand this: In formulas, if x∈L, |x|>p, then x can be written as x=uvw for some |v|≥1, and u(v)kw∈L for all k=1,2,3,… – Epsilon Jan 28 '13 at 18:23
Also, is my proof on the right track? What revisions can be made to make it better, if any? – Epsilon Jan 28 '13 at 18:35
Well, yes, seems to be on the right track. Consider the listed possibilities of what $v$ can be. And, yes, $p$ is the number of states in the loop (actually, rather the number of transitions, these little arrows that eat the possible input letters, but it is the same). – Berci Jan 28 '13 at 18:44