Problem on empty string

Give an algorithm that, given a grammar G = (V, Σ, R, S), decides whether the grammar G can derive the empty string.

E

Expert

Verified

Suppose that ^ does not belongs to L(G).

We use the algorithms for removing useless symbols and productions. If S is found to be useless, then L(G) is empty; if not, then L(G) contains at least one element.

   Related Questions in Theory of Computation

©TutorsGlobe All rights reserved 2022-2023.