Pushdown Automata


Answer & solution
Official answer: C
Worked explanation
A deterministic pushdown recognizer can use an accepting a-phase, initially with a bottom marker. Each a pushes one marker. Seeing the first b changes permanently to a b-phase and pops one marker per b; a b with no marker, or any later a, rejects. At end-of-input it accepts either the a-phase (including ε) or the b-phase with exactly the bottom marker left. This establishes I constructively and rejects II. The familiar non-LL(k) separation is a language-level result: do not infer it merely because the obvious grammar S→A|B, A→aA|ε, B→aBb|ε has a FIRST-set conflict. The shared-prefix argument below explains the obstruction; a full formal proof that no equivalent LL(k) grammar exists requires the bounded-lookahead language theorem, not just testing that one grammar. III is the standard classification used by the official answer.
Derivation and answer
A DPDA pushes while reading a symbols, then pops one per b after the first b. It accepts an all-a input by final state at end-of-input, and accepts an an bn input when the count matches, so the language is deterministic context-free. The standard strict-separation example a* union {an bn} is not an LL(k) language for any finite k: arbitrarily long common a-prefixes postpone the distinction between an unmatched all-a ending and the matching b-suffix beyond any fixed lookahead. A predictive leftmost derivation cannot use that late distinction to discharge an unbounded number of already predicted matching b obligations. This is the language-level bounded-lookahead obstruction, not merely an observation that one displayed grammar is not left-factored. Thus I and III, C.