11. Find grammars for ∑ = {a, b} that generate the sets of
(a) all strings with exactly one a.
(b) all strings with at least one a.
(c) all strings with no more than three a’s.
(d) all strings with at least three a’s.
In each case, give convincing arguments that the grammar you give does
indeed generate the indicated language.
12. Give a simple description of the language generated by the grammar with
productions
13. What language does the grammar with these productions generate?
14. Let ∑ = {a, b}. For each of the following languages, find a grammar that
generates it.
(a) L 1 = {a n b m : n ≥ 0, m > n}.
(b) L 2 = {a n b 2n : n ≥ 0}.
(c) L 3 = {a n+2 b n : n ≥ 1}.
(d) L 4 = {a n b n−3 : n ≥ 3}.
(e) L 1 L 2 .
(f) L 1 ∪ L 2 .
(g) .
(a) all strings with exactly one a.
(b) all strings with at least one a.
(c) all strings with no more than three a’s.
(d) all strings with at least three a’s.
In each case, give convincing arguments that the grammar you give does
indeed generate the indicated language.
12. Give a simple description of the language generated by the grammar with
productions
13. What language does the grammar with these productions generate?
14. Let ∑ = {a, b}. For each of the following languages, find a grammar that
generates it.
(a) L 1 = {a n b m : n ≥ 0, m > n}.
(b) L 2 = {a n b 2n : n ≥ 0}.
(c) L 3 = {a n+2 b n : n ≥ 1}.
(d) L 4 = {a n b n−3 : n ≥ 3}.
(e) L 1 L 2 .
(f) L 1 ∪ L 2 .
(g) .
