Let be a regular language and be a context-free language. Which of the following languages is/are context-free?
View worked solution
Answer: B;C;D
Given that is a regular language and is a context-free language (CFL).
- Option A: . Since CFLs are not closed under complementation, is not necessarily a CFL. If we choose , then , which may not be a CFL. Thus, this is not always context-free.
- Option B: . Applying De Morgan's laws, this simplifies to . Since the intersection of a regular language and a CFL is always a CFL, this language is always context-free.
- Option C: . Since , the expression simplifies to . Since is regular, it is also context-free.
- Option D: . Factoring out using the distributive law gives . Since is a CFL, this language is always context-free.
Free practice · Your answers on this page are not saved.
