Open In App
Related Articles

GATE | GATE CS 2021 | Set 1 | Question 61

Improve Article
Save Article
Like Article

In a pushdown automaton P=(Q,Σ,Γ,δ,q0,F), a transition of the form,

where p,q∈Q, a∈σ∪{ϵ}, X,Y,∈Γ∪{ϵ}, represents

(q,Y) ∈ δ(p,a,X) 

Consider the following pushdown automaton over the input alphabet Σ={a,b} and stack alphabet Γ={#,A}.

The number of strings of length 100 accepted by the above pushdown automaton is ___________ .
(A) 50
(B) 100
(C) 55
(D) 45

Answer: (A)

Explanation: According to given question,

L = {anbm| n>m & n+m=100}
L = a51b49,…..,a99b,a100
|L| = 50 

For reaching q3 from q2 there must be “A” on the top of the stack, hence n>m.

Quiz of this Question

Level Up Your GATE Prep!
Embark on a transformative journey towards GATE success by choosing Data Science & AI as your second paper choice with our specialized course. If you find yourself lost in the vast landscape of the GATE syllabus, our program is the compass you need.

Last Updated : 24 May, 2021
Like Article
Save Article
Similar Reads