: If a CFG hasonly productions of the formnonterminal
string of two nonterminalsor nonterminal
one terminalthen the CFG is said to be in Chomsky NormalForm (CNF).
It is to be noted that any CFG can beconverted to be in CNF, if the null productions and unit productions areremoved. Also if a CFG contains nullable productions as well, then the correspondingnew production are also to be added. Whichleads the following theorem
All NONNULL words of the CFL can begenerated by the corresponding CFGwhich is in CNF
the grammar in CNFwill generate the same language exceptthe null string.Following is an example showing that aCFG in CNF generates all nonnull wordsof corresponding CFL.