If \(G\) is a grammar with productions \(S\rightarrow SaS\mid aSb\mid bSa\mid…

PYQ GATE 2017

If GG is a grammar with productions

S→SaS∣aSb∣bSa∣SS∣ϵS\rightarrow SaS\mid aSb\mid bSa\mid SS\mid\epsilon

where SS is the start variable, then which one of the following strings is not generated by GG ?

  1. A.

    abababab

  2. B.

    aaabaaab

  3. C.

    abbaaabbaa

  4. D.

    babbababba

Attempted by 193 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…