GATE CS 2016, set 1 · Question 28 · Theory of Computation · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer
Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0 s and two consecutive 1 s ?
- (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
Answer (B)
Answer from the official GATE CS 2016 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes