GATE CS 2022 · Question 47 · Theory of Computation · Multiple select (MSQ) · 2 marks · no negative marks

Consider the following languages:
L₁ = {aⁿ w aⁿ | w ∈ {a,b}^*}L₂ = {w x w^R | w, x ∈ {a,b}^*, |w|, |x| > 0}
Note that w^R is the reversal of the string w. Which of the following is/are TRUE?

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

Answer (A), (B), (C)

Answer from the official GATE CS 2022 answer key.

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