Consider the following context-free grammar over the alphabet \(\Sigma =…

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

Consider the following context-free grammar over the alphabet \(\Sigma = \{a,b,c\}\) with \(S\) as the start symbol:

\(S \rightarrow abScT \mid abcT\)

\(T \rightarrow bT \mid b\)

Which one of the following represents the language generated by the above grammar?

  1. A.

    \(\{\left ( ab \right )^{n}\left ( cb \right )^{n} \mid n \geq 1 \}\)

  2. B.

    \(\{\left ( ab \right )^{n}cb^{m_{1}}cb^{m_{2}}...cb^{m_{n}} \mid n, m_{1}, m_{2}, ..., m_{n} \geq 1 \}\)

  3. C.

    \(\{\left ( ab \right )^{n}\left ( cb^{m} \right )^{n} \mid m,n \geq 1 \}\)

  4. D.

    \(\{\left ( ab \right )^{n}\left ( cb^{n} \right )^{m} \mid m,n \geq 1 \}\)

Attempted by 99 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…