-
Consider the languages L1 = {0i 1j | i ≠ j}, L2 = {0i 1j | i = j}, L3 = {0i 1j | i = 2j + 1 j}, L4 = {0i 1j | i ≠ 2j}. Which one of the following statements is true?
-
- Only L2 is context-free
- L2 and L3 are context-free
- L1 and L2 is context-free
- All are context free
- Only L2 is context-free
Correct Option: D
These sort of languages are accepted by PDA, so all should be context free languages. L2 & L3 are definitely CFL since accepted by stockof PDA.
And also L1 & L4 are linear comparisons of i & j so can also be represented using PDA. So all are context free languages.