GATE CS 2021 Set 1 | Question 61
Theory of Computation › Context Free Grammar · NAT · 2 marks · Answer: 50
- Question 61Theory of Computationnat2 marksIn a pushdown automaton , a transition of the form shown represents . Consider the pushdown automaton over the input alphabet and stack alphabet shown in the figure. The number of strings of length 100 accepted by the above pushdown automaton is ______.

Answer: 50
Solution
The PDA pushes an for each and pops one for each , and reaches the accepting state only while an remains, i.e. it accepts with . For we need , i.e. — exactly 50 strings.
More GATE PYQ on Context Free Grammar
All GATE CS Theory of Computation PYQ →Attempt GATE CS 2021 Set 1 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →