GATE CS 2022 (Forenoon) — Question 47

Theory of Computation (TOC)Regular and Context-Free Languages & Pumping LemmaMSQ2 marksMedium

Consider the following languages: \(L_1 = \{a^n wa^n \mid w \in \{a, b\}^*\}\) \(L_2 = \{wxw^R \mid w, x \in \{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_1\) and \(L_2\) are regular.
  2. B
    \(L_1\) and \(L_2\) are context-free.
  3. C
    \(L_1\) is regular and \(L_2\) is context-free.
  4. D
    \(L_1\) and \(L_2\) are context-free but not regular.
Practise the full 2022-FN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAPractise this subject in the exam simulatorTimed, GATE-style tests with analytics that find your weak topics.
Practise more on Regular and Context-Free Languages & Pumping LemmaTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group