GATE Computer ScienceVery hardGATE CSE

Let L = { w ∈ {a, b}* : (|w|_a + 2·|w|_b) mod 12 ∈ {1, 5, 9} }, where |w|_a and |w|_b count the a's and b's. What is the number of equivalence classes of the Myhill–Nerode relation of L (the number of states of its minimal DFA)?

  1. A. 12
  2. B. 4
  3. C. 6
  4. D. 8

Correct answer: B. 4

Only v mod 4 matters for acceptance after any extension, since 12 is a multiple of 4 and the accepting set is a full residue class mod 4: classes = 4.

More Theory of Computation questions

Exams that ask this topic