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

Given the following two languages:

L1={anbn|n0,n100}

L2={w{a,b,c}|na(w)=nb(w)=nc(w)}

Which of the following options is correct?


A
L1 is context free language, L2 is not context free language.
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Both L1 and L2 are not context free language.
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
L1 is context free language, L2 is not context free language.
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
Both L1 and L2 are context free language.
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C L1 is context free language, L2 is not context free language.
Option (c)
Language
L1={anbn|n0,n100} is context free pop all bn element for each an element since we can stack.

But language
L2={w{a,b,c}|na(w)=nb(w)=nc(w) not compare all as,bsandcs simultaneously with more then one stack here then thus language L2 bec.

Option (c) is correct.


flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Where Friction?
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon