- #1
evinda
Gold Member
MHB
- 3,836
- 0
Hi! :) I have to show that the language $L=\{a^{k},\text{ k is a prime }\}$ is not context-free..I thought that I could show this,using the pumping lemma.I took the word $s^{p}$,and said that if we add $i|vy|$ at the length of $s$,it must still belong in $L$..To show that it is not possible,I said:for i=|vy|,we have $p+i|vy|=p+|vy|^{2}=k$ ,if we take i=|vy|+1,we have $p+i|vy|=k+|vy|$.Some of the prime numbers are:2,3,5,7,11,13,... so we see that the difference of one prime number from the next one is greater or equal to one...So,if $p+(|vy|+1)|vy|$ was the next prime after $p+|vy|^{2}$,$|vy|$ should be greater than one,something that is not given from the pumping lemma.So,the first condition is not satisfied and so we conclude that the language is not contextfree...Could you tell me if I can explain it like that??