GATE CS 2017 (Forenoon) — Question 10

Theory of Computation (TOC)Context-Free Grammars & Push-Down AutomataMCQ1 mark · −1/3 if wrongMedium

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
    \(\{(ab)^n (cb)^n \mid n \geq 1\}\)
  2. B
    \(\{(ab)^n cb^{m_1} cb^{m_2} \dots cb^{m_n} \mid n, m_1, m_2, \dots, m_n \geq 1\}\)
  3. C
    \(\{(ab)^n (cb^m)^n \mid m, n \geq 1\}\)
  4. D
    \(\{(ab)^n (cb^n)^m \mid m, n \geq 1\}\)
Practise the full 2017-FN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkIntroduction to Automata Theory (Hopcroft & Ullman)Regular languages, CFGs, pushdown automata and Turing machines.
Practise more on Context-Free Grammars & Push-Down AutomataTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group