Skip to content
Official PYQ · 2000

GATE CS 2000 Q1.4 — Regular Expressions and Finite Automata

Explain with AI

Let SS and TT be languages over Σ={a,b}\Sigma=\{a,b\} represented by the regular expressions (a+b∗)∗(a+b^*)^* and (a+b)∗(a+b)^*, respectively. Which of the following is true?

Choose one option
View worked solution

Answer: C

To determine the relationship between the languages SS and TT, let us analyze the strings generated by their respective regular expressions over the alphabet Σ={a,b}\Sigma = \{a, b\}.

  1. Language T=(a+b)∗T = (a+b)^*:

    This is the standard regular expression representing the set of all possible strings over {a,b}\{a, b\}, including the empty string ϵ\epsilon. Thus, T=Σ∗T = \Sigma^*.

  2. Language S=(a+b∗)∗S = (a+b^*)^* :

    Let us check if we can generate the basic symbols aa and bb from the inner expression (a+b∗)(a+b^*):

    • By choosing the first term, we can generate aa.
    • By choosing the second term b∗b^* and selecting the exponent 11, we can generate bb.

    Since the inner expression (a+b∗)(a+b^*) can generate both aa and bb, its Kleene closure (a+b∗)∗(a+b^*)^* can generate any sequence of aa's and bb's. Therefore, SS also represents the set of all possible strings over {a,b}\{a, b\}, i.e., S=Σ∗S = \Sigma^*.

Since both languages generate the set of all strings over {a,b}\{a, b\}:

S=T=Σ∗S = T = \Sigma^*

Hence, the correct option is C.

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

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