Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?
A. (0+1)*0011(0+1)*+(0+1)*1100(0+1)*
B. (0+1)*(00(0+1)*11+11(0+1)*00)(0+1)*
C. (0+1)*00(0+1)*+(0+1)*11(0+1)*
D. 00(0+1)*11+11(0+1)*00
Answer:B
Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?
A. (0+1)*0011(0+1)*+(0+1)*1100(0+1)* B. (0+1)*(00(0+1)*11+11(0+1)*00)(0+1)* C. (0+1)*00(0+1)*+(0+1)*11(0+1)* D. 00(0+1)*11+11(0+1)*00
Explanation: B) is the correct option which covers all possible cases.