Regular Expressions & Languages

Answer & solution
Official answer: B
A word must contain both a 00 occurrence and a 11 occurrence, in either order, with an arbitrary middle substring and arbitrary prefix/suffix. They cannot overlap because their symbols differ. Hence Σ*(00Σ*11+11Σ*00)Σ*, B. A forces adjacent blocks, C requires only one, and D disallows arbitrary outside context.
Take the earlier of a 00 occurrence and a 11 occurrence. Their positions cannot overlap, so one appears before the other with some possibly empty substring between them. This establishes the two alternatives in B. As a diagnostic example,001011 has both required pairs separated by 10, so it is valid but A rejects it. C incorrectly accepts 00 alone; D rejects valid words with extra prefix or suffix. Arbitrary prefix, middle and suffix are all needed.