CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the following regular expression
I. (a +b)* abb (a + b)*
II. (a + b)* a(a + b)* bb (a + b)*
III. (a + b)* ab (a + b)* b(a + b)*
IV. (a + b)* abb (a + b)* a
Which of the above regular expressions are equivalent?

A
I, III and IV only
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
I, II an III only
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
I and II only
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
II, III and IV only
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C I and II only
I and II generate all strings containing abb as a substring. However in III, abab is accepted which should be a non member if it has to accept abb as substring. IV is also wrong because it not only wants abb as substring, every string should also end with 'a'. Hence the answer is options (d).

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Division of Fractions
Watch in App
Join BYJU'S Learning Program
CrossIcon