GATE Computer ScienceVery hardGATE CSE · ISRO

A DFA over {a, b} has states 0–4, start 0 and accepting states {2, 4}. Transitions (on a, b): 0:(1,2), 1:(2,0), 2:(3,3), 3:(4,1), 4:(4,0). How many strings of length 10 does it accept?

  1. A. 433
  2. B. 392
  3. C. 409
  4. D. 469

Correct answer: C. 409

Propagate the number of strings reaching each state for 10 steps (transfer-matrix power) and add the counts of states 2 and 4: 409.

More Theory of Computation questions

Exams that ask this topic