GATE | GATE-CS-2016 (Set 1) | Question 28

Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?

gatecs201611
(A) A
(B) B
(C) C
(D) D


Answer: (B)

Explanation: Option A represents those strings which either have 0011 or 1100 as substring.
Option C represents those strings which either have 00 or 11 as substring.
Option D represents those strings which start with 11 and end with 00 or start with 00 and end with 11.

Quiz of this Question

My Personal Notes arrow_drop_up