Computer Science EngineeringHardISRO SC

How many strings of length 8 over {a,b} contain no two consecutive a's?

  1. A. 55
  2. B. 56
  3. C. 53
  4. D. 248

Correct answer: A. 55

Counts follow f(n)=f(n-1)+f(n-2) with f(1)=2, f(2)=3, so f(8)=55.

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

Exams that ask this topic