GATE Computer ScienceVery hardGATE CS (PYQ pattern)

In how many ways can a 2 × 10 rectangle be tiled with 2 × 1 dominoes (either orientation) and 2 × 2 squares?

  1. A. 512
  2. B. 1024
  3. C. 89
  4. D. 683

Correct answer: D. 683

Let t(n) be the number of tilings of a 2 × n strip. The last column is covered by a vertical domino (t(n − 1)), or the last two columns by two horizontal dominoes or one square (2·t(n − 2)): t(n) = t(n − 1) + 2t(n − 2). From t(0) = t(1) = 1 this gives t(10) = 683.

More Algorithms questions

Exams that ask this topic