1 Answers
Option 2 : (0 + 1) *(00(0 + 1)*11 + 11 (0 + 1)*00) (0 + 1)*
Consider all the options one by one:
1) (0 + 1) *0011 (0 + 1)* + (0 + 1) *1100 (0 + 1)*
It consider only those string which have either 0011 or 1100 as a substring. So, it is wrong.
2) (0 + 1) *(00(0 + 1)*11 + 11 (0 + 1)*00) (0 + 1)*
It contains set of all the binary strings that contain two consecutive 0’s and 1’s.
3) (0 + 1) *00 (0 + 1)* + (0 + 1) *11 (0 + 1)*
This set contains only those string which have either 00 or 11 as substring but not does not contain all the strings that contain two consecutive 0’s and 1’s.
4) 00 (0 + 1) *11 + 11 (0 + 1) *00
It represents those strings which start with 00 or 11 and end with 11 or 00 respectively. So, it is wrong.