- GATE CS
- 2026–27 pattern practice
- Theory of Computation
- Regular expressions
- Easy
Which language over {a, b} is regular?
Regular Languages
Pick an option to check your answer.
Answer: A. Solution
with independent is exactly the regular expression , so it is regular.
Why not the others
- needs unbounded counting; the pumping lemma shows it is not regular (it is context-free).
- needs to remember all of ; it is not even context-free.
- with prime is not regular — prime lengths are not ultimately periodic.