GATE Computer ScienceVery hardGATE CSE · UGC NET

A DFA over {0,1} has states p0 (start), p1, p2, A (accepting), D. Transitions: p0 –0,1→ p1; p1 –0,1→ p2; p2 –1→ A; p2 –0→ D; A –0,1→ A; D –0,1→ D. It therefore accepts the strings whose third symbol is 1. Reverse every transition, make A the start state and p0 the only accepting state, and determinise the result. How many states does the minimal complete DFA for the reversed language have?

  1. A. 5
  2. B. 16
  3. C. 6
  4. D. 8

Correct answer: D. 8

The reversed language is "the third symbol from the right is 1"; the DFA must remember the last 3 symbols (short strings behave like zero-padded ones), so the minimal DFA has 2³ = 8 states, although the original DFA had only 5.

More Theory of Computation questions

Exams that ask this topic