Substitution Rule

Eliminating Useless Productions

A variable could be useless for two (2) reasons:

  1. It cannot be reached from the start symbol;
  2. It cannot derive a terminal string.