In the context-free grammar below, S is the start symbol, a and b are…

GATE · 2006 · IT

In the context-free grammar below, S is the start symbol, a and b are terminals, and ϵ denotes the empty string S → aSa | bSb | a | b | ϵ Which of the following strings is NOT generated by the grammar?  

  1. A.

    aaaa

  2. B.

    baba

  3. C.

    abba

  4. D.

    babaaabab

Attempted by 61 students.

Show answer

Correct answer: B

The worked solution is available to enrolled students.

Video solution available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…