4

I know how to solve pumping lemma for $a^nb^n:n\geq 0$. But I don't understand how can I solve this example : $a^nb^{2n+1}:n\geq 0$.

I tried to solve it but I am not sure that I have solved it correctly or not?Could somebody please help me here?

I can show how did I solve it. But seriously I am not sure is it correct or not. Could you please give me the correct one if I am wrong.

Question : Prove that $a^nb^{2n+1}:n\geq 0$ is not regular.

Here is my answer.

Assume L is regular. Then pumping lemma must hold. Let m be an integer in Pumping lemma.

Let w=amb2m+1 also in L. and |w|>=m

By Pumping lemma w=xyz where |xy|<=m and |y|>=1

According to pumping lemma wi=xyiz also in L for i=0,1,2,...

Let i=2 then w2=xyyz.

Let y=ak where 1<=k<=m and x=aq where 0<=q< m then z=am-q-kb2m+1

w2=xyyz = aqakakam-q-kb2m+1

= am+kb2m+1

but this is not in L for any value of 1<=k<=m

So we have contradiction with pumping lemma. so, our assumption that L is regular is wrong. So, L can not be regular.

Is this correct???

Thank you.

0 Answers0