# Are the regular expressions equivalent?

Is the following equivalence true?

$$(r_1^*r_2^*)^* = (r_1 + r_2)^*$$

I think these are equivalent since both the expressions generate the same strings: $$\{\epsilon,r_1,r_2,\dots\}$$ etc.

• What are $r_1$ and $r_2$? Aug 1, 2021 at 9:10
• Any alphabet. Like $r_1$ = a and $r_2$ = b @Gribouillis Aug 1, 2021 at 10:17
• Yes, they are equivalent. The expressions denote the same language for every language $r_1$ and $r_2$. This can be shown using finite state automata: Regular expression $(a^{*}b^{*})^{*} = \left( a+b \right)^{*}$ proof Alternatively there is Kleene algebra which has equational rules that characterize regular expression equivalence. Aug 1, 2021 at 15:14
• @HendrikJan Ah, thanks! That clears up my confusion! Aug 1, 2021 at 16:20