The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes

L = {a^n: n ≥ 2, is a prime number}.

This is not a regular language.

What about L*?

Is it regular? Please explain.

asked in Theory of Computation by Active (1k points) | 77 views

1 Answer

+1 vote

Let ∑ = {a} and L1 = ∑* 

Then we can say that L1 is regular.

Now take any arbitrary string x belongs to ∑*

then x = am for some integer m

Now, m must have a prime factor p

Hence m = p*k (for some integer k)

Hence, am = ap . ap . ap . ap .....(concatenating the string ap k times)

Now, ap belongs to L (given in the question )  which means (ap )k  belongs to L*

Hence am belongs to L*  which means x belongs to L*

So, for any arbitrary string x belongs to ∑* we get that x belongs to L*

Hence ∑* = L* 

Thus L* is a regular language.

answered by Loyal (8.5k points)
edited by


L* contains Language L which is not prime. So How can you say that L* is regular?

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

46,762 questions
51,219 answers
66,579 users