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

Theory of computation miscellaneous

Theory of Computation

  1. Which of the following languages are context-free?
    L1 = {ambn anbm | m, n ≥ 1}
    L2 = {ambn ambn | m, n ≥ 1}
    L3 = {ambn | m = 2n + 1}
    1. L1 and L2 only
    2. L1 and L3 only
    3. L2 and L3 only
    4. L3 only
Correct Option: C

L1 = { ambn anbm ⇒ This one is CFL
L2 = ambn ambn ⇒ by pumping lemma this one is not CFL.
L3 = ambn | m = 2n + 1 ⇒ This is CFL.



Your comments will be displayed only after manual approval.