Skip to content
Official PYQ · 1998

GATE CS 1998 Q1.9 — Regular Expressions and Finite Automata

Explain with AI

If the regular set AA is represented by A=(01+1)∗A = (01 + 1)^* and the regular set BB is represented by B=((01)∗1∗)∗B = \left(\left(01\right)^*1^*\right)^*, which of the following is true?

Choose one option
View worked solution

Answer: D

To determine the relationship between the regular sets A=(01+1)∗A = (01 + 1)^* and B=((01)∗1∗)∗B = ((01)^*1^*)^*, we can show containment in both directions.

Step 1: Show A⊆BA \subseteq B

Let us look at the generators of AA, which are 0101 and 11:

  • For the subexpression (01)∗1∗(01)^*1^* inside BB, choosing the first term once and the second term zero times gives 0101. Thus, 01∈(01)∗1∗01 \in (01)^*1^*.
  • Choosing the first term zero times and the second term once gives 11. Thus, 1∈(01)∗1∗1 \in (01)^*1^*.

Since both generators of AA belong to the set (01)∗1∗(01)^*1^*, any string formed by concatenating these generators (which constitutes the set AA) must also belong to ((01)∗1∗)∗((01)^*1^*)^*. Therefore, A⊆BA \subseteq B.

Step 2: Show B⊆AB \subseteq A

Since A=(01+1)∗A = (01 + 1)^*, we know that AA is closed under concatenation and Kleene star.

  • Clearly, 01∈A01 \in A and 1∈A1 \in A.
  • Since AA is closed under Kleene star, (01)∗⊆A(01)^* \subseteq A and 1∗⊆A1^* \subseteq A.
  • Since AA is closed under concatenation, (01)∗1∗⊆A(01)^*1^* \subseteq A.
  • Applying the Kleene star again, we get ((01)∗1∗)∗⊆A∗((01)^*1^*)^* \subseteq A^*. Since A∗=AA^* = A, this simplifies to B⊆AB \subseteq A.

Conclusion

Since A⊆BA \subseteq B and B⊆AB \subseteq A, we have A=BA = B.

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

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