GATE Computer ScienceEasyGATE CS (PYQ pattern)
How many states does the minimal complete DFA for the set of strings over {a, b} that end with abb have?
- A. 3
- B. 4
- C. 5
- D. 8
Correct answer: B. 4
One state per matched prefix of abb (0, 1, 2, 3 symbols): 4 states, with the usual KMP fall-back transitions.
More Theory of Computation questions
- Let L = { w ∈ {a, b} : na(w) is divisible by 3 }. How many states does the minimal complete DFA for the concatenation L·L have?
- How many states does the minimal complete DFA have for { w ∈ {a, b} : w contains exactly two a's OR exactly two b's }?
- How many states does the minimal complete DFA have for { w ∈ {a, b} : |w| is divisible by 3 and the second-last symbol of w is a }?
- How many states does the minimal complete DFA for { w ∈ {a, b} : w begins with a } have?
- 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…
- 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…