I have these productions:
S->aSb
S-> eps (eps=empty string)
I should apply the Chomsky Normal Form
My reasoning:
1) eliminate the eps rules Given:
S->aSb
S-> eps
I get:
S->ab
S->aSb
2) eliminate the unit rules
There are none
3) remove useless symbols
I get:
S->ab
So, the given grammar after applying CNF (Chomsky Normal Form) becomes:
S->ab
Am I right?