Skip to content
Related Articles

Related Articles

UGC-NET | UGC-NET CS 2017 Nov – III | Question 63
  • Last Updated : 21 Mar, 2018

Consider the following languages:

L1 = {am bn │ m ≠ n}
L2 = {am bn │ m = 2n+1}
L3 = {am bm │ m ≠ 2n}

Which one of the following statement is correct ?

(A) Only L1 and L2 are context free languages
(B) Only L1 and L3 are context free languages
(C) Only L2 and L3 are context free languages
(D) L1, L2 and L3 are context free languages


Answer: (D)

Explanation:

  1. In L1 we have to check for m is not equal to n. there are infinite no which falls under this category but we have only one comparision with m and n. So it is context free language.
  2. In L2 one comparison with infinite possibilities of m and n, it is alos a CFL
  3. In L3 one comparison with infinite possibilities of m and n, it is alos a CFL

So, option (D) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :