I saw the answer in one of the solutions and I cannot figure out how they got the answer. The question is asked if the word is in the language or not for CNF...
How did they get the answer so that ab is in the language and aaaa is not in the language here ?
S -> aSb |ab ab Yes aaaa No aabb Yes
aaaa No because it has b in
ab is yes because obviously
ab is there in
aabb is in the language because of
aSb cause you would add same amount of
b's to both sides