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?
- A. 7
- B. 10
- C. 14
- 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
- Let L = { w ∈ {a, b} : |w| ≡ 0 (mod 3) and w contains ab as a substring }. How many states does the minimal complete DFA for L have?
- Over {a, b}, let L = { w : the number of a's in w is ≡ 1 (mod 3) and w ends with b }. How many states does the minimal complete DFA for L…
- How many strings of length 7 over {a, b} do not contain aa as a substring?
- Binary numerals are read most significant bit first (leading zeros allowed, the empty string counts as 0). What is the number of states in…
- An NFA over {a, b} has states 0, 1, 2, 3, start state 0 and accepting state 3. Transitions: δ(0,a) = {0,1}, δ(0,b) = {0}, δ(1,a) = δ(1,b)…
- How many strings of length 7 over {a, b} belong to the language of the regular expression (a + bb)(b + ε)?