How Many Ways Can You Tile the Tilted Square?
This is a problem that can be divided into subproblems. For example, if we decide to pick this rectangle:
There are four components this gets split into: a triangular formation on the top and bottom, and a single tile on the left and right.
Let's focus on the top component. This can be split in three ways:
- In the first, this is just a smaller subproblem: a triangular formation of height 2. Let's call this a corner triangle of height 2.
- In the second, this is two smaller subproblems, each of them being a triangle. However, these triangles are different: the edge squares lie along the "hypotenuses" of these triangles. Let's call each of these a side triangle of size 2.
- In the third, this is three smaller subproblems, each of them being singular squares (only one way to tile). Technically, the one on the top is a corner triangle of side 1, and the ones on the left and right are side triangles of side 1.
Notice that we can find the number of ways to tile any particular subsection, and the total number of ways to tile is the product for each of the subsections.
So with this, we can establish the three functions needed to determine the overall answer:
- one for the overall diamond (let describe this for a diamond with squares along one edge)
- one for the corner triangle (let describe this for a corner triangle with height )
- one for the side triangle (let describe this for a side triangle with size )
Side triangles
Define . Now for an side triangle of size , we can split by a rectangle, creating one side triangle of size and the other of size . As a result, the total number of distinct formations is the sum of all these from to , or:
Note that , , and , which can be seen manually. In fact, these are Catalan numbers! is indeed just the –th Catalan number, which we will denote as .
The first few Catalan numbers:
0 | 1 | 2 | 3 | 4 | 5 | |
---|---|---|---|---|---|---|
1 | 1 | 2 | 5 | 14 | 42 |
Corner triangles
Define . Now for a corner triangle of height , we can split by a rectangle, creating one corner triangle of size and two corner triangles, each of size . So the total number of distinct formations is the sum of all these from to , or:
The first few values of :
0 | 1 | 2 | 3 | 4 | 5 | |
---|---|---|---|---|---|---|
1 | 1 | 2 | 5 | 14 | 42 |
Diamonds
For a diamond, after choosing a rectangle, we split into four corner triangle subregions: two of size and two of size . So the total number of distinct formations is the sum of all these from to , or:
The first few values of (with ):
0 | 1 | 2 | 3 | 4 | 5 | |
---|---|---|---|---|---|---|
1 | 1 | 2 | 9 | 106 | 3002 |
The questions asked us about diamonds of sides of and , leading us to the answers below!
Answers
This Week's Fiddler: 106
Extra Credit: 3002
And beyond
While I did not determine a closed form, we now have a recursive definition of the sequence! With as the –th Catalan number, we can define the following functions to describe :
And the values for up to :
0 | 1 | 1 | 1 |
1 | 1 | 1 | 1 |
2 | 2 | 2 | 2 |
3 | 5 | 7 | 9 |
4 | 14 | 38 | 106 |
5 | 42 | 274 | 3002 |
6 | 132 | 2350 | 153432 |
7 | 429 | 22531 | 11209105 |
8 | 1430 | 233292 | 1027079042 |
9 | 4862 | 2555658 | 109919229034 |
10 | 16796 | 29232554 | 13176445132632 |
11 | 58786 | 346013450 | 1722653938299826 |
12 | 208012 | 4211121946 | 241219579652401784 |
13 | 742900 | 52446977292 | 35714287018956797136 |
14 | 2674440 | 666024794758 | 5537912139464706335288 |
15 | 9694845 | 8599676755883 | 892837334232641551689441 |
16 | 35357670 | 112647192598844 | 148820403511450083446225026 |
17 | 129644790 | 1494224720878614 | 25530595384066080684214316346 |
18 | 477638700 | 20041069061550880 | 4491442427844125614764520894656 |
19 | 1767263190 | 271454315346852530 | 807865223153246598712705790433906 |
20 | 6564120420 | 3709291397981162290 | 148197637526550957704054952422581656 |