GATE CS 2025 (Afternoon) — Question 52

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

Let \( \Sigma = \{a, b, c\} \). For \( x \in \Sigma^* \), and \( \alpha \in \Sigma \), let \( \#_\alpha(x) \) denote the number of occurrences of \( \alpha \) in \( x \). Which one or more of the following option(s) define(s) regular language(s)?
  1. A
    \( \{a^m b^n \mid m, n \ge 0\} \)
  2. B
    \( \{a, b\}^* \cap \{a^m b^n c^{m - n} \mid m \ge n \ge 0\} \)
  3. C
    \( \{w \mid w \in \{a, b\}^*, \#_a(w) = 2 \pmod 7, \text{ and } \#_b(w) = 3 \pmod 9\} \)
  4. D
    \( \{w \mid w \in \{a, b\}^*, \#_a(w) = 2 \pmod 7, \text{ and } \#_a(w) = \#_b(w)\} \)
Practise the full 2025-AN 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