You have a chessboard from which one corner square has been removed. You also have a set of identical dominoes, each of which can cover two adjacent chessboard squares. Let be the number of ways in which the chessboard can be covered with the dominoes, without gaps or overlaps.
What is the remainder when is divided by ?
Solution
Let be the number of ways of covering a chessboard with one corner square removed with dominoes. We are interested in the value of .
Let be the number of ways of covering a chessboard with dominoes. We develop a recurrence relation for and .
For , let us consider a covering of the chessboard. Number the cells of the chessboard where is a row and is a column. With respect to the first column, there are three cases:
* All three dominoes in this column are horizontal.
* There is a vertical domino covering and which implies there is a horizontal domino covering and .
* There is a vertical domino covering and which implies there is a horizontal domino covering and .
The number of ways of covering the remaining parts of the chessboard are , and respectively. Thus we have:
Now consider a covering of the chessboard with the square removed. There are two cases:
* The cells and are covered by a single vertical domino.
* There is a horizontal domino covering and and another horizontal domino covering and . This implies there must also be a horizontal domino covering and .
Adding together these two cases, we deduce that:
We can calculate the first few here:
| n | (mod 19) | (mod 19) | ||
|---|---|---|---|---|
| 0 | 1 | 1 | 1 | 1 |
| 1 | 3 | 4 | 3 | 4 |
| 2 | 11 | 15 | 11 | 15 |
| 3 | 41 | 56 | 3 | 18 |
| 4 | 153 | 209 | 1 | 0 |
| 5 | 571 | 780 | 1 | 1 |
| 6 | 2131 | 2911 | 3 | 4 |
We note a period of in the remainder modulo . As we conclude .
Let be the number of ways of covering a chessboard with one corner square removed with dominoes. We are interested in the value of .
Suppose the corner square is removed from the first column of the chessboard.
If , the dominoes that cover the squares of the last column can be placed in three different ways:
In type 1, the squares of the second last column are already covered. In types 2 and 3, there are two possibilities how the remaining two squares in the second last column can be covered, provided that :
When and the bottom square of the first column is removed, type 3b is not possible. Using the obvious , we see now that ; the four possibilities are obtained from types 1, 2a, 2b and 3a.
Therefore, the contribution to from types 2b and 3b is equal to the number of possibilities to tile the chessboard so that the last two columns are not of type 1. As we have seen above, the number of possibilities to tile a chessboard with the last two columns of type 1 is equal to , hence the contribution to from types 2b and 3b together is equal to , and finally
Starting with and we can now calculate (mod 19):
| n | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| (mod 19) | 1 | 4 | -4 | -1 | 0 | 1 | 4 |
It follows that (mod 19) repeats with period and . In particular .