difference between $( a\cup b)^{*}$ and $(a+b)^{*}$

41 Views Asked by At

difference between $(a\cup b)^{*}$ and $(a+b)^{*}$, i tried to search for concrete answer but nowherebi could find it? are they both same in terms of regular expression

1

There are 1 best solutions below

0
On

This is just two different notations of the same language. The symbol $+$ is used in this context, because the set of all languages is a semiring with union as addition and the usual product of languages as multiplication. The identity element for the union is the empty language, and hence it is convenient to denote it by $0$. Similarly, the identity element for the product is the language reduced to the empty word, which is convenient to denote by $1$. With this notation, one gets the following algebraic identities on languages ($L, L_1, L_2, L_3$ are arbitrary languages): \begin{align} L_1 + L_2 &= L_2 + L_1 &&\text{(commutativity of the addition)} \\ (L_1 + L_2) + L_3 &= L_1 + (L_2 + L_3) &&\text{(associativity of the addition)}\\ 0 + L &= L = L + 0 &&\text{($0$ is the identity element for the addition)} \\ (L_1 L_2)L_3 &= L_1(L_2 L_3) &&\text{(associativity of the product)}\\ 1 L &= L = L1 &&\text{($1$ is the identity element for the product)}\\ (L_1 + L_2)L &= L_1L + L_2L &&\text{(distributivity on the right)}\\ L(L_1 + L_2) &= LL_1 + LL_2 &&\text{(distributivity on the left)}\\ 0L &= 0 = L0 &&\text{$0$ is absorbing with respect to product} \end{align} If you want to reverse to usual set notation, just substitute $\cup$ for $+$, $\emptyset$ for $0$ and $\{1\}$ for $1$.