Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
111 views
in Computer by (67.8k points)
closed by

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

(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

1 Answer

+1 vote
by (68.9k points)
selected by
 
Best answer

(B) (0+1)*(00(0+1)*11 + 11(0+1)*00) (0+1)*

(a) contains 00 & 11 consecutively which is not the required condition. 

(c) Doesn’t guaranty that both 00 & 11 will be present in the string. 

(d) Says string should start with 11 & ends with 00 or vice versa.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...