Skip to content
Official PYQ · 1995

GATE CS 1995 Q2.24 — Regular and Context-free Languages

Explain with AI

Let Σ={0,1},L=Σ∗\Sigma=\left\{0,1\right\}, L = \Sigma^* and R={0n1n∣n>0}R=\left\{0^n1^n \mid n > 0\right\} then the languages L∪RL \cup R and RR are respectively

Choose one option
View worked solution

Answer: C

To determine the nature of the languages L∪RL \cup R and RR, let us analyze them individually:

  1. Analyzing RR:

    The language R={0n1n∣n>0}R = \{0^n1^n \mid n > 0\} requires matching the number of 00s with the number of 11s. Since a finite automaton has a finite number of states, it cannot keep track of an arbitrary count nn. By the Pumping Lemma, RR is not regular (it is a deterministic context-free language).

  2. Analyzing L∪RL \cup R:

    We are given L=Σ∗L = \Sigma^*, which represents the set of all possible strings over the alphabet Σ={0,1}\Sigma = \{0, 1\}. By definition, any language over Σ\Sigma is a subset of Σ∗\Sigma^*. Therefore, R⊆LR \subseteq L.

    Taking the union of LL and RR gives:

    L∪R=Σ∗∪R=Σ∗L \cup R = \Sigma^* \cup R = \Sigma^*

    Since Σ∗\Sigma^* is represented by the regular expression (0+1)∗(0+1)^*, it is a regular language.

Thus, L∪RL \cup R is regular and RR is not regular.

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

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