Question
Consider the following statements.
I. If is regular, then both and must be regular.
II. The class of regular languages is closed under infinite union.
Which of the above statements is/are TRUE?
Official answer and solution
- Official answer
- D
- From
- Official GATE 2020 answer key
Solution
Evaluate closure properties of regular languages using standard counterexamples.
Evaluation of Statement I: 'If is regular, then both and must be regular.'
- Consider the alphabet .
- Let , which is known to be non-regular.
- Let , which is also non-regular.
- Their union is , which is clearly regular.
- Thus, the union of two non-regular languages can be regular. Statement I is FALSE.
Evaluation of Statement II: 'The class of regular languages is closed under infinite union.'
- Any arbitrary language can be expressed as the infinite union of singleton string languages: .
- Every singleton language is finite and therefore regular.
- If regular languages were closed under infinite union, every language (including non-regular and undecidable languages like the Halting Problem) would be regular, which is impossible.
- Thus, regular languages are not closed under infinite union. Statement II is FALSE.
Since both statements are false, the correct option is 'Neither I nor II'.
D
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2020 Computer Science and Information Technology (CS)
- Question
- 18 of 65, printed as CS Q.8
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.