Skip to content
Official PYQ · 2026

GATE CS 2026 Set 2 Q37 — Regular Expressions and Finite Automata

Explain with AI

Consider the following two finite automata D1D_{1} and D2D_{2}.

Which of the following statements is/are true?

Select all correct options
View worked solution

Answer: C;D

Based on the transition diagrams for D1D_1 and D2D_2:

  • D1D_1 accepts the empty string ϵ\epsilon and all binary strings of length divisible by 33 that start with the symbol 00. That is, L(D1)={ϵ}∪{0w∣w∈{0,1}∗ and ∣0w∣≡0(mod3)}L(D_1) = \{\epsilon\} \cup \{0w \mid w \in \{0,1\}^* \text{ and } |0w| \equiv 0 \pmod 3\}.
  • D2D_2 accepts the empty string ϵ\epsilon and all binary strings of length divisible by 33 that start with the symbol 11. That is, L(D2)={ϵ}∪{1w∣w∈{0,1}∗ and ∣1w∣≡0(mod3)}L(D_2) = \{\epsilon\} \cup \{1w \mid w \in \{0,1\}^* \text{ and } |1w| \equiv 0 \pmod 3\}.

Let's evaluate the given options:

  • Option A & B: Since 000∈L(D1)000 \in L(D_1) but 000∉L(D2)000 \notin L(D_2), and 111∈L(D2)111 \in L(D_2) but 111∉L(D1)111 \notin L(D_1), the languages are not equal, nor is one a proper subset of the other. Thus, A and B are false.
  • Option C: Any non-empty string in L(D1)L(D_1) starts with 00, while any non-empty string in L(D2)L(D_2) starts with 11. The only common string between them is the empty string ϵ\epsilon. Thus, L(D1)∩L(D2)={ϵ}L(D_1) \cap L(D_2) = \{\epsilon\}, which is true.
  • Option D: The union L(D1)∪L(D2)L(D_1) \cup L(D_2) contains ϵ\epsilon and all strings of length 3k3k (k≥1k \ge 1) starting with either 00 or 11. This is exactly the set of all binary strings whose length is a multiple of 33. Applying the Kleene star, (L(D1)∪L(D2))∗(L(D_1) \cup L(D_2))^* also consists of all strings in {0,1}∗\{0,1\}^* whose length is divisible by 33. Thus, D is true.

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

Published
Report a correction
Keep exploringMore Regular Expressions and Finite Automata questions