I am having a really tough time proving the following language is not regular using the pumping lemma. This whole time I have been working on pumping lemma problems, the variable of the power has been the same on all alphabet characters that make up the string for the language.
$$L = \{0^i1^j | j \ne i\} $$
This is what I tried:
Let $p$ be the pumping length of $L$. Consider $S= 0^p1^j$, $|s| > p$, and $|s| > j$. Thus $s$ must satisfy the pumping lemma. Consider splitting the string:
I am assuming in order to prove this language is not regular via contradiction, we would have to find a case where the $j$ IS equal to $i$, even though they aren't supposed to be.
I am not sure how to proceed from this point of the proof and would appreciate any suggestions.
Many thanks in advance!
Consider the language of all words that start with any number of $0$s followed by the same number of $1$s. You should be able to prove that this language is not regular using the pumping lemma: $$ L_1 = \left\{0^i 1^i \mid i \ge 0 \right\} $$
Also, consider the language of all words that start with any number of $0$s followed by any number of $1$s. This language is easily seen to be regular. Try to construct a DFA to recognize it: $$ L_2 = \left\{0^i 1^j \mid i, j \ge 0 \right\} $$
$L$ in the exercise is the language of all words that start with any number of $0$s followed by a different number of $1$s: $$ L = \left\{0^i 1^j \mid i \ne j \right\} $$
It shouldn't be difficult to convince yourself that any word in $L_1$ is also a word in $L_2$ but never a word in $L$. We can write: $$ L_1 = L_2 - L $$
Now, we're going to prove that $L$ is not regular by showing that a contradiction would happen if $L$ was regular.
From basic set theory: $$ L_1 = L_2 - L = L_2 \cap L^\complement $$
If $L$ was regular, its complement $L^\complement$ would also be regular, and the intersection $L_2 \cap L^\complement$ too. It would follow that $L_1$ would be regular. But this contradicts with the fact that $L_1$ is not regular by the pumping lemma. Therefore, $L$ cannot be regular.