Let be two regular languages and a language which is not regular. Which of the following statements is/are always TRUE?
- (A)
if and only if
- (B)
is not regular
- (C)
is not regular
- (D)
is regular
Let be two regular languages and a language which is not regular. Which of the following statements is/are always TRUE?
if and only if
is not regular
is not regular
is regular
ANSWER
The always-true statements are (C) and (D).
Official answer: C, DSource: Official answer key, GATE 2024 CS1 (IISc Bengaluru)
Regular languages are closed under complement, union and intersection. Test each statement against these closure properties and, where it fails, a counterexample.
(A) means no string of lies outside , that is . This does not give equality. Take , : the intersection is empty but . So the 'only if' direction fails and (A) is not always true.
(B) Take (regular) and any non-regular . Then , which is regular. So (B) is not always true.
(C) If were regular, then would be regular by closure under complement. That contradicts the hypothesis, so is not regular. (C) is always true.
(D) and are regular by closure under complement, and their union is regular by closure under union. (D) is always true.
Correct options: (C) and (D).
KEY IDEA
Regular languages are closed under complement and union, so complementing a non-regular language keeps it non-regular, and a union of complements of regular languages stays regular.
WATCH OUT FOR
Reading as . It only says . Another slip is assuming a union with a non-regular language is non-regular, when absorbs it.
From the GATE 2024 CS1 paper. Every question of this paper · Download the full paper · All 5 Regular languages questions, with notes