Home » Theory of Computation » Theory of computation miscellaneous » Question

Theory of computation miscellaneous

Theory of Computation

  1. 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?
    1. Only L2 is context-free
    2. L2 and L3 are context-free
    3. L1 and L2 is context-free
    4. All are 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.



Your comments will be displayed only after manual approval.