Skip to content
Official PYQ · 1987

GATE CS 1987 Q2i — Regular and Context-free Languages

Explain with AI
State whether the following statements are TRUE or FALSE:

All subsets of regular sets are regular.
View worked solution

Answer: 0

The statement is FALSE (represented by 0).

Explanation:

A language is regular if it can be recognized by a finite automaton. However, a subset of a regular language does not necessarily inherit this property.

We can prove this with a simple counterexample:

  1. Let Σ={a,b}\Sigma = \{a, b\}. The set of all strings over Σ\Sigma, denoted as Σ∗={a,b}∗\Sigma^* = \{a, b\}^*, is a regular language.
  2. Consider the subset L={anbn∣n≥0}L = \{a^n b^n \mid n \ge 0\}.
  3. Clearly, L⊆Σ∗L \subseteq \Sigma^*.
  4. However, LL is a well-known non-regular language (it requires memory to match the number of aa's and bb's, which cannot be done by a finite automaton).

Since we found a subset of a regular set that is not regular, the given statement is false.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Regular and Context-free Languages questions