wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the following regular expressions over the alphabet {0, 1}

I. 1∗0(0+1)∗

II. (0+1)∗01∗

III. 1∗0(1+0)∗+(0+1)∗01∗

Which of the above regular expressions are equivalent?

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

The correct option is C I, II and III

I and II are quite easy to understand both denote strings containing at least one 0. III is actually the union of I and II, but III is again denoting strings containing at least one 0 as both regular expressions (i.e. I and II) are equivalent, so union won't make any difference.

Hence all 3 regular expressions are equivalent.


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