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

GATE · 2017 · CS · Set 1 · Computer Science & IT

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 161 students.

Sign up free to check your answer

Sign up free

Explore the full course: Theory Of Computation

Loading lesson…