Recently i was studying removal of useless symbols in productions given in Ullman Hopcroft.
The grammar goes as follows
S-> aAa | aBC
A -> aS | bD
B - > aBa | b
C-> abb | DD
D -> aDa
In the explanation that follows, we eliminate D obviously, but the removal of C still baffles me. As D is non generating, but C is both generating and reachable. So why delete C?
The resultant grammar is shown as
S->aAa
A->aS
B->aBa | b
Here is the link to the photo of the page in the book just in case
Page 240:
Page 241: