GATE Computer ScienceVery hardGATE CS (PYQ pattern)

Let L be the set of binary strings (MSB first, ε counted as 0 and accepted) whose value is divisible by 3; its minimal DFA has 3 states. Let h(a) = 1, h(b) = 01. How many states does the minimal DFA for the inverse homomorphic image h⁻¹(L) = { w ∈ {a, b}* : h(w) ∈ L } have?

  1. A. 6
  2. B. 4
  3. C. 3
  4. D. 9

Correct answer: C. 3

Simulate L's DFA over the images: a acts as v → 2v + 1 and b as v → 4v + 1 on remainders mod 3, giving a DFA with the same 3 states (an inverse homomorphism never needs more states than the original DFA).

More Theory of Computation questions

Exams that ask this topic