Is there a way to get complement? Following is my solution for CFG of all strings that DON'T contain bbb.S -> aA | aaB | aB | bA | bbAA -> aA| aBA -> epsilonB -> bA | bbAB -> epsilonIs this right?
What would be CFG for all strings which does not contain bbb?
context free;formal grammars
The complement of a context-free language isn't necessarily context-free so there's no general method to produce a grammar for the complement.