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

Consider the following statements:

S1:{02nn1} is a regular language

S2:{0m1n0m+nm1andn1} is a regular language

Which of the following is true about S1andS2?

A
Both S1 and S2 are correct
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Only S1 is correct
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
Only S2 is correct
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
None of S1 and S2 are correct
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B Only S1 is correct
L1={02nn1}

L1 produces languages having even number of 0's which is regular language.

Regular expression for S1 is 00(00)

L2={0m1n0m+nm1andn1} is context free languages not regular. (m occurs in two places, so there is comparison of count).

So, S1 is correct but S2 is not correct.

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