GATE Computer ScienceVery hardGATE CS
Let L = { aⁿ : n ≥ 5 and (n is divisible by 4 or n is divisible by 6) }. How many states does the minimal complete DFA for L have?
- A. 12
- B. 16
- C. 17
- D. 13
Correct answer: C. 17
For n ≥ 5 membership is periodic with period lcm(4, 6) = 12, and the accepting residues {0, 4, 6, 8} have no smaller period, so the cycle needs 12 states. The counts 0 to 4 form a tail of 5 states that are not equivalent to any cycle state, giving 5 + 12 = 17 (confirmed by Myhill–Nerode enumeration).
More Theory of Computation questions
- Which one of the following languages over the one-letter alphabet {a} is NOT context-free?
- How many strings of length 12 over {a, b} contain exactly three occurrences of aa as a substring (overlapping occurrences counted…
- L₁ is accepted by a minimal complete DFA with 4 states and L₂ by a minimal complete DFA with 3 states. What is the largest number of…
- The minimal complete DFA of a language L has 5 states. What is the largest number of states that the minimal complete DFA of the Kleene…
- Let L = { w ∈ {a, b} : every prefix u of w satisfies |na(u) − nb(u)| ≤ 2 }. How many states does the minimal complete DFA for L have?
- Let r = (aab + ab + b)(ba + a). The number of strings of length 7 over {a, b} that are NOT in L(r) is