GATE CS 2018 · Question 45 · Theory of Computation · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer
Consider the following languages:
I. {aᵐ bⁿ cᵖ d^q | m + p = n + q, where m, n, p, q ≥ 0}
II. {aᵐ bⁿ cᵖ d^q | m = n and p = q, where m, n, p, q ≥ 0}
III. {aᵐ bⁿ cᵖ d^q | m = n = p and p ≠ q, where m, n, p, q ≥ 0}
IV. {aᵐ bⁿ cᵖ d^q | mn = p + q, where m, n, p, q ≥ 0}
Which of the languages above are context-free?
- (A) I and IV only
- (B) I and II only
- (C) II and III only
- (D) II and IV only
Answer
Answer (B)
Answer from the official GATE CS 2018 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes