GATE Computer ScienceVery hardGATE CSE · NIELIT

Let L be the set of strings over {a, b} whose second symbol from the right is a, and which also satisfy: the last symbol is b, or the fourth symbol from the right exists and is b. How many states does the minimal complete DFA of L have?

  1. A. 14
  2. B. 10
  3. C. 8
  4. D. 16

Correct answer: B. 10

The automaton must remember the last four symbols (and string length when below 4); Moore partition refinement merges only the equivalent histories, leaving 10 states.

More Theory of Computation questions

Exams that ask this topic