Question

Automata theory Q1: Assume S = {a, b}. Build a CFG for the language of all...

Automata theory

Q1:

Assume S = {a, b}.

Build a CFG for the language of all strings with a triple a in them. Give a regular expression for the same language. Convert the CFG into CNF grammar.

Q2:

Assume S = {a, b}.

Build a CFG for the language defined by (aaa+b)*. Convert the CFG into CNF grammar.

Q3:

Explain when a CFG is ambiguous. Give an example of an ambiguous CFG.

give vedio link also

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

ol) cFo CF fr the lo have aaain hm 6 CFS. Regulas Eyprebion s oducion lowing type Not CNE h 6つしmver ting t CNF Aa, b mere an ne fice for tomc string: b ceし ab e e a b oub ab

Add a comment
Know the answer?
Add Answer to:
Automata theory Q1: Assume S = {a, b}. Build a CFG for the language of all...
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
  • Automata Theory I've given my answer to 3d. Is it correct? If not, please correct it. Thanks

    Automata Theory I've given my answer to 3d. Is it correct? If not, please correct it. Thanks 3. Context-free languages are useful for the definition of programming languages. For example, we have looked at grammars for defining Lisp and C. (a) Give a context-free language that is not regular, establishing the added power of CFL (b) What language is accepted by the following grammar: (c) Build a context-free grammar for the language (wb w-wR, k 0 a,by (d) Build a...

  • Given the following ambiguous context free grammar (3x20) 1. (a) Explain why the grammar is ambiguous...

    Given the following ambiguous context free grammar (3x20) 1. (a) Explain why the grammar is ambiguous (b) Find an equivalent unambiguous context-free grammar. (c) Give the unique leftmost derivation and derivation tree for the string s generated from the unambiguous grammar above. 2. Construct non-deterministic pushdown automata to accept the following language (20) 3. Convert the following CFG into an cquivalent CFG in Chomsky Normal Form (CNF) (20)-

  • Q1: Assume S = {a, b}. Build a Pushdown Automata for odd number of a’s and...

    Q1: Assume S = {a, b}. Build a Pushdown Automata for odd number of a’s and odd number of b’s including ˄. Q2: Assume S = {a, b}. Build a Turing Machine for odd number of a’s and odd number of b’s.

  • Please answer any 7 of them ТОС Answer any 7 from the followings: 1. Regular expression...

    Please answer any 7 of them ТОС Answer any 7 from the followings: 1. Regular expression to NFA: i) ab(aUb)* ii) (aba U a)*ab 2. Explain and construct a generalized NFA, 3. NFA to regular expression 0 3 91 93 8 a 4. DFA to regular expression 011 5. Explain the rules of pumping lemma briefly with an example. 6. Give an example of right linear grammar and left linear grammar. 7. L(G) = {1*20 m >= 1 and >=1}....

  • can you plzz do question 1 and 2 Question 1. Design a CFG for the language...

    can you plzz do question 1 and 2 Question 1. Design a CFG for the language over = {1, #} whose elements consist of every pair of distinct, #-separated unary values: L = {rı#x2 | 21, 22 € 1", 21 * x2}. Question 2. Design a CFG for the language of binary strings that contain at least one 1 in their second half: L = {uv | UE (OU 1)", v € OU 1)*1(0U 1)", [u '}. Question 3. This...

  • Given regular language Lab" + a". Construct a. a FA to accept L b. construct a...

    Given regular language Lab" + a". Construct a. a FA to accept L b. construct a PDA to accept L 3. 4. Given CFG: S asb lax a. Remove A b. Convert the grammar to CNF c. Construct a PDA for the new grammar

  • Theory of Computation - Push Down Automata (PDA) and Context Free Grammars (CFG) Problem 1. From...

    Theory of Computation - Push Down Automata (PDA) and Context Free Grammars (CFG) Problem 1. From a language description to a PDA Show state diagrams of PDAs for the following languages: a. The set of strings over the alphabet fa, b) with twice as many a's as b's. Hint: in class, we showed a PDA when the number of as is the same as the number of bs, based on the idea of a counter. + Can we use a...

  • • Build an FA that accepts the language of all words with only a’s or only...

    • Build an FA that accepts the language of all words with only a’s or only b’s in them. For example, a, aa, aaa, b, bb, bbb, etc are in the language, while null string, ab, ba, aab, aba, bab, bba, baa, etc are not in the language. • Give a regular expression for this language.

  • Automata and Computability problems Please check my work and make necessary corrections/edits. Add details to my...

    Automata and Computability problems Please check my work and make necessary corrections/edits. Add details to my work as well :) 3. Determine whether the grammar implicitly defined by the following rules is ambiguous. Prove your answer. S > AB А ЭaA A > abA Αε В ЭbВ B → abB B → 4. Give pushdown automata that recognize the following languages. (a) A = {w € {0,11 w contains at least three 1s) 3. It is ambiguous. Here are two...

  • formal language automata 1. (15p) Consider the Context-free grammar G defined by: S → 0A1A1A1A A0A1A...

    formal language automata 1. (15p) Consider the Context-free grammar G defined by: S → 0A1A1A1A A0A1A a) Describe L(G). (5p) b) Convert G into a Pushdown Automaton (PDA). (10p)

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