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.
Ans:-
S -> aSbb |
is the given productions where S is the start symbol
S -> aSbb
S ->
For each a there are two b's
a should be together and b should be together
If any doubt ask in the comments
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.
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.
Question 1. Let S = {a,b}, and consider the language L = {w E E* : 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”62m : n > 0} = {1, abb, aabbbb, aaabbbbbb, ...} Find production rules for a grammar that generates L.
et l(a) be the language generated by g(a) - (n, 2, s, p) where 2 - [a, b), n= {s,x) and s->axb ... Question: Let L(a) be the language generated by G(a) - (N, 2, S, P) where 2 - [a, b), N= {S,X) and S->aX... Let L(a) be the language generated by G(a) - (N, 2, S, P) where 2 - [a, b), N= {S,X) and S->aXb X->aX|bX|epsilon (i) (3 marks) Describe the language L(a). (First generate a few...
consider the language L = { a^m b^n : m>2n}, give context free grammar and Nondeteministc pUSH DOWN AUTOMATON
Let L be the language {0n 1m : n ≤ m ≤ 2n}. Is L regular? contextfree but not regular? or not context-free? Show that your answer is correct.
Given a language A= {0^(2n) 1^(n+1) | n >= 0} Please answer the following questions. Provide a context free grammar
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
Construct a grammar that generates the following language, L = (anbn+mam | n, m = 0, 1, 2, ...). Construct a grammar that generates the following language, L = (a"bn-ma" n, m = O, 1, 2, ..)
Question 8 10 pts Let S = {a,b,c}. Write a grammar that generates the language: L = {(ac)"6n+1w: n > 0, W € 2*, W contains the substring acb}