Find a grammar for the language described below Assume sigma
Find a grammar for the language described below. Assume sigma - (a, b). L = {w: n_a(w) = n_b(w) + 1}.
Solution
Answer:
The required grammer for the given language is :
Z ---> aZ1 |Z1Z,
Z1 ---> Z1Z,
Z1---> Lemda,
Z1---> aZ1b,
Z1 ---> bZ1a
