GATE Computer ScienceVery hardGATE CSE
Let L = { w ∈ {a, b}* : the number of a's is divisible by 4 and w contains bb as a substring }. How many states does the minimal complete DFA for L have?
- A. 8
- B. 12
- C. 13
- D. 10
Correct answer: B. 12
The a-counter mod 4 combined with the tracker (no pending b, one pending b, bb already seen) gives 12 reachable states, and Moore refinement shows all 12 are pairwise distinguishable.
More Theory of Computation questions
- A DFA reads 12-bit strings (MSB first) and accepts exactly those whose binary value is divisible by 7 (the all-zeros string included). How…
- Which one of the following languages over {0, 1} is regular?
- Let L = { w ∈ {a, b} : (na(w) − 2·nb(w)) mod 6 ∈ {0, 3} }, where na and nb count the a's and b's. How many states does the minimal…
- Let L = { w ∈ {a, b} : (2·na(w) + 4·nb(w)) mod 6 = 2 }. How many strings of length exactly 7 belong to L?
- A DFA reads ternary numerals over {0, 1, 2}, most significant digit first (leading zeros allowed; ε has value 0 and is accepted), and…
- Binary strings are read LSB first (the leftmost symbol is the least significant bit; ε has value 0 and is accepted). How many states does…