GATE Computer ScienceHardGATE CS (PYQ pattern)
Let L = { aⁿbⁿ : 0 ≤ n ≤ 3 } over {a, b}. How many Myhill–Nerode equivalence classes does L have (equivalently, how many states does its minimal complete DFA have)?
- A. 11
- B. 7
- C. 8
- D. Infinitely many
Correct answer: C. 8
L is finite, so regular. Classes: ε (accepting), a, aa, aaa (the a-count still matters), 'exactly one more b needed' (aab, aaabb), 'two more b's needed' (aaab), 'complete, nothing more allowed' (ab, aabb, aaabbb), and dead. ab and aab are different (ab is accepted); aab and aaabb are the same. 8 classes — the 'infinitely many' answer is for unbounded n.
More Theory of Computation questions
- Which of the following languages is inherently ambiguous?
- Which of the following languages cannot be accepted by any deterministic pushdown automaton?
- Which of the following languages is context-free?
- Which of the following unary languages is NOT regular?
- Which one of the following statements is FALSE?
- Which regular expression denotes exactly the set of strings over {a, b} with an EVEN number of a's (zero included)?