We use normal forms in advanced topics of computation theory. Greibach's normal form and Chomsky's normal form are two methods of simplifying context-free grammar.
Grammar is in GNF if all the productions follow either of the following set of rules:
The following steps convert context-free grammar into Greibach's normal form.
Recursion may also occur after step 3; regardless, it must be removed.
Note: To learn more about CNF, visit here.
Let's consider the following grammar:
We'll appoint the values in order of the occurrence of the nonterminals. In this grammar
The production
The grammar now becomes:
Note: To learn how to remove left recursion, visit here.
Now we have finally converted a CFG to GNF.
In conclusion,
Every grammar in GNF is context-free, and every CFG can be converted into GNF.
Free Resources