0

I am trying to show a that a $Language L$ is not regular. I have

$L = (P \{b\})^*$

Where

$P = \{ a^p | p = prime\}$

So i use the pumping lemma:

$1)\exists p\in \mathbb Z_{> 0} $

$2)S\in L$ such that $|s|\geq P$

Here I chose to string $a^pb$ since this will be 1 largers than $P$ (we will allways get P number of a's + b)

$3) s = w = xyz,$

$y\neq\epsilon$

$|xy|\leq P$

Here is where I start getting lost i think. But my reasoning is as follows:

Since $|xy| \leq P$ and we have $a^pb$ then $xy$ MUST concist of only $a$'s and we get

$x = a^i; y = a^j; z = a^{p-i-j}b $

$4) \exists k \geq 0$,

$xy^kz \notin L$

Here I am struggling to find a k such that the string $\notin L$

Lets say I use $k = 0$ I get $xy^0z = xz = a^ia^{p-i-j}b = a^{p-j}b$ and since we know that $y\neq\epsilon$ $y$ can be any arbitrary number above 0. so $a^{p-j}$ could easily bring us to any prime? Im very new to this so I may have missed something in one or severeal steps, any pointers would be great!

darrrrUC
  • 331
  • Using the pumping lemma directly is going to be hard. Instead, just show that if $L$ is regular, then so is $P$, and apply the pumping lemma to prove that $P$ isn't regular. – Thomas Andrews Sep 09 '16 at 14:19
  • How would I go on about showing that if $L$ is regular then so is $P$?, thanks – darrrrUC Sep 09 '16 at 14:27

1 Answers1

1

HINT: You’ve done all the hard work; you just haven’t spotted the payoff. You have

$$xy^kz=a^ia^{kj}a^{p-i-j}b=a^{p+(k-1)j}b\;,$$

where $j>0$. What happens if $k=p+1$?

Brian M. Scott
  • 616,228