8. The only nullable variable is A, so removing λ-productions gives
C → B is the only unit-production and removing it results in
Finally, B and C are useless, so we get
The language generated by this grammar is L ((aa) * a).
13.
15. An example is
When we remove λ-productions we get
17. This is obvious since the removal of useless productions never adds
anything to the grammar.
22. The grammar S → aA; A → a does not have any useless productions, any
C → B is the only unit-production and removing it results in
Finally, B and C are useless, so we get
The language generated by this grammar is L ((aa) * a).
13.
15. An example is
When we remove λ-productions we get
17. This is obvious since the removal of useless productions never adds
anything to the grammar.
22. The grammar S → aA; A → a does not have any useless productions, any
