GATE CS 2026 (Forenoon) — Question 25

Theory of Computation (TOC)Context-Free Grammars & Push-Down AutomataMSQ1 markHard

Consider the following grammar where \( S \) is the start symbol, and \( a \) and \( b \) are terminal symbols. \( S \rightarrow aSbS \mid bS \mid \epsilon \) Which of the following statements is/are true?
  1. A
    The grammar is ambiguous.
  2. B
    The string \( abb \) has two distinct derivations in this grammar.
  3. C
    The string \( abab \) has only one rightmost derivation.
  4. D
    The language generated by the grammar is undecidable.
Practise the full 2026-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