Solution verification: Proving that this language is irregular using the pumping lemma.

58 Views Asked by At

Prove that the following language with $\Sigma=\{a,b\}$, is not regular using the pumping lemma:
$L=\{ba^{2^{k}}b^{i_1}ab^{i_2}...b^{i_k}a : k\ge 1, \forall j\space\space (1\le j \le k)\space\space i_j\ge 1 \}$

At first I tried to understand what is the language, so I tried to write a word that is in it:
$ba^{2^2}b^5ab^6a=baaaabbbbbabbbbbba$.
So I can say that theres $k$ - $(b^+a)$ to the right of $ba^{2^k}$.


Let's assume by contradiction that $L$ is regular, then the pumping lemma works on it, so there exists a constant $n$, where for every word $z\in L$ that satisfies $|z|\ge n$, we can write $z=uvw$ and:
$|uv|\le n$, $|v|\ge 1$, $uv^iw\in L\space\space\space \forall i\ge 0$.

Let $z=ba^{2^n}(ba)^n$, (n is the constant of the lemma).
There's two possibilities:
1- $u=ba^s, v=a^{t}\space\space t\ge 1, w=a^{2^n-s-t}(ba)^n$.
2- $u = \epsilon, v=ba^t \space\space t\ge 0, w=a^{2^n-t}(ba)^n$

for (1), $uv^iw=ba^sa^{ti}a^{2^n-s-t}(ba)^n=ba^{2^n+t(i-1)}(ba)^n$
if we choose $i=2^n+1$, then $ba^{2^n+t2^n}(ba)^n\in L$. But
$2^n+t2^n\ge 2^n+2^n\ge 2^{n+1}$, which gives us a contradiction, since $(ba)^n$ needs to be $(ba)^{n+1}$ atleast for this word to have a chance to be in $L$.

For (2), $uv^iw=(ba^t)^ia^{2^n-t}(ba)^n$, We choose $i=0$ and get that:
$a^{2^n-t}(ba)^n\in L$, which is a contradiction since it doesn't start with $b$.

So I've shown that for every possibility, we reach a contradiction when we assume $L$ is regular, so it is irregular.

Any feedback is really appreciated, thanks in advance!

1

There are 1 best solutions below

2
On BEST ANSWER

Before applying the pumping lemma, you could use the following argument. Let $$ K = L \cap ba^+(ba)^+ = \{ba^{2^k}(ba)^k \mid k > 0\} $$ If $L$ is regular, then so is $K$, as the intersection of two regular languages. Let now $\pi: \{a,b\}^* \to a^*$ be the monoid homomorphism that erases the $b$'s. Then $$ \pi(K) = \{a^{k + 2^k} \mid k > 0 \} $$ is also regular, since regular languages are closed under homomorphisms. And now you can get a contradiction by proving that $\pi(K)$ is not regular, using the pumping lemma if you wish.

EDIT. Your proof is carefully written and works well. You could also take $i = 2$ in case (1). Indeed, since $t < n$, you would get $2^n < 2^n + t < 2^n + n \leqslant 2^n + 2^n = 2^{n+1}$. This shows that $2^n + t$ is not a power of $2$ and hence $ba^{2^n + t}(ba)^n$ is not in $L$.