Question 8055 – Theory-of-Computation
Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?
Correct Answer: B
Question 14 Explanation:
Option A doesn’t generate string “001011” as it has two consecutive 0’s and two consecutive 1’s.
Option C generates string “00” which doesn’t have two consecutive 1’s.
Option D doesn’t generate string “00110” which has two consecutive 0’s and two consecutive 1’s.
Option C generates string “00” which doesn’t have two consecutive 1’s.
Option D doesn’t generate string “00110” which has two consecutive 0’s and two consecutive 1’s.
(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
Subscribe
Login
0 Comments