GATE Computer ScienceHardGATE CS (PYQ pattern)
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 have?
- A. 7
- B. 32
- C. 11
- D. 10
Correct answer: C. 11
Remember the first symbol and count positions 2–4: ε, then for each first symbol a separate chain of length-1…4 states (2 × 4 = 8), then an accept sink and a reject sink (once the 5th symbol is read, the answer is fixed). 1 + 8 + 2 = 11.
More Theory of Computation questions
- 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…
- Consider L = { w ∈ {a, b} : every a in w is immediately followed by a b }. The minimal complete DFA for L has how many states?
- L = { w ∈ {a, b} : the 5th symbol from the right is a } needs 32 states in a minimal DFA. Its reversal Lᴿ needs how many states in a…
- An NFA over {a, b} has states 0, 1, 2, 3, start state 0 and accepting set {2,3}. Transitions: δ(0): a→{2,3}, b→{3}; δ(1): a→∅, b→{1}…