Is following a regular set 1p where p is a prime and p 10000

Is following a regular set {1^p, where p is a prime and p 10000} ? Prove your answer.

Solution

1) Yes. It is a regular set, because the set is finite. Every set which is of finite length is regular.

2) The set is not regular. We need to use pumping lemma to prove this. Let us call the set L, Pumping lemma states that for every set L there exists a length p, for every string s which of length of atleast p. S can be divided in to xyz. The following condition are satisfied,

a) |y|>0

b) |xy|<=p

c) xy^iz belongs to L (i >= 0)

Let us consider i as |xz| so |xy^iz| is |xz| + |y||xz| which is |xz|(1+|y|), so the length is not a prime. Therefore |xy^iz| does not belong to L. So therefore L is not regular.

 Is following a regular set {1^p, where p is a prime and p 10000} ? Prove your answer.Solution1) Yes. It is a regular set, because the set is finite. Every set

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site