GATE Computer ScienceHardGATE CSE

Over {a, b}, L = { w : the fourth symbol from the right end of w is a }. How many states does the minimal complete DFA of L have?

  1. A. 8
  2. B. 15
  3. C. 32
  4. D. 16

Correct answer: D. 16

The DFA must remember the last 4 symbols (2⁴ = 16 histories are pairwise distinguishable); 16 is also enough.

More Theory of Computation questions

Exams that ask this topic