Consider the following languages: \(L_1 = {a^n b^m c^{n+m} : m,n ≥ 1}\) \(L_2…

PYQ GATE 2016

Consider the following languages:

L1=anbmcn+m:m,n≥1L_1 = {a^n b^m c^{n+m} : m,n ≥ 1}

L2=anbnc2n:n≥1L_2 = {a^n b^n c^{2n} : n ≥ 1}

Which one of the following is TRUE?

  1. A.

    Both L1L_1 and L2L_2 are context-free.

  2. B.

    L1L_1 is context-free while L2L_2 is not context-free.

  3. C.

    L2L_2 is context-free while L1L_1 is not context-free.

  4. D.

    Neither L1L_1 nor L2L_2 is context-free.

Attempted by 268 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…