{a^k,k is a prime is not contextfree}

  • Context: MHB 
  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Prime
Click For Summary

Discussion Overview

The discussion centers on the language $L=\{a^{k},\text{ k is a prime }\}$ and the attempt to demonstrate that it is not context-free using the pumping lemma. Participants explore various aspects of the proof, including the implications of prime numbers and the conditions set by the lemma.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant suggests using the pumping lemma and discusses the implications of adding $i|vy|$ to the length of $s$.
  • Another participant questions the assumption that the difference between consecutive prime numbers is greater than or equal to one, suggesting that the lemma does not imply falsehood if not explicitly stated.
  • Several participants propose that an arithmetic progression cannot consist entirely of prime numbers, indicating that such a member of the progression would factor into two numbers greater than one.
  • Concerns are raised about the clarity of the proof presentation, including the definitions of $s$ and $p$, and the interpretation of $|vy|$ in the context of the lemma.
  • One participant notes that whether $p$ is prime is irrelevant to the proof's validity.

Areas of Agreement / Disagreement

Participants express differing views on the application of the pumping lemma and the nature of prime numbers. There is no consensus on the best approach to demonstrate that the language is not context-free, and several points remain contested.

Contextual Notes

Participants highlight limitations in the proof's presentation, such as unclear terminology and assumptions regarding the properties of $|vy|$. The discussion reflects varying interpretations of the pumping lemma and its implications for the proof.

evinda
Gold Member
MHB
Messages
3,741
Reaction score
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??
 
Technology news on Phys.org
evinda said:
so we see that the difference of one prime number from the next one is greater or equal to one...
What would be the alternative: that the difference between one prime number and the next one is zero? :D

evinda said:
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.
In fact, it is given by the lemma; see point 2 here. More importantly, if the lemma does not state something explicitly, it does not follow that it is false.
 
Evgeny.Makarov said:
What would be the alternative: that the difference between one prime number and the next one is zero? :D

In fact, it is given by the lemma; see point 2 here. More importantly, if the lemma does not state something explicitly, it does not follow that it is false.

Ok,I understand...
 
The idea is to prove that an arithmetic progression cannot consists entirely of prime numbers. This requires a bit of ingenuity, but it is possible to construct a member of the progression that definitely factors into two numbers greater than one.
 
Evgeny.Makarov said:
The idea is to prove that an arithmetic progression cannot consists entirely of prime numbers. This requires a bit of ingenuity, but it is possible to construct a member of the progression that definitely factors into two numbers greater than one.

Could I show it maybe like that?

If we add $i|vy|$ at the length of $s$,it must still belong in $L$.
So $p+i|vy|$ must be a prime number for each $i \geq 0$. For $i=p$ we have $p+p|vy|=p(1+|vy|)$. $p$ is a prime greater than 1 and $|vy|>1$, so $ p(1+|vy|)$ is not a prime since it is written as a product of two factors greater than 1.
 
I think this works. Very well! But I have several remarks about the presentation.

evinda said:
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}$
What is $s$ and what is $p$?

evinda said:
and said that if we add $i|vy|$ at the length of $s$
I don't understand the phrase "add ... at the length of ...".

evinda said:
So $p+i|vy|$ must be a prime number for each $i \geq 0$. For $i=p$ we have $p+p|vy|=p(1+|vy|)$. $p$ is a prime greater than 1
Why is $p$ prime? In fact, whether $p$ is prime is irrelevant for the rest of the proof.

evinda said:
and $|vy|>1$
The variant of the lemma from Wikipedia only says $|vy|\ge1$.
 
Evgeny.Makarov said:
I think this works. Very well! But I have several remarks about the presentation.

What is $s$ and what is $p$?

I don't understand the phrase "add ... at the length of ...".

Why is $p$ prime? In fact, whether $p$ is prime is irrelevant for the rest of the proof.

The variant of the lemma from Wikipedia only says $|vy|\ge1$.

Nice..thank you! :)
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 28 ·
Replies
28
Views
5K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 13 ·
Replies
13
Views
3K
Replies
14
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K