i am working on a problem for Regular expression and it resulted to this
$\epsilon + a+b + aa+ab + ba + bb$
now when i solved it further and reached here
$\epsilon + a + b + (a+b)(a+b)$ the solution is $(a+b+\epsilon)(a+b+\epsilon)$ , how to reach to this
Using distributive, associative, idempotent properties, we have: \begin{eqnarray} \epsilon + a+b + aa+ab + ba + bb &=& \epsilon + (a+b) + (a+b)(a+b) \\ &=& \epsilon + \epsilon + \epsilon(a+b) + (a+b)\epsilon+ (a+b)(a+b) \\ &=& \epsilon\epsilon + \epsilon(a+b) + (a+b)\epsilon+ (a+b)(a+b) \\ &=& (a+b+\epsilon)(a+b+\epsilon) \end{eqnarray}