Consider the following languages L1={wwR | w∈(0,1)∗} L2={w≠wR | w∈(0,1)∗} where ≠ is a special symbol L3={ww | w∈(0,1)∗}
Which one of the following is TRUE?
A
L3 is a CFL, but not a deterministic CFL
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
L3 is a deterministic CFL
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
L1 is a deterministic CFL
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
L2 is a deterministic CFL
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution
The correct option is DL2 is a deterministic CFL L1 is CFL but not a DCFL, since accepting wwR necessarily involves finding the middle of the string, which involves non-determinism. ∴ (a) is false. L2 is a DCFL is true since "≠" is a special symbol and middle of string can now be surely found by using "≠", thereby eliminating the need for non-deterministic guessing. So (b) is true. L3 is a CSL and not a CFL. So (c) is false. L3 is not a DCFL either. So (d) is false.