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

Which one of the following regular expressions over {0,1} denotes the set of all strings not containing 100 as a substring?

A
0(10+1)
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
01010
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
0101
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
0(1+0)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is A 0(10+1)
(a) r.e. (regular expression) = 0(1+0) can generate string 100, which contains substring 100

(b) r.e. (regular expression) = 01010 can generate string 10100, which contain 100 as a substring. Also, this regular expression cannot generate ϵ which is in the given language.

(c) r.e. (regular expression) = 0101 generates strings which doesn't contain 100 as substring. However, ϵ is the smallest string which doesn't contain 100 as substring but above RE cant generate ϵ.

(d) r.e (regular expression) = 0(10+1) generates all strings which doesn't contain 100 as substring.

flag
Suggest Corrections
thumbs-up
3
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Endoplasmic Reticulum and Golgi Apparatus
Watch in App
Join BYJU'S Learning Program
CrossIcon