Consider the context-free grammars over the alphabet \(\left \{ a, b, c \right…

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

Consider the context-free grammars over the alphabet \(\left \{ a, b, c \right \}\) given below. \(S\) and \(T\) are non-terminals.

\(G_{1}:S\rightarrow aSb \mid T, T \rightarrow cT \mid \epsilon\)

\(G_{2}:S\rightarrow bSa \mid T, T \rightarrow cT \mid \epsilon\)

The language \(L\left ( G_{1} \right )\cap L(G_{2})\) is

  1. A.

    Finite

  2. B.

    Not finite but regular

  3. C.

    Context-Free but not regular

  4. D.

    Recursive but not context-free

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