languages



I have this problem that I'm trying to solve that involves writing down
a grammar for the following structures:

L = {a^nb*a^n : n >= 0} and L ={ z in {0,1,2}* : number of 0's are
equal to number of 1's + number of 2's }

Does anyone have any ideas on how to generate a simle CFG for that?

.