Intermediate
Theory of Computation
Q73 / 100
Which closure property distinguishes regular languages from context-free languages?
Correct! Well done.
Incorrect.
The correct answer is B) Regular languages are closed under intersection and complement, while context-free languages are closed under neither in general
B
Correct Answer
Regular languages are closed under intersection and complement, while context-free languages are closed under neither in general
Explanation
Regular languages form a Boolean algebra — closed under union, intersection, and complement. Context-free languages are closed under union, concatenation, and star, but generally not under intersection or complement (e.g., the intersection of two CFLs can be non-context-free).
Progress
73/100