7 7 votes The regular expression $(a^*+b)^*$ is equivalent to which of the following regular expressions: $a^*b^*$ $(a^*b+b)^*$ $(a+b^*)^*$ $(a^*b)^*$ Theory of Computation cmi2017 theory-of-computation regular-expression + – Tesla! 1.5k views answer comment Share Follow Print See all 2 Comments 2 2 Comments reply sumit goyal 1 commented Feb 4, 2018 reply Follow flag i think C 1 1 replyShare tusharp commented Nov 18, 2018 reply Follow flag Different thought process :) : option a: after b there can't be a. So eliminated option b : When we want a, b is compulsory with it. So can't generate single a. eliminated option d : same as option b, compulsory a b with a. eliminated Hence option c 0 0 replyShare Please log in or register to add a comment.
Best answer 11 11 votes (a* + b)* is equivalent to: - $\text{(a + b)*}$ - $\text{(a + b*)*}$ - $\text{(a*b*)*}$ - basically any regular expression which can generate all strings in $\Sigma^*$. Now looking at the options: (a) $\text{a*b*}$ - This can't generate abab (b) $\text{(a*b+b)*}$ - This can't generate aaa (at least one b needs to be there in any non-empty string) (c) $\text{(a+b*)*}$ - This one can generate all strings, i.e it is equivalent to (a+b)* (d) $\text{(a*b)*}$ - This can't generate aaa (at least one b needs to be there in any non-empty string) So, correct option should be (C) (a+b*)*. Rishabh Gupta 2 answered Feb 4, 2018 • selected Apr 7, 2019 by akash.dinkar12 Rishabh Gupta 2 comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes A, No a can be there once we have b. ba not accepted. B. Every a must be followed by b. a not accepted. D. Every a must be followed by b. a not accepted. C is correct. (a* + b)* is equivalent to: - (a + b)* - (a + b*)* - (a*b*)* - (b*a*)* - (a* + b*)* - a*(ba*)* - b*(ab*)* smsubham answered Mar 8, 2020 • edited Mar 8, 2020 by smsubham smsubham comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Answer: soujanyareddy13 answered May 4, 2021 soujanyareddy13 comment Share Follow 0 reply Please log in or register to add a comment.