GATE Computer ScienceModerateGATE CS (PYQ pattern)
How many states does the minimal complete DFA have for the set of strings over {a, b} that begin with ab OR end with ab?
- A. 3
- B. 5
- C. 6
- D. 7
Correct answer: C. 6
Classes: ε; a (could still begin with ab); 'begins-with-ab' failed and last symbol not a (b, abb-free strings like b, ba…b); failed and last symbol a (aa, …a); the accepting sink reached by the prefix ab; and the accepting, non-sink 'ends with ab' state (aab). ab and aab differ on the suffix a. 6 states.
More Theory of Computation questions
- How many states does the minimal complete DFA for the set of strings over {a, b} that end with abb have?
- 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…