GATE / CS ARCHIVE

SIMILAR QUESTIONS / THEORY OF COMPUTATION

Separate finite subsets from arbitrary infinite subsets

3 questions solved the same way, newest first. Back to Theory of Computation

How these are solved

Every finite language is regular; an arbitrary subset of an infinite regular language need not be regular or even decidable. Scope and quantifiers are essential.

2 marks · MCQ
Report issue

Decidability & Computability

Question 36, GATE 2021: S1 every infinite regular language contains an undecidable subset. S2 every finite language is regular. A only S1; B only S2; C both; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Every infinite language over a finite alphabet is countably infinite and has uncountably many subsets, whereas only countably many algorithms, hence decidable languages, exist. At least one subset is therefore undecidable, proving S1. Every finite language has a regular expression formed by union of its finitely many words, proving S2. Thus C.

The counting argument is nonconstructive: it proves an undecidable subset exists without requiring the regular language itself to encode a difficult membership test. For a finite language {w1,…,wm}, regex w1+…+wm recognizes it; the empty language is regular too. Being a subset of a decidable language does not imply decidability.

Original paper, page 76 · Answer key

1 mark · MCQ
Report issue

Finite subsets are regular

Regular Expressions & Languages

Question 7, GATE 2007: Which statement about regular languages is true?
Options:
(A) Every subset of a regular set is regular
(B) Every finite subset of a nonregular set is regular
(C) The union of two nonregular sets is nonregular
(D) An infinite union of finite sets is regular
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. Approach. A finite language is described by a finite union of its individual words. Closure under finite union does not imply closure under an arbitrary infinite union.

2. Derivation and interpretation. Every finite language is regular, regardless of the parent set, so B. A fails because nonregular languages are subsets ofΣ*. C fails by taking a nonregular language and its nonregular complement, whose union is Σ*. D fails because any nonregular language is an infinite union of singleton finite languages.

Original paper, page 3

2 marks · MCQ
Report issue

False regular-language subset claim

Regular Expressions & Languages

Question 2.6, GATE 1998: Which is false: finite subsets of nonregular languages are regular; every subset of a regular language is regular; finite subsets of regular languages are regular; intersection preserves regularity?
Question 2.6, GATE 1998: Which is false: finite subsets of nonregular languages are regular; every subset of a regular language is regular; finite subsets of regular languages are regular; intersection preserves regularity?
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Every finite language is regular: form a finite union of its individual words. Thus A and C hold regardless of the larger language. Regular languages are closed under intersection using a product DFA, so D holds. But the regular language{0, 1}* contains the nonregular subset{0n1n:n≥0}. Hence arbitrary subsets need not be regular, disproving B. Finite-subset closure must not be extrapolated to unrestricted infinite subsets.

Original paper, page 4