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.