5,149 views
6 votes
6 votes
I want to know whether the following Regular Expressions are Equal ?
(a+b) *
   =  (a* + b*)*
   =  (a* + b)*
   =  (a + b*)*
   =  (a*  b*)*
   =  (b*  a*)*
   =  a*(ba*)*
    = (a*b)*a*

1 Answer

Best answer
6 votes
6 votes
  • 1st four options : 

check if it is possible to get one a separately and one b separately inside bracket. if it is possible then given regex = $\Sigma ^*$


  • Last two options :

$\begin{align*} &R= a^* \bf{\color{red}{\left ( ba^* \right )^*}} = a^*{\color{red}{R_1}} \\ &{\bf\color{red}{R_1}}= \left [ {\color{blue}{b,ba,baa,baaa,..... }}\right ]^{\large\bf\color{red}{*}} \\ &{\bf\color{red}{R_1}}= {\large \bf \epsilon} \;\; + b(a+b)^{\large\bf\color{red}{*}} \rightarrow (1) \\ \\ \hline \\ &\text{Now,} \\ &{\bf\color{red}{R_1}} = \bf{\color{red}{\left ( ba^* \right )^*}} = {\large \bf \color{red}{\epsilon}} \;\; + \bf{\color{red}{\left ( {\color{blue}{b}}a^* \right )}}.\bf{\color{red}{\left ( ba^* \right )^*}} \\ &\Rightarrow {\bf\color{red}{R_1}} ={\large \bf \color{red}{\epsilon}} \;\; + \bf\color{blue}{b}.\left [ \bf{\color{red}{a^*}}.\bf{\color{red}{\left ( ba^* \right )^*}} \right ] \rightarrow (2) \\ \\ &\text{Compare } (1) \text{ and } (2) \rightarrow (a+b)^* = \left [ \bf{\color{red}{a^*}}.\bf{\color{red}{\left ( ba^* \right )^*}} \right ] \\ \\ \hline \\ &\text{Now using } (pq)^*p = p(qp)^* \\ \end{align*} \\$

$\begin{align*} &(a+b)^* = \left [ \bf{\color{red}{a^*}}.\bf{\color{red}{\left ( ba^* \right )^*}} \right ] = \left [ .\bf{\color{red}{\left ( a^*b \right )^*}}.\bf{\color{red}{a^*}} \right ] \\ \end{align*} \\$

selected by

Related questions

5 votes
5 votes
3 answers
1
4 votes
4 votes
1 answer
2
sumit kumar asked Jun 22, 2015
692 views
Qwhich of the following pair of regular expressions are not equala)∅* & ∈*b)(01+0)*0 & 0(10+0)*c)r1*(r1+r2)* & (r1 + r2)*d)None of the abovein my view option A...
1 votes
1 votes
1 answer
4
prabhath challa asked 6 days ago
55 views
what will be the regular expression of this DFA using Arden's theorem