Which of the following four regular expressions are equivalent ?

(e = empty string)

(i) (00)*(e+0)

(ii) (00)*

(iii) 0*0*

(iv) 0(00)*

Guys I have finally come to the correct solution: (i) & (iii)

(00)*(e+0)

= even no. of 0’s and ( empty string or 0)

= (00)*e + (00)*0 [Using distributive law]

= (00)* + (00)*0 [Using Re=eR=R]

= Even no. of 0’s OR Odd No. of Zeroes [Since, + is OR]

Hence the only option which gives this is

(iii) 0*0*

Option (ii) (00)* -> Even no. of 0’s

Option (iv) 0(00)* -> Odd no. of Zeroes.

### Question stats

Question and answer is powered by AnsPress