1

One of my CS course assignment problems was finding whether $L = \{a^n b^{2n} \mid n \ge 0 \}$ was regular or not. Now, I'm struggling quite a bit getting my head around this as it just seems like an overly complicated pigeonhole problem.

Regardless, I have written my solution and would like to know if it makes sense or is right?

Suppose $L$ is regular. We then have some $p > 0$ and some $|m| > p$.

$a^pb^{2p}$

$m = uvw$ and $|uv| \leq p$ and $uv^iw \in L$ for all $i > 0$

As $|uv| \leq p$ then it follows that $v = a^l$. However, as $uv^iw \equiv a^{p+l}b^{2p}$ it shows that as $p + l \ne 2p$ therefore $L$ is not regular.

As I said, I have no idea whether this is right and I've spent countless hours trying to understand it.

movecx
  • 11
  • 1
  • 2
  • 2
    We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher. – D.W. Nov 11 '16 at 15:39
  • You're essentially correct, with just a few minor corrections. First, you should mention that $l>0$ (which, of course, is guaranteed by the premise of the PL). Second, you should use $uv^2w$ so that $uv^2w=a^{p+l}b^{2p}$ and, third, you should say that $2(p+l)\ne 2p$ so the pumped string isn't in $L$. – Rick Decker Nov 11 '16 at 16:08
  • I think you will find our reference questions helpful. – Raphael Nov 11 '16 at 17:46

0 Answers0