GATE CS 2020 · Question 42 · Theory of Computation · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

Consider the following languages.
L₁ = {wxyx | w, x, y ∈ (0+1)⁺}L₂ = {xy | x, y ∈ (a+b)^*, |x| = |y|, x ≠ y}
Which one of the following is TRUE?

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

Answer (A)

Answer from the official GATE CS 2020 answer key.

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