Given the context-free grammar G = ( {S, A, B, C} , {0, 1} , P , S)
, where the set of productions P
is:
S → 0A0 | 1B1 | BB
A → C
B → S | A
C → S | λ
I am supposed to remove the useless symbols.
My questions is should I consider the empty string λ a terminal here while applying the algorithm where I create a new set V'
containing symbols resulting in direct derivations then adding to V'
symbols that produce a combination of terminals and variables in V'
.
Any guidance is appreciated,
Thanks