Give a grammar that generates the following language The set
Give a grammar that generates the following language. The set of terminals T is given for the grammar. L = {an bm | n+m is even}. T = {a, b}.
Solution
from the below grammar we can generate above language:
S->eps
S->ab|aSb|bSa|ba
S->aaS|bbS|Saa|Sbb
