Open In App
Related Articles

GATE | GATE CS 2021 | Set 1 | Question 61

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report
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

Last Updated : 24 May, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads