Which two of the following four regular expressions are equivalent? ($\varepsilon$ is the empty string).
basic explanation by taking (00)∗(ε+0) .in it (00)* gives even no of 0's then if i do (00)*epsilon which given also even no of zeros and for (00)*0 gives odd no so totally we can say they given all possible odd and even no's of zeros and (iii) 0* also gives so c will be answer
please expend all the above options
Answer is C. You can have any no. of $0$'s as well as null. A is false because you cannot have single $0$ in ii). same for option B. In D you are forced to have single $0$ in iv) whereas not in iii).
option c is right.
i)(00)*(0+ε)
it generates any number of 0's
ii) (00)*
it generates the only even number of 0's
iii)0*
iv)0(00)*
it generates the only odd number of zeroes.
So correct option is c i.e. i) and iii)
64.3k questions
77.9k answers
244k comments
80.0k users