Back to the 2024 paper

Module 1: Introduction & Regular Languages

20242m

Which of these represents a regular language?

(i) {anbnn0}\{ a^n b^n \mid n \ge 0 \}
(ii) Strings with equal number of aa’s and bb’s
(iii) {ann is prime}\{ a^n \mid n \text{ is prime} \}
(iv) {ww starts with ’a’ and ends with ’b’}\{ w \mid w \text{ starts with 'a' and ends with 'b'} \}

Similar questions