A context-free formal language or a Type 2 language
is produced by the rules
Proposition
For a context free grammar
there is a (not necessarily unique) Parse Tree
Theorem
Every context free grammar
has a Chomsky Normal Form grammar
such that
Proof (sketch)
The product rules we need to kick out are:
- Unit productions
- bad productions
where but - very bad productions
where but contains terminal symbols.
First kick the very bad productions out easily.
Then add unit closure rules (for every and add rule )
and prove that removing unit productions from a unit closed grammar
doesn’t change the language.
Then remove the bad productions
by introducing a bunch of new variables for each of the bad productions
and sticking them together.