Let G be a context-free grammar where G = ({S, A, B, C}, {a, b, d}, P, S) with…

PYQ GATE 1996

Let G be a context-free grammar where G = ({S, A, B, C}, {a, b, d}, P, S) with the productions in P given below.

S → ABAC
A → aA | ε
B → bB | ε
C → d

(ε denotes the null string.) Transform the grammar G to an equivalent context-free grammar G′ that has no ε-productions and no unit productions. (A unit production is of the form x → y, where x and y are nonterminals.)

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…