Consider the following languages over the alphabet ∑={0,1,c}; L1 ={0n1n|n≥0} L2 ={wcwr|wϵ{0,1}*} L3 ={wwr|wϵ{0,1}*}
Here,wr is the reverse of the string w. Which of these languages are deterministic Context-free languages?
A
None of the languages
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Only L1 and L2
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
Only L1
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
All the three languages
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is B Only L1 and L2 L1 ={0n1n|n≥0} is DCFL L2 ={wcwr|wϵ{0,1}*} is DCFL L3 ={wwr|wϵ{0,1}*} is CFL but not DCFL