Consider the following languages L1 ={0p1q0r|p,q,r≥0} L2 ={0p1q0r|p,q,r≥0,p≠r}
Which one of the following statements is FALSE?
A
L1∩L2 is context-free
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
L2 is context-free
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Complement of L1 is context-free but not regular
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
Complement of L2 is recursive
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution
The correct option is C Complement of L1 is context-free but not regular L1={0p1q0r|p,q,r≥0}:regular language L2={0p1q0r|p,q,r≥0,p≠r}; CFL
(a) L2 is CFL ; True
(b) L1∩L2 is context free : True, becuase CFL is closed on regular intersection.
(c) Complement of L2 is recursive : ¯L2 =¯¯¯¯¯¯¯¯¯¯¯¯CFL=¯¯¯¯¯¯¯¯¯¯¯CSL=CSL
Now, every CSL is REC. So,this statement is true
(d) Complement of L1 is is context free but not regular : false,becuase regular language are closed under complement and so the complement of L1 is regular.