# Help needed in regular expression question,so confusing

#1

Q1. Which two of the following four regular expressions are equivalent? (ε is the empty string).
(i) (00)(ε + 0)
(ii) (00)

(iii) 0*
(iv) 0(00)*

#2

1.) 0^n where n>=0

2.) 0^2n where n>=0

3.) 0^n where n>=0

4.) 0^2n+1 where n>=0
So ans is 1 and 3

#3

None
Strings generated by expressions are:
(i) (00)(ε + 0) : 00 , 000
(ii) (00) : 00
(iii) 0* : e, 0 , 00, 000 , 0000, 00000 ….
(iv) 0(00)* : 0 , 000 , 00000 , 0000000 …

hence no two expressions are generating same languages

#4

None of the RE’s are equivalent.
here’s why…

1. (00)(ε+0): 00,000
Explanation: Either one of ε or 0 will become the second character.So only above two strings are accepted.
2. (00) : 00
Explanation: The only accepted string is 00 as string 00 is parenthesized
3. 0* : ε,0,00,000…
Explanation: Any number of zeroes are accepted in the string but only zeroes
4. 0(00)* : 0,000,00000…
Explanation: Strings with odd number of zeroes will be accepted by this RE as first 0 will compulsorily appear in all strings followed by any number of 00