649 views

1 Answer

Best answer
2 votes
2 votes

Or,

$$\begin{align*} & A = \epsilon + Bb \quad\qquad \dots (1) \\ & B = Aa + { \color{red}{C}}b \qquad \dots (2) \\ & { \color{red}{C}} = Ba + Ab \qquad \dots (3) \\ \\ \hline \\ &\text{replace C in (2)} \\ &(2) \\ &\Rightarrow B = Aa + \left ( Ba + Ab \right )b \\ &\Rightarrow B = Aa + Bab + Abb \\ &\Rightarrow B = (Aa + Abb)(ab)^{*} \\ &\text{put this value of B in (1)} \\ &\Rightarrow A = \epsilon + (Aa+Abb)(ab)^{*}b \\ &\Rightarrow A = \epsilon + A\left ( (a+bb)(ab)^{*}b \right ) \\ &\Rightarrow A = \left ( (a+bb)(ab)^{*}b \right )^{*} \\ &\Rightarrow \text{Regular Exp} = \left ( (a+bb)(ab)^{*}b \right )^{*} \\ \end{align*}$$

selected by

Related questions

2 votes
2 votes
1 answer
1
ankit-saha asked Mar 26, 2022
1,167 views
Find a NFA that accepts the complement of the language (ab*aa + bba*ab)