GATE Computer ScienceVery hardGATE CS

Let L be the set of binary strings that, read as unsigned numbers MSB first (ε counts as 0 and is accepted), are divisible by 56. How many states does the minimal complete DFA for L have?

  1. A. 7
  2. B. 10
  3. C. 14
  4. D. 56

Correct answer: B. 10

Write 56 = 2³ · 7. The odd part 7 needs a mod-7 tracker (7 states) and the factor 2³ adds 3 more states for the trailing-zero count, so a multiple of 2ᵏ·t with t odd needs t + k states: 7 + 3 = 10. Plain residues mod 56 would give 56 states, but many are equivalent.

More Theory of Computation questions

Exams that ask this topic