Computer Science EngineeringVery hardISRO SC

How many strings of length 9 over {a,b} contain bab as a substring?

  1. A. 200
  2. B. 320
  3. C. 312
  4. D. 306

Correct answer: C. 312

Count walks of length 9 in the minimal DFA that end in the absorbing accepting state: 312 of 512.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic