2

I need to prove the following language is not regular, I think I need to use the pumping lemma. The trouble I am having is that there is multiple variables and I am not used to that. Could someone tell me if the pumping lemma is the correct proof by contradiction of $$L = \{a^iba^j|i\ge2j\ge0\}$$

I took $xyz = a^{2p+1}ba^p $ so $|xy| = 2p+2$ which is greater than $p$ and must be false. Is this solution correct?

Raphael
  • 73,212
  • 30
  • 182
  • 400

1 Answers1

0

As noted, you need to be careful making assertions about $xy$. Recall that the pumping lemma says that if $L$ is a regular language, then there is a positive integer $p$ such that any string $s\in L$ can be written as $s=xyz$ where

  1. $|xy| \le p$,
  2. $|y| > 0$,
  3. $xy^iz\in L$ for all $i=0,1,\dotsc$.

so in your example all you know is that $|xy|\le p$. You certainly can't assert that $|xy|=2p+2$.

All is not lost, though. If you assume that $L$ is regular and let $s=a^{2p}ba^p$ (notice that I chose a different string to pump), then since $|xy|\le p$, you know that $xy$ "lives" among the first group of $a$'s, and so $xy=a^k$, for some $k\le p$. Hence $y=a^t$ for some $0<t\le p$ and so the PL assures us that $xy^iz\in L$ and we have $xy^iz=a^{2p+(i-1)t}ba^p$. [Do you see why?] Now all you have to do is pick some $i$ so that $xy^iz\notin L$ to establish a contradiction and thus show that $L$ isn't regular.

I'll leave the rest for you: what $i$ can you use to show that $xy^iz\notin L$?

Rick Decker
  • 15,016
  • 5
  • 43
  • 54