Gate CS-2018 Question Paper With Solutions

Q. 46 Consider the following languages:

I. {ambncpdq ∣ m + p = n + q, where m, n, p, q ≥ 0}
II. {ambncpdq ∣ m = n and p = q, where m, n, p, q ≥ 0}
III. {ambncpdq ∣ m = n = p and p ≠ q, where m, n, p, q ≥ 0}
IV. {ambncpdq ∣ mn = p + q, where m, n, p, q ≥ 0}

Which of the above languages are context-free?

(A) I and IV only

(B) I and II only

(C) II and III only

(D) II and IV only

Answer: (B)

Explanation:

Gate CS-2018 Question Paper With Solutions

Learn More:   Gate EE-2012 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here