GATE CS 2023 | Question 40

Theory of Computation › Context Free Grammar · MCQ · 2 marks · Answer: A

  1. Question 40Theory of Computationmcq2 marks
    The PDA shown (states , start , accepts by empty stack) runs on . Which language does it accept?
    GATE CS 2023 Question 40 figure
    • A.
      ✓
    • B.
    • C.
    • D.

    Answer: A

    Solution

    Answer: (A) In state each 'a' pushes an (so at least one is needed, ). Reading 'b' moves to and pops one per . To empty the stack and accept, at least one must still be removed by an epsilon-transition after the 's - so there must be strictly more 's than 's, i.e. . Hence the language is .

More GATE PYQ on Context Free Grammar

All GATE CS Theory of Computation PYQ →

Attempt GATE CS 2023 in real GATE exam mode

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

Create free account →