I'm currently studying for an exam and I came across a question regarding grammar in formal languages for which I'm pretty sure the professor got the answer wrong, I'd like to hear your idea.
The question presents this grammar:
The question asks to define the language opposite of S (complement of S) of even length, meaning describe the rule for all the words of even length that are not accepted by grammar S.
Their answer is this:
I believe this answer is wrong, as the word "aaabab" also will not be accepted by S and is not a word concatenated to itself as their answer describes.
Any thoughts? Am I missing something here?
Thanks in advance, Avi.