GATE Computer ScienceVery hardGATE CS (PYQ pattern)
Let L = { w ∈ {a, b}* : the 3rd symbol from the right is a } (minimal DFA: 8 states) and Lᴿ its reversal (the 3rd symbol from the LEFT is a). How many states does the minimal complete DFA for L ∪ Lᴿ have?
- A. 13
- B. 16
- C. 40
- D. 12
Correct answer: B. 16
Once the 3rd symbol from the left is a, every extension is accepted (sink). Otherwise the DFA must, while reading the first three symbols, also keep the window needed for L: prefixes of length 0–2 (1 + 2 + 4 = 7 classes, some merging) lead into the 8 window states of L, with the accept sink added. Minimisation gives 16 states.
More Theory of Computation questions
- Let L = { w ∈ {a, b} : na(w) = 2·nb(w) }. The prefix language Pref(L) = { x : xy ∈ L for some y }. How many states does the minimal…
- Let L = (a + b)abb. The right quotient L / b = { w : wb ∈ L } has a minimal complete DFA with how many states?
- Let L = (a + b)abb. The left quotient a⁻¹L = { w : aw ∈ L } has a minimal complete DFA with how many states?
- Let L be the set of binary strings (MSB first, ε counted as 0 and accepted) whose value is divisible by 3; its minimal DFA has 3 states…
- Let L = { binary strings (MSB first, ε accepted) whose value is divisible by 5 }, with a minimal DFA of 5 states. For h(a) = 1 and h(b) =…
- Let L₁ = { w ∈ {a, b} : |w| ≡ 0 (mod 4) } and L₂ = { w : (na − nb) ≡ 0 (mod 4) }. The minimal complete DFA for L₁ ∪ L₂ has how many…