Back to the 2025 paper

Module 1: Introduction & Regular Languages

20252m

Which of the following languages is NOT regular?

(i) {anbn∣n≥0a^n b^n | n \ge 0}
(ii) {a,ba, b}*
(iii) Finite languages
(iv) Languages accepted by DFA

Worked SolutionAI Assisted

Answer

Correct Option: (i) {anbn∣n≥0}\{a^n b^n \mid n \ge 0\}

Explanation

  • (ii) {a,b}∗\{a,b\}^* → Regular, regex (a+b)∗(a+b)^*, DFA with 1 state.
  • (iii) Finite languages → Regular: any finite set is regular (union of finitely many strings).
  • (iv) Languages accepted by DFA → Definition of regular.
  • (i) {anbn}\{a^n b^n\} → Classic non-regular. Requires counting unbounded nn and matching aa's with bb's. Pumping Lemma: let pp be pumping length, w=apbpw = a^p b^p, pumping yy (all aa's) breaks equality ∣w∣a=∣w∣b|w|_a = |w|_b.

It is Context-Free (PDA can push aa's, pop for bb's) but not regular.

Final Answer

NOT regular is {anbn}\{a^n b^n\} → Option (i).

Similar questions

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.