1

Given an alphabet $\Sigma$ (of size at least $2$) let $L$ be the language consisting of words of the form $a^kb^k$ with $k\in \mathbb{N}$ and $a,b\in \Sigma$.

Then for any $p\in \mathbb{N}$ pick $a\neq b\in \Sigma$ and we have $a^pb^p\in L$. If we write $a^pb^p=xyz$ with $|y|\geq 1$ and $|xy|\leq p$ then $y=a^i$ for some $i\geq 1$ and $xy^2z=a^{i+p}b^p\notin L$. From the pumping lemma we may conclude that $L$ is not regular.

Let $L'$ be the language consisting of palindromes: that is strings on $\Sigma$ which are invariant under reversing. Is there a proof (similar to the one above for $L$) that $L'$ is not regular using the pumping lemma?

tkf
  • 15,315

1 Answers1

1

For all $p\in \mathbb{N}$, $p\geq 1$, we have $a^pba^p\in L'$. However for $i\geq 1$, we have $a^{p+i}ba^p\notin L'$.

tkf
  • 15,315