Consider the following languages: L1={anbmcn+m:m,n≥1} L2={anbnc2n:n≥1}
Which one of the following is TRUE?
A
L2iscontext−freewhile L1isnotcontext−free
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
NeitherL1norL2iscontext−free
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
L1 is context-free while L2isnotcontext−free
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
L1andL2arecontext−free.
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is CL1 is context-free while L2isnotcontext−free L1hasonlyonecomparison,henceitisCFL,butL2has2comparisonsandhencenotaCFL,butaCSL.Soanswer(b)iscorrect.