GATE Computer ScienceVery hardGATE CS (PYQ pattern)
Let L = { aⁿ : n = 1, or n ≥ 3 and (n ≡ 2 (mod 4) or n ≡ 3 (mod 6)) }. How many states does the minimal DFA for this unary language have?
- A. 12
- B. 15
- C. 13
- D. 14
Correct answer: B. 15
Without the exceptions L would be periodic with period lcm(4, 6) = 12 and need a 12-state cycle. Here n = 0, 1, 2 break the period (n = 1 is accepted though 1 is in neither class; n = 2 is rejected though 2 ≡ 2 mod 4), so the tail a⁰, a¹, a² must be kept before the cycle starting at n = 3: 3 + 12 = 15 states.
More Theory of Computation questions
- Let L = { aⁿ : n² ≡ 1 (mod 8) }. How many states does the minimal DFA for L have?
- Let L = { aⁿ : n ≥ 5 and n ≡ 1 (mod 3) }. How many states does the minimal DFA for the concatenation L·L have?
- Let L = { w ∈ {a, b} : |w| ≥ 5 and the 5th symbol from the LEFT equals the 1st symbol }. How many states does the minimal complete DFA for…
- L = { aⁿbᵐ : n, m ≥ 0 and n ≡ m (mod 3) }. How many states does the minimal complete DFA for L have?
- Occurrences of aa may overlap (aaa contains two). How many states does the minimal complete DFA for { w ∈ {a, b} : w contains EXACTLY two…
- L = { w ∈ {a, b} : (na(w) − nb(w)) is divisible by 3 and w contains no bb }. Its minimal complete DFA has 7 states. How many of them are…