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
  • 7. Let Σ = {a}, and consider the language L = {a n : n is...

    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. . . ) 8. Design a Turing machine that calculates the sum of...

  • Let Σ = { a } , and consider the language L = { a n...

    Let Σ = { a } , and consider the language L = { a n : n is a prime number } = { a 2 , a 3 , a 5 , a 7 , a 11 , . . . } . 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. ....

  • Question 1. Let Σ = {a, b}, and consider the language L = {w ∈ Σ...

    Question 1. Let Σ = {a, b}, and consider the language L = {w ∈ Σ ∗ : w contains at least one b and an even number of a’s}. Draw a graph representing a DFA (not NFA) that accepts this language. Question 2. Let L be the language given below. L = {a n b 2n : n ≥ 0} = {λ, abb, aabbbb, aaabbbbbb, . . .} Find production rules for a grammar that generates L.

  • Let Σ = {a, b}. Consider the language L over Σ that contains Λ and all...

    Let Σ = {a, b}. Consider the language L over Σ that contains Λ and all words whose length is divisible by 6. Build a transition graph that accepts L.

  • Question 1. Let Σ = {a, b}, and consider the language L = {w ∈ Σ...

    Question 1. Let Σ = {a, b}, and consider the language L = {w ∈ Σ ∗ : w contains at least one b and an even number of a’s}. Draw a graph representing a DFA (not NFA) that accepts this language.

  • Question 5. Let Σ = {a, b}, and consider the language L = {a^n : n...

    Question 5. Let Σ = {a, b}, and consider the language L = {a^n : n is even} ∪ {b^n : n is odd}. Draw a graph representing a DFA (not NFA) that accepts this language.

  • . Let Σ = { a, b } , and consider the language L = {...

    . Let Σ = { a, b } , and consider the language L = { w ∈ Σ ∗ : w contains at least one b and an even number of a’s } . Draw a graph representing a DFA (not NFA) that accepts this language.

  • Question 5. Let Σ = {a, b}, and consider the language L = {a n :...

    Question 5. Let Σ = {a, b}, and consider the language L = {a n : n is even} ∪ {b n : n is odd}. Draw a graph representing a DFA (not NFA) that accepts this language. Question 6. Give a brief description of the language generated by the following production rules. S → abc S → aXbc Xb → bX Xc → Ybcc bY → Yb aY → aa aY → aaX

  • Let Σ = {0,1}and define a language L over Σ as L = {0n10n10n : n...

    Let Σ = {0,1}and define a language L over Σ as L = {0n10n10n : n ≥1} Show that L is not context-free. Remark: Compare this with language S1 onpage106,which is context free. Hint: Let p be the pumping constant and consider the string s = 0p10p10p. Write s as in the Pumping Lemma. Either vy has no zeros,or it has at leas tone zero;consider theses cases separately.

  • Let Σ = { a, b } , and consider the language L = { a...

    Let Σ = { a, b } , and consider the language L = { a n : n is even } ∪ { b n : n is odd } . Draw a graph representing a DFA (not NFA) that accepts this language.

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