Prove using the Pumping Lemma

31 Views Asked by At

Can I prove that the language of the palindromes in the alphabet consisting of the ASCII symbols is not regular by proving that L = {$1^n21^n$ | n⩾0} is not a regular language?

1

There are 1 best solutions below

0
On

Yes, I believe so. If we had an an FSA $M_1$ that accepted palindromes, then we could build an FSA that accepted L, by building another machine $M_2$ that accepts strings consisting only of $1$s and a single $2$. (This language is obviously regular, but it would be easy to build an NFSA to recognize it.) Feed any string accepted by $M_2$ into $M_1$ and we have an FSA that recognizes $L$.