Nonproductive nonterminal Created 2026-09-24 Updated 2026-09-24
A nonterminal is nonproductive when no word derived from it consists entirely of terminal symbols. Every derivation containing such a symbol therefore fails to produce a word in the generated language.
The grammars are non-equivalent. In the first grammar, terminal derivations without give
After applying any number of times while and remain adjacent, the production also gives
Hence, in particular, and .
In the second grammar, the fixed terminals in prevent and from ever becoming adjacent, so can never be used. The remaining productions give exactly
Thus , proving that the generated languages differ.
Unreachable nonterminal Created 2026-09-24 Updated 2026-09-24
A nonterminal is unreachable when no word derivable from the start symbol contains it. Productions whose left sides are unreachable do not affect the generated language.