GATE CS 2025 Set 1 | Question 19
Theory of Computation › Context Free Grammar · MCQ · 1 mark · Answer: A
- Question 19Theory of Computationmcq1 markConsider 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:
Which ONE of the languages is accepted by ?S -> aaB | Abb A -> a | aA B -> b | bB- A.✓
- B.
- C.
- D.
Answer: A
Solution
Answer: (A) generates (one or more 's); generates . - with . - with . Their union is exactly option (A). - 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 →