GATE CS 2016, set 2 · Question 53 · Theory of Computation · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

Consider the following languages:
L₁ = {aⁿ bᵐ cⁿ⁺ᵐ : m,n ≥ 1}L₂ = {aⁿ bⁿ c²ⁿ : n ≥ 1}
Which one of the following is TRUE ?

  1. (A) Both L₁ and L₂ are context-free.
  2. (B) L₁ is context-free while L₂ is not context-free.
  3. (C) L₂ is context-free while L₁ is not context-free.
  4. (D) Neither L₁ nor L₂ is context-free.
Answer

Answer (B)

Answer from the official GATE CS 2016 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes