GATE / CS ARCHIVE

GATE CSE 2002 / QUESTION 1.7

Pushdown automaton with bounded stack

Theory of Computation · Pushdown Automata · Full GATE CSE 2002 paper

GATE 2002, Q1.7 1 mark · MCQ
Report issue

Pushdown Automata

Question 1.7, GATE 2002: A pushdown automaton is restricted to at most 10 stack items. Which class best describes the language it accepts?
(A) Context-free; (B) Regular; (C) Deterministic context-free; (D) Recursive.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step 1: Turn stack contents into finite control.

Step 2: If the stack alphabet has s symbols, at most 1+s+…+s10 stack words are possible. With q control states, at most q(1+s+…+s10) combined configurations are needed, apart from fixed acceptance bookkeeping. Every push/pop transition can be represented between these finite states, so an unbounded-memory PDA advantage is absent.

Conclusion: A fixed finite stack alphabet and maximum stack height 10 allow only finitely many stack strings. Pairing each with the finite control state yields a finite automaton, including epsilon transitions if needed. Hence the language is regular, B; the larger language classes listed are less precise.

Original paper, page 1