GATE Computer ScienceEasyGATE CS (PYQ pattern)

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?

  1. A. 2
  2. B. 4
  3. C. 3
  4. D. 5

Correct answer: C. 3

Start/accepting (not owing a b), a state owing a b (non-accepting), and the dead state (a followed by a): 3 states.

More Theory of Computation questions

Exams that ask this topic