I'm working with CFG and every time I write up rules to a particular language, my CFG ends up disgusting. It ends up as one line:
S->tooooooo much stuff
I know that putting things into chomsky normal form will put it in the correct format and things will be prettier but I was wondering if there are any ideas to keep in mind for making these look less cluttered.
i.e., lang:
a^n b^m, where n >= m
My CFG (gross):
S -> Sa|Sab|Sba|aS|aSb|abS|bSa|baS|ε
Can anyone help me with my bad habits?