GATE CS 2025 (Forenoon) — Question 45

Theory of Computation (TOC)Regular and Context-Free Languages & Pumping LemmaMCQ2 marks · −2/3 if wrongMedium

Consider the following two languages over the alphabet \( \{a, b, c\} \), where \( m \) and \( n \) are natural numbers. \( L_1 = \{a^m b^m c^{m + n} \mid m, n \ge 1\} \) \( L_2 = \{a^m b^n c^{m + n} \mid m, n \ge 1\} \) Which ONE of the following statements is CORRECT?
  1. A
    Both \( L_1 \) and \( L_2 \) are context-free languages.
  2. B
    \( L_1 \) is a context-free language but \( L_2 \) is not a context-free language.
  3. C
    \( L_1 \) is not a context-free language but \( L_2 \) is a context-free language.
  4. D
    Neither \( L_1 \) nor \( L_2 \) are context-free languages.
Practise the full 2025-FN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkIntroduction to Automata Theory (Hopcroft & Ullman)Regular languages, CFGs, pushdown automata and Turing machines.
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