Let L denotes the language generated by the grammar S→0S0∣00Whichofthefollowingistrue?
A
L is regular but not 0+
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
L is context free but not regular
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
L is not context free
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
L=0+
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is A L is regular but not 0+ The language generated by the grammar S→0S0∣00is
L = {02,04,06,08,...}
= {02n+2∣n≥0}
= {02n∣n≥1}=00(00)∗
So above language is regular but not 0+.