Consider G=(,P,S), where P consists of S →AB, A →a, B →b and E →c. Remove the e productions and generate the number of productions from S in the modified or simplified grammar.Ĭlarification: The grammar after the removal of epsilon production can be shown as:ĩ. If all x(i) are nullable,Ĭlarification: It is an exception that A->e is not put into P’ if all x(i) are nullable variables.
Put into P’ that production as well as all those generated by replacing null variables with e in all possible combinations. Then there exists an equivalent grammar G’ having no e-productions. Then there exists an equivalent grammar G’ having no e productions.Ĭlarification: Theorem: Let G = (V, T, S, P) be a CFG such that e ∉ L(G).
The number of productions added on the removal of the nullable in the given grammar:Ĭlarification: The modified grammar aftyer the removal of nullable can be shown as:Ħ. So whenever it appears on the right side of the production, replace with another production without the A.Ĭlarification: As X is nullable, we replace every right hand side presence of X with e and produce the simplified result. So whenever it appears on the left side of a production, replace with another production without the A.Ĭlarification: A can be erased. The variable which produces an epsilon is called:Ĭlarification: Any variable A for which the derivation: A->*e is possible is called Nullable.įor A-> e ,A can be erased. The use of variable dependency graph is in:Ĭlarification: We use the concept of dependency graph inorder to check, whether any of the variable is reachable from the starting variable or not.Ģ. Automata Theory Multiple Choice Questions on “Eliminating Epsilon Productions”.ġ.