GATE CS 2025 Set 1 | Question 19

Theory of Computation › Context Free Grammar · MCQ · 1 mark · Answer: A

  1. Question 19Theory of Computationmcq1 mark
    Consider the following context-free grammar , where are the variables (non-terminals), and are the terminal symbols, is the start variable, and the rules of are:
    S -> aaB | Abb
    A -> a | aA
    B -> b | bB
    Which ONE of the languages is accepted by ?
    • A.
      ✓
    • B.
    • C.
    • D.

    Answer: A

    Solution

    Answer: (A) generates (one or more 's); generates . - with . - with . Their union is exactly option (A).

More GATE PYQ on Context Free Grammar

All GATE CS Theory of Computation PYQ →

Attempt GATE CS 2025 Set 1 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →