Fourteenth Lecture
Wednesday, October 25
Normal Forms for Context-Free Grammars
Normal forms are useful to simply reasonings.
Chomsky Normal Form
Make derivation trees binary, with all internal nodes nonterminals, single
letters at leaves (parents have outdegree 1).
More formal usual definition: all rules of the form
NONTERMINAL1 ---> NONTERMINAL2 NONTERMINAL3
or
NONTERMINAL ----> terminal
Eliminating epsilon-rules
Advantage: derivations become nondecreasing length (so it is decidable whether
a given string is generated.)
Need special rule to have the empty string generated.
Eliminating Unit Productions
See text.
Greibach Normal Form
Algorithm seems complicated: isn't. It's just messy notation.