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?
- (A) L₁ and L₂ are regular.
- (B) L₁ and L₂ are context-free.
- (C) L₁ is regular and L₂ is context-free.
- (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