Hi I am stuck trying to prove that the following language $K = \{a, a^2ba, a^3ba^2ba,...\}$ is not a regular language. Actually I simply can't find a word w that has a length of at least p and is in the language $K$.
Thanks!
Hi I am stuck trying to prove that the following language $K = \{a, a^2ba, a^3ba^2ba,...\}$ is not a regular language. Actually I simply can't find a word w that has a length of at least p and is in the language $K$.
Thanks!
Note that, for every word in this language, if the word begins with $n$ $a$s, followed by a $b$, then the word is of length $$\underbrace{\frac{1}{2}n(n + 1)}_{\text{The number of $a$s}} + \underbrace{n - 1}_{\text{The number of $b$s}}.$$ Further, the number of leading $a$s also uniquely determines the word; as soon as we see $a^n b \ldots$, then we know the rest of the word.
Now, suppose a word $w \in K$ had a pumpable substring $y$, i.e. there exist substrings $x, y, z$ such that $w = xyz$, $y \neq \varepsilon$, and $xy^nz \in K$ for all $n \ge 0$.
Now, if $xy$ consists only of $a$s, then $xy^nz$ will contain a different number of leading $a$s as $n$ varies. However, the number of $b$s will remain the same, which contradicts the above formula. Thus, $xy$ must contain at least one $b$.
If $x$ contains a $b$, then the entire segment of leading $a$s occurs in $x$, and hence does not change with $n$. Since the number of leading $a$s uniquely determines the word, we must have $xyz = xy^nz$ for all $n$, which contradicts $y \neq \varepsilon$.
Otherwise, $x$ only contains $a$s, but $y$ contains at least one $b$. Note that $xy^nz$, for $n \ge 1$, still begins with $xy$, which still contains the same number of leading $a$s followed by a $b$. As such, we again have to have $xyz = xy^nz$, a contradiction.