Question
Consider the following two statements about regular languages:
: Every infinite regular language contains an undecidable language as a subset.
: Every finite language is regular.
Which one of the following choices is correct?
Official answer and solution
- Official answer
- C
- From
- Official GATE 2021 answer key
Solution
Analyze language cardinality and computability properties of infinite regular languages and finite languages.
Evaluate statement :
Let be any infinite regular language over an alphabet . Since contains countably infinitely many strings, the power set (the set of all sublanguages of ) is uncountably infinite, having cardinality . However, the set of all decidable (Turing-decidable) languages over is countably infinite, because every decidable language is decided by at least one valid Turing machine, and the set of all Turing machines is countable. Since a countably infinite set cannot contain an uncountably infinite set, uncountably many subsets of must be undecidable. Hence, contains undecidable languages as subsets. Statement is true.
Evaluate statement :
Every finite language is a finite union of single-string languages . Each single-string language is trivially accepted by a finite automaton, and regular languages are closed under finite union. Therefore, every finite language is regular. Statement is true.
Since both statements and are true, option C is correct.
C
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2021 Computer Science and Information Technology - Session 2 (CS2)
- Question
- 46 of 65, printed as CS Q.36
- 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.