Question

Question 7. Let Σ = {a}, and consider the language L = {a^n : n is...

Question 7. Let Σ = {a}, and consider the language

L = {a^n : n is a prime number} = {a 2 , a3 , a5 , a7 , a11 , . . .}.

Is L a regular language? Why or why not?

(Hint: L contains a 11 , a 17 , a 23 , a 29, but not a 77 since 77 is divisible by 11. . . )

0 0
Add a comment Improve this question Transcribed image text
Answer #1

A regular language is language for which a regular expression can be written and a finite automata can be created.

A language is a set of strings over a predefined alphabets or symbols.

In the given language only those strings can be accepted which contains a's and its length is a prime number.

The given language is not a regular language as there is no proper pattern formed between the length of the strings of the language( the lengths are not in arithmatic progression). So regular expression can not be written for this language and finite automata cannot be created for it.

By pumping lemma for regular language a string w belongs to language L such that |w|<=n, for some positive integer n, then w can be decomposed into three strings w=xyz such that

  1. y\neq \epsilon , length of y is not zero.
  2. |xy|<=n
  3. For every k>=0, the string xy^{k}z ​​ is also in language L.

But in the given language L={aa, aaa, aaaaa, aaaaaaa..........}, the string y can not be found which can produce all the strings that contains  a's and its length is a prime number. So the language is not regular.

Add a comment
Know the answer?
Add Answer to:
Question 7. Let Σ = {a}, and consider the language L = {a^n : n is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT