GATE Computer ScienceVery hardGATE CS (PYQ pattern)
Over {0, 1} (MSB first, ε counted as 0), L = { w : w is divisible by 5 and w contains 11 as a substring }. How many states does the minimal complete DFA for L have?
- A. 8
- B. 15
- C. 20
- D. 30
Correct answer: B. 15
The product of the mod-5 tracker (5 states) with the 3-state 'contains 11' tracker has 15 pairs, all reachable and pairwise distinguishable.
More Theory of Computation questions
- How many strings of length 6 over {a, b} contain both ab and ba as substrings?
- How many states does the minimal complete DFA for { w ∈ {a, b} : ab occurs EXACTLY twice as a substring } have?
- L = { w ∈ {a, b} : #ab(w) ≡ #ba(w) (mod 3) }, where #ab and #ba count occurrences of these substrings. How many states does the minimal…
- L = { w ∈ {a, b} : |w| ≥ 2 and the 2nd symbol from the left equals the 2nd symbol from the right }. How many states does the minimal…
- L = { w ∈ {a, b} : na(w) ≡ 1 (mod 3) or w contains bb as a substring }. The minimal complete DFA has how many states?
- L = { w ∈ {a, b} : |w| ≥ 2 and the first symbol differs from the last symbol }. How many states does the minimal complete DFA for L have?