Reputation:
I'm currently learning about CNF and I'm a bit confused.
Given this grammar:
S -> ab | aSb
will result to CNF:
S -> AB | XB
X -> AY
Y -> AB | XB
A -> a
B -> b
How about this:
S -> c | aSa | bSb
Can someone boost me up a little on this one. thanks.
Upvotes: 1
Views: 77