666 views
3 votes
3 votes
Consider the regex: $(a+b)^*(a+b+\epsilon)a$

Which of the following is equivalent to above?:

(a) $(a^*+b^*)^+(aa+ba)$

(b) $(\epsilon+a+b^*)^+a$

(c) $(a+b)^+(a+b+\epsilon)a$

(d) None of these

2 Answers

Best answer
3 votes
3 votes
$$\begin{align*} &\rightarrow (a+b)^{*}(a+b+ \epsilon)a \\ &= \color{red}{(a+b)^{*}a} \\ \\ \hline \\ &\text{Option B} \\ &\rightarrow (\epsilon+a+b^{*})^{+}a \\ &=(\epsilon+a+b^{*})(\epsilon+a+b^{*})^{*}a \\ &=(a+b^{*}){\color{red}{(a+b^{*})^{*}}}a \\ &=(a+b^{*}){\color{red}{(a+b)^{*}}}a \\ &={\color{red}{(a+b^{*})(a+b)^{*}}}a \\ &={\color{blue}{(a+b)^{*}}}a \end{align*}$$
selected by

Related questions

1 votes
1 votes
0 answers
1
Mk Utkarsh asked Mar 12, 2018
416 views
please verify the regex
2 votes
2 votes
1 answer
2
iarnav asked Sep 2, 2017
788 views
Write a regular expression for all strings of 0’s and 1’s in which the total number of 0’s to the left of each 1 is even?I'm getting - 0*+((00)*1(0)*)*is it correct...
0 votes
0 votes
2 answers
3
iarnav asked Aug 31, 2017
593 views
Can we simplify this RegEx - $a^*ba^*b(a+b)^*$
3 votes
3 votes
3 answers
4
ari asked Aug 17, 2015
4,338 views
Which of the following are not equivalent to expression $(a + b + c)^*$?(A) $(a^* + b^* + c^*)^*$(B) $\Bigl ( (ab)^* + c^* \Bigr )^*$(C) $(a^* b^* c^*)^*$(D) $(a^*b^* + c...