Before anything, yes, this is from coursework and I’ve been at it sporadically while dealing with another project.
A language consists of those strings (of terminals ‘a’ and ‘b’) where the number of a = number of b. Trying to find the production rules of the grammar that will define the above language.
More formally, L(G) = {w | Na(w) = Nb(w)}
So i guess it should go something like, L = {ϵ, ab, aabb, abab, abba, bbaa, … and so on }
Any hints, or even related problems with solution would do which might help me better grasp the present problem.
I think this is it:
Edit: I changed the rules. Now here’s how to produce
bbaaabab