GATE Computer ScienceVery hardGATE CSE

A DFA over {0, 1} has states 0–8 with start state 0 and accepting states {5, 6, 7, 8}. Transitions (on 0, on 1): 0:(1,2), 1:(3,4), 2:(3,4), 3:(5,6), 4:(5,6), 5:(7,8), 6:(7,8), 7:(7,0), 8:(8,0). How many states does the minimal equivalent DFA have?

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

Correct answer: B. 5

All 9 states are reachable; partition refinement (accepting versus non-accepting, then by successor classes) merges equivalent states, ending with 5 classes.

More Compiler Design questions

Exams that ask this topic