Which of the following statements is true?
View worked solution
Answer: B
We analyze each statement based on the closure properties and acceptance models of Context-Free Languages (CFLs):
- Option A is false: The set of languages accepted by Deterministic Pushdown Automata (DPDAs) is the class of Deterministic CFLs (DCFLs), which is a proper subset of CFLs. For example, the language is a CFL but cannot be accepted by any DPDA.
- Option B is true: CFLs are closed under union. If and are CFLs with start symbols and respectively, we can define a new grammar with start symbol and production to generate .
- Option C is false: CFLs are not closed under intersection. For example, and are both CFLs, but their intersection is a well-known non-CFL.
- Option D is false: CFLs are not closed under complementation. If they were, they would also be closed under intersection because of De Morgan's Law: , which contradicts the fact that CFLs are not closed under intersection.
Free practice · Your answers on this page are not saved.
