Back to the 2023 paper

Module 2: Context-Free Languages (CFL) and PDA

20232m

A language accepted by deterministic pushdown automata is closed under which of the following?

(i) Complement
(ii) Union
(iii) Both (i) and (ii)
(iv) None of the above

Worked SolutionAI Assisted

Answer

Correct Option: (i) Complement

Explanation

Languages accepted by Deterministic Pushdown Automata (DPDA) are Deterministic Context-Free Languages (DCFLs).

Closure Properties of DCFLs

Operation Closed?
Complement Yes
Union No
Intersection No
Intersection with Regular Yes
Concatenation No
Kleene Star No

Reason:

  • A DPDA can be complemented by swapping final/non-final states after ensuring it is total and handles end-of-input deterministically, similar to DFA complementation, but adapted for stack handling.
  • DCFLs are not closed under union: e.g., L1={anbn∣n≥0}L_1 = \{a^n b^n \mid n\ge0\} and L2={anb2n∣n≥0}L_2 = \{a^n b^{2n} \mid n\ge0\} are DCFLs, but L1∪L2L_1 \cup L_2 is not a DCFL.
  • Since union fails, (iii) Both is false and (iv) is false.

Contrast with general CFLs (NPDA)

CFLs (non-deterministic) are not closed under complement nor intersection, but are closed under union, concatenation, Kleene star – opposite behaviour.

Final Answer

DCFL is closed under complement only. Hence option (i) Complement is correct.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.