Skip to content
GATEiit

GATE CSE 2025 Session 2 Q52: Which counting-based languages are regular

Question

Let Σ={a,b,c}\Sigma = \{a, b, c\}. For x∈Σ∗x \in \Sigma^*, and α∈Σ\alpha \in \Sigma, let #α(x)\#_\alpha(x) denote the number of occurrences of α\alpha in xx.

Which one or more of the following option(s) define(s) regular language(s)?

Try it: multiple select: one or more correct options

Select one or more options
Select all correct options. No negative marking, no partial marks.
Show answer and explanation

Answer: A, C (official GATE 2025 final answer key)

Concept used: Counting modulo a constant needs finitely many states; comparing two unbounded counts does not.

First step: Simplify (B): with no cc allowed, m=nm = n, giving {anbn}\{a^n b^n\}; for (C) build a product DFA with 7×97 \times 9 states.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2025 Session 2 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key