Skip to content
Official PYQ · 2021

GATE CS 2021 Set 2 Q36 — Regular and Context-free Languages

Explain with AI

​​​​​​Consider the following two statements about regular languages:

  • S1S_1: Every infinite regular language contains an undecidable language as a subset.
  • S2S_2: Every finite language is regular.

Which one of the following choices is correct?

Choose one option
View worked solution

Answer: C

Let us analyze both statements individually:

  • Statement S1S_1: Let LL be an infinite regular language. The power set of LL, denoted as P(L)\mathcal{P}(L), represents the set of all subsets of LL. Since LL is infinite, P(L)\mathcal{P}(L) is uncountably infinite (2ℵ02^{\aleph_0}). However, the set of all decidable languages is countably infinite because each decidable language is decided by a distinct Turing machine, and the set of all Turing machines is countable. Since there are uncountably many subsets of LL but only countably many decidable languages, there must exist uncountably many subsets of LL that are undecidable. Thus, S1S_1 is true.

  • Statement S2S_2: Any finite language L={w1,w2,…,wk}L = \{w_1, w_2, \dots, w_k\} can be defined by the regular expression w1+w2+⋯+wkw_1 + w_2 + \dots + w_k. Since a regular expression exists for every finite language, every finite language is regular. Thus, S2S_2 is true.

Since both statements S1S_1 and S2S_2 are true, the correct option is C.

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

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