Skip to content
Related Articles

Related Articles

GATE | GATE CS 2021 | Set 1 | Question 61

Improve Article
Save Article
Like Article
  • Difficulty Level : Easy
  • Last Updated : 24 May, 2021

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!