Context-free languages are:
View worked solution
Answer: A;D
Context-Free Languages (CFLs) have specific closure properties under various operations:
- Closed under Union (Option A): If and are CFLs generated by grammars with start symbols and respectively, we can define a new start symbol to generate . Hence, CFLs are closed under union.
- Closed under Kleene closure (Option D): If is a CFL with start symbol , we can define a new start symbol to generate . Hence, CFLs are closed under Kleene closure.
- Not closed under Intersection (Option C): For example, the languages and are both context-free, but their intersection is a well-known non-context-free language.
- Not closed under Complementation (Option B): By De Morgan's Laws, if CFLs were closed under complementation, they would also be closed under intersection since . Since they are not closed under intersection, they cannot be closed under complementation.
Thus, the correct options are A and D.
Free practice · Your answers on this page are not saved.
