Skip to content
Official PYQ · 1992

GATE CS 1992 Q02 — Regular Expressions and Finite Automata

Explain with AI

Which of the following regular expression identities is/are TRUE?

Choose one option
View worked solution

Answer: A

To determine which identity is true, let us analyze each option by considering the languages they generate (assuming rr and ss represent distinct non-empty alphabets, e.g., r=ar = a and s=bs = b):

  • Option A: (r∗)∗=r∗(r^*)^* = r^*
    The Kleene closure operation is idempotent. That is, applying the star operator multiple times does not generate any new strings beyond what is already in r∗r^*. LHS=(r∗)∗={ϵ}∪r∗∪(r∗)2∪⋯=r∗=RHS\text{LHS} = (r^*)^* = \{\epsilon\} \cup r^* \cup (r^*)^2 \cup \dots = r^* = \text{RHS} Thus, this identity is TRUE.
  • Option B: r∗s∗=(r+s)∗r^* s^* = (r+s)^*
    The language of the right-hand side, (r+s)∗(r+s)^*, contains all possible strings over rr and ss in any order (e.g., srsr). However, the left-hand side, r∗s∗r^* s^*, only generates strings where all occurrences of rr precede all occurrences of ss. Since sr∈L((r+s)∗) but sr∉L(r∗s∗), the identity is FALSE.\text{Since } sr \in L((r+s)^*) \text{ but } sr \notin L(r^* s^*), \text{ the identity is } \mathbf{FALSE}.
  • Option C: (r+s)∗=r∗+s∗(r+s)^* = r^* + s^*
    The right-hand side generates strings consisting of only rr's or only ss's. It cannot generate mixed strings like rsrs. Since rs∈L((r+s)∗) but rs∉L(r∗+s∗), the identity is FALSE.\text{Since } rs \in L((r+s)^*) \text{ but } rs \notin L(r^* + s^*), \text{ the identity is } \mathbf{FALSE}.
  • Option D: r∗s∗=r∗+s∗r^* s^* = r^* + s^*
    The left-hand side can generate mixed strings like rsrs, whereas the right-hand side cannot. Since rs∈L(r∗s∗) but rs∉L(r∗+s∗), the identity is FALSE.\text{Since } rs \in L(r^* s^*) \text{ but } rs \notin L(r^* + s^*), \text{ the identity is } \mathbf{FALSE}.

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

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