GATEverse
← GATE CSE 1996

Q11

NATMarks unknown

Let GG be a context-free grammar where G=({S,A,B,C},{a,b,d},P,S)G=(\{S, A, B, C\}, \{a, b, d\}, P, S) with the productions in PP given below. S→ABACS \rightarrow ABAC A→aA∣εA \rightarrow aA \mid \varepsilon B→bB∣εB \rightarrow bB \mid \varepsilon C→dC \rightarrow d (ε\varepsilon denotes the null string). Transform the grammar GG to an equivalent context-free grammar G′G' that has no ε\varepsilon productions and no unit productions. (A unit production is of the form x→yx \rightarrow y, and xx and yy are non terminals).

Sign in to save attempts.

Loading…