Hi,
I was attempting to convert the following grammer into CNF
S -> XY
X -> aXb | e
Y -> aY | a
The Mark Scheme gives the following:
S -> AX | AY | a
X -> AK | AB
Y -> AY | b
A -> a
B ->b
K -> XB
But i get this:
S -> XY | AY | a
X -> AK | AB
Y -> AY | a
A -> a
B ->b
K -> XB
Where am I going wrong? I'm so confused i'm even thinking the mark scheme might be wrong.
Thanks in advance