user3000731
user3000731

Reputation: 93

Derivations for Context Free Grammar

Ultimately I want to convert the following CFG into Chomsky Normal Form:

S→aSbS∣bSaS∣ε

However, I'm not sure if I'm doing the derivations correctly--here is what I have:

Replacing nonterminals with terminals

S→aabb

S→ε

Could someone tell me if this is correct/on the right track?

Thank you.

Upvotes: 1

Views: 124

Answers (1)

As @Ashalynd wrote, you should read a bit more about Chomsky Normal Form:

Chomsky normal form means no epsilon, and no complex statements.

The grammar you have contains an ε and therefore can never be transformed into a CNF as ε is a valid sentence in the language produced by S.

Upvotes: 0

Related Questions