GATE Computer ScienceHardGATE CS (PYQ pattern)

Let h be the homomorphism h(a) = 0, h(b) = 01. How many distinct strings of length exactly 10 are in the image h({a, b}*)?

  1. A. 1024
  2. B. 55
  3. C. 144
  4. D. 89

Correct answer: D. 89

The image consists of binary strings that start with 0 and contain no 11 (every 1 is preceded by a 0). Those of length 10 number 89 (Fibonacci).

More Theory of Computation questions

Exams that ask this topic