Professional Documents
Culture Documents
Modelling of A Recurrence Relation Exercise 1
Modelling of A Recurrence Relation Exercise 1
Exercise 1
For n ≥ 1 we want to tile a 2 × n chessboard using the three tiles shown below, which can be
rotated and mirrored in any direction. Let an count the number of such tilings.
b) To obtain a recurrence relation for an we in addition let bn count the number of tilings
of a pruned 2 × n chessboard in which a corner cell has been removed.1 Give recurrence
relations both for an and bn for n ≥ 2. (You don’t need to derive a direct formula.)
1
It does not matter which corner you remove, because these are mirrored versions of each other.
1
Solution a)
Solution b)
Let’s consider an . We can either: (1) fill the left column with 1 × 1 blocks which
can be extended with an−1 tilings; (2) use the large z-shaped-block for which there are
2 ways to place it (one as above, one mirrored). In both cases the left side can only
be filled with a 1 × 1 block. The remainder can be extended with bn−2 tilings (hence
2bn−2 possibilities total); (3) use the 2 × 1 block on the left. We can either (3a) place it
vertically and extend it with an−1 tilings, or (3b) place it horizontally. When placing it
horizontally we can either add another 2 × 1 block (followed by an−2 tilings) or add a
1 × 1 block, which can be done in 2 ways (below/above) and can be extended with bn−1
tilings (hence 2bn−1 possibilities total). This gives:
Considering bn there are 3 ways to fill up the pruned side of the chessboard. We can either
(1) use a 1 × 1 block and extend it with an−1 tilings, (2) use a z-shaped-block and extend
it with bn−2 tilings, or (3) use a 2 × 1 block and extend it with bn−1 tilings. This gives:
Not part of the exercise: we can use the recurrence relation for bn to construct a recurrence
relation for an that only consists of terms ai . Multiplying the 2nd equation by 2 and sub-
tracting it from the 1st equation gives an − 2bn = an−2 or equivalently bn = (an − an−2 )/2.
Substituting this in the first equation would give the following recurrence equation for an