-
Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?
-
- (0+1)*0011(0+1)*+(0+1)*1100(0+1)*
- (0+1)*(00(0+1)*11+11(0+1)*00)(0+1)*
- (0+1)*00(0+1)*+(0+1)*11(0+1)*
- 00(0+1)*11+11(0+1)*00
- (0+1)*0011(0+1)*+(0+1)*1100(0+1)*
Correct Option: B
Option (a) contains 00 and 11 consecutively which does not fulfill the required condition. Option (c) does not give assurance that both 00 and 11 will be exist in the string. According to option (d), string should start with 11 and ends with 00 or vice versa. Hence option (b) is the correct answer.