tiling rectangles, cylinders, and mobius stripspga/fibonacci-2010.pdf · tiling rectangles,...
TRANSCRIPT
TILING RECTANGLES, CYLINDERS, AND MOBIUS
STRIPS
PETER G. ANDERSON
Abstract. We present a method for determining the number of waysvarious two-dimensional grids can be tiled using several small tile reper-toires.
1. Problem Background and Definitions
Figure 1. Tile sets for problems 1, 2, 3, and 4.
How many ways may we tile an m×n rectangular grid (i.e., graph paper)using a pair of tile shapes from the repertoires show in Figure 1:
(1) Vertical dominoes and squares.
(2) L-trimonoes and squares.
(3) Large and small squares.
(4) Vertical and horizontal dominoes.
In all cases here, the short dimensions are 1 and the long dimensions are2. We can modify the problem by identifying the top and bottom edges toform a cylinder. We can identify the top and bottom edges with orientationreversal to form a Mobius strip. (Exception: our problem-2, L-trimonoes,cannot participate in the tilings of non-orientable surfaces.)
2. Our Approach
Problem 1, tiling with vertical dominoes and squares , trivially breaksdown into the problem of tiling n independent m×1 boards (or m bracelets),but this simpler problem gives us the opportunity to introduce our approachand some conventions.
1
2 PETER G. ANDERSON
Grid tiling using any of our four tiling sets is equivalent to a binarylabeling, or coding, of the grid’s horizontal (length 1) line segments using“1” to indicate a line segment completely covered by a tile and “0” to indicatethat a line segment coincides with a tile’s boundary segment. See Figure 2.For rectangle tiling, the codes for the bottom and top lines are all 0’s. Forall our tiling problems, the only restriction on codes is that two 1’s may notbe vertically adjacent. So, the codes of two adjacent horizontal lines, x andy, must satisfy x∧ y = 0 (the logical product). See, for example, the secondand third lines of code in Figure 2: 00100 ∧ 10001 = 00000.
0 0 0 0 0
0000
0 0 0
0 0 0 0
0 0
0 0 0 0 0
1
1
1
1
1 11
Figure 2. Coding the horizontal line segments of a 5 × 5grid according to a problem-1 tiling.
Our four problems differ in the code patterns they permit. We describethese patterns as regular languages:
(1) Any pattern is possible: (0 + 1)∗
(2) Every 1 must be followed by a 0: (10 + 0)∗
(3) Blocks of 1’s have even lengths: (0 + 11)∗
(4) Again, every pattern is possible: (0 + 1)∗
Problem 1’s and problems 4’s codes are unrestricted—there are 2n codes oflength n. Problems 2 and 3 have a Fibonacci number fn = Fn+1 of codesof length n. These coding patterns are equivalent to the square and dominon-board tiling exploited by A. T. Benjamin and J. J. Quinn [1], with thesingle-bit and double-bit patterns corresponding, respectively, to squaresand dominoes.
Counting rectangular tilings. If we execute the following steps, wecan easily compute the number of problem 1, 2, and 3 tilings of rectanglesand cylinders. Problem 4 requires a more intricate computation, which wewill tackle below. We use a graph or a transition network, (V,G), to expressthe allowed transitions between codes. The graph has 2n or fn vertices,
TILING RECTANGLES, CYLINDERS, AND MOBIUS STRIPS 3
V = {x | x is a valid code of length n} and edges, E = {(x, y) | x ∧ y = 0}.The number of tilings for an m× n rectangle is the number of paths from 0to 0 of length m in the network. Let Mn be the adjacency matrix for thisnetwork
Mn(x, y) = 1⇔ x ∧ y = 0
then the number of such paths is Mmn (0, 0), the upper-left entry of the mth
power of Mn.Counting cylindrical tilings. Each closed path in this network from
any vertex to itself describes a valid tiling for the m× n cylinder. This is
trace(Mmn ) =
∑x∈V
Mmn (x, x)
Counting Mobius strip tilings. A path of length m from x to xR,where xR denotes the reverse code of x gives a Mobius strip tiling. We maycount all of them with
∑x∈V M
mn (x, xR). Denote the permutation x→ xR
by the matrix R. Then the number of Mobius strip tilings is given bytrace(RMM
n ).
3. Constructing the Matrices
Construct the matrices Mn recursively, directed by the recursive descrip-tions of the four regular languages above. Denote a generic string in anyof these languages by x or y, and the null string by ε. The rules (really, are-statement of the regular expressions given above) are:
(1) x = ε or 0y or 1y, where y is valid.
(2) x = ε or 10y or 1y, where y is valid.
(3) x = ε or 0y or 11y, where y is valid.
That is, a valid string is either null or a shorter valid string prepended with asmall choice of characters (this, by the way, is how we demonstrate that thenumber of valid strings of a given length is a Fibonacci number for Problems2 and 3).
Problem 1 . We can easily write down the first few matrices forProblem 1:
M0 = [1] M1 =
[1 11 0
]M2 =
1 1 1 11 0 1 01 1 0 01 0 0 0
The rows and columns of these three matrices are indexed by the codes
M0: εM2: 0, 1M2: 00, 01, 10, 11
4 PETER G. ANDERSON
The recursion that gives us Mn in terms of smaller M ’s follows from thefollowing observations (for all four problems):
M(0x, 0y) = M(0x, 1y) = M(1x, 0y) = M(x, y), M(1x, 1y) = 0 (3.1)
Simply summarize these rules for Problem 1 as
Mn =
[Mn−1 Mn−1Mn−1 0
]This Mn is the familiar mod 2 Pascal triangle, also known as the Sierpinskitriangle. It is also expressed as the k-fold Hadamard or tensor product:Mn = M⊗n1 . The other three problems have interesting fractal-patternmatrices as well—see Figure 5. The rules in Equation 3.1 apply to problems2 and 3.
Problem 1 detour. If we join the top and bottom edges of the m × nrectangle with a single-step offset (see Figure 3), attaching the bottom ofcolumn one to the top of column two, and forth, the number of tilings is fnm— we are now tiling a single mn-board. If we next join the boundaries ofthe two loose ends, the number of tilings is Lnm — an mn-bracelet. Denoteby x and y the n-bit codes of the original rectangle’s bottom and top edges,respectively. In the first, Fibonacci, case, the high-order n − 1 bits of xmust match the low-order n− 1 bits of y, and the left-most bit of x and theright-most bit of y must both be zero. Abuse the notation by now thinkingof x and y as integers in the range [0, 2n), we require y < 2n−1 and x = 2y.Counting all the paths in our network of length m between two such codes,we get:
fnm =2n−1−1∑y=0
Mmn (2y, y)
In the Lucas number case, we modify the above slightly to require that theleft-most bit of x and the right-most bit of y must agree, giving the secondterm in the following formula.
Lnm =
2n−1−1∑y=0
Mmn (2y, y) +
2n−1∑y=2n−1
Mmn (2y + 1, y − 2n−1)
In the Lucas case, we have Lnm expressed as the trace of P ·Mmn , where
P is a permutation matrix. In the Fibonacci case, we only sum half of theterms of that trace.
Problem 2 . The first four matrices are:
M0 = [1],M1 = [1],M2 =
[1 11 0
], M3 =
1 1 11 0 11 1 0
The rows and columns of these four matrices are indexed by the codes
M0: εM1: 0
TILING RECTANGLES, CYLINDERS, AND MOBIUS STRIPS 5
Figure 3. A shifted mating of the top and bottom edgesof a rectangle.
M2: 00, 10M3: 000, 010, 100
We re-cast the rules given by Equation 3.1 as follows.
M(0x, 0y) = M(00x, 10y) = M(10x, 00y) = M(x, y), M(10x, 10y) = 0(3.2)
Generally,
Mn =
[Mn−1 M ′n−1M ′n−1 0
]M ′n−1 on the top consists of the first fn−2 columns of the fn−1 × fn−1 ma-trix Mn−1; M
′n−1 on the bottom is its transpose. (All of our matrices are
symmetric.)
Problem 3 . The first four matrices are:
M0 = [1],M1 = [1],M2 =
[1 11 0
], M3 =
1 1 11 0 01 0 0
The rows and columns of these four matrices are indexed by the codes
M0: εM1: 0M2: 00, 11M3: 000, 011, 110
We re-cast the rules given by Equation 3.1 as follows.
M(0x, 0y) = M(00x, 11y) = M(11x, 00y) = M(x, y), M(01x, 11y) = M(11x, 01y) = 0(3.3)
Generally,
Mn =
[Mn−1 Mn−2Mn−2 0
]
6 PETER G. ANDERSON
The bottom right block of zeros is L-shaped. Figure 4 gives these rulespictorially.
Problem 4 . We are still bound by the rule Mn(x, y) = 1⇔ x∧y = 0,which gives us the mod-2 Pascal triangle matrix of problem 1. Here, wedenote this matrix by Pn. But that does not describe the whole situation.This rule only expresses that no two vertically adjacent grid lines can bothbe covered (i.e, have code 1). We also require that all the tiles between anytwo vertical dominoes are horizontal dominoes; that is, the space between1’s in a pair of adjacent code words is even, expressed by an even numberof 0’s, giving us the rule,
x⊕ y ∈ (00 + 1)∗ (3.4)
where ⊕ denotes or, the logical sum. Denote by Nn the adjacency matrixfor the transition network expressed by Equation 3.4. Then the matrix weneed to solve the problem, corresponding to those of problems 1, 2, and 3,is
Mn = Pn ∧Nn
This expresses that (x, y) is a valid transition in the problem 4 network ifand only if it is a valid problem-1 transition and Equation 3.4 holds.
The first few matrices for Problem 4 are
N0 = [1] N1 =
[0 11 1
]N2 =
1 0 0 10 0 1 10 1 0 11 1 1 1
The rows and columns of these three matrices are indexed by the codes
N0: εN1: 0, 1N2: 00, 01, 10, 11
The recursion that gives us Nn in terms of smaller N ’s follows from thefollowing observations:
N(00x, 00y) = N(0x, 1y) = N(1x, 0y) = N(1x, 1y) = N(x, y) (3.5)
N(00x, 01y) = N(01x, 00y) = N(01x, 01y) = 0
Simply summarize these rules for Problem 4 as
Nn =
[N ′n−1 Nn−1Nn−1 Nn−1
]where the upper left quadrant is
N ′n−1 =
[Nn−2 0
0 0
]See Figure 4.
TILING RECTANGLES, CYLINDERS, AND MOBIUS STRIPS 7
00
0
n−1 n−1
n−1
n−1 n−1’
n−1’
n−2
n−2
n−1
0 0
0
n−1
n−1n−1
n−2
Figure 4. Pictorial representation of matrix constructionsexpressed recursively for our four problems. Square matricesindexed by codes of lengths n are made of of matrices indexedby shorter codes. The lower right matrix represents Nn forproblem 4.
4. Calculations
The number of tilings for problems 2–4 are given in Tables 1,2, and 3, resp. We used the J programming language [2] (contact the authorfor copies of the code).
8 PETER G. ANDERSON
Table1.
Prob
lem2
calculation
s.T
op:
tiling
rectangles,
bottom
:tilin
gcy
lind
ers.T
he
colum
nlab
elsare
the
rectangles’
wid
th.
Th
erow
nu
mb
ersare
the
rectangles’
heigh
t(b
eforeed
geid
entifi
cationfor
the
cylin
-d
er).
12
34
56
78
91
11
11
11
11
12
12
35
813
2134
553
13
717
4199
239577
13934
15
1763
227827
299910897
395615
18
41227
12346743
36787200798
10958516
113
99827
674355447
4543853729091
305846877
121
2392999
36787454385
559886169050253
8513020298
134
57710897
2007983729091
690502531280128950
237201499959
155
139339561
109585130584687
85130202923720149995
660647962955
12
34
56
78
91
11
11
11
11
12
13
47
1118
2947
763
17
1335
81199
4771155
27854
117
43181
6212309
830330277
1097535
141
142933
474126660
143697788453
42932866
199
4694811
36211307983
248843120546803
1680761537
1239
154924807
2765613557711
43089985535404487
65794211658
1577
5116127913
211224141097664
74615651713951571713
2575567850269
11393
16897659561
16132281474748249
12920616493363549830913
10082260863841
TILING RECTANGLES, CYLINDERS, AND MOBIUS STRIPS 9
Table 2. Problem 3 calculations. Top: tiling rectangles,middle: tiling cylinders, bottom: Mobius strip. The columnlabels are the rectangles’ width. The row numbers are therectangles’ height (before edge identification for the cylinderand Mobius strip).
1 2 3 4 5 6 7 8 91 1 1 1 1 1 1 1 1 12 1 2 3 5 8 13 21 34 553 1 3 5 11 21 43 85 171 3414 1 5 11 35 93 269 747 2115 59335 1 8 21 93 314 1213 4375 16334 599256 1 13 43 269 1213 6427 31387 159651 7956117 1 21 85 747 4375 31387 202841 1382259 91671198 1 34 171 2115 16334 159651 1382259 12727570 1135557919 1 55 341 5933 59925 795611 9167119 113555791 1355115601
1 2 3 4 5 6 7 8 91 1 1 1 1 1 1 1 1 12 1 3 4 7 11 18 29 47 763 1 5 7 17 31 65 127 257 5114 1 11 19 67 171 503 1387 3939 110355 1 21 40 205 651 2586 9213 34589 1265806 1 43 97 711 3011 16369 79101 404103 20102117 1 85 217 2313 12531 92875 592159 4057945 268503858 1 171 508 7771 55171 557628 4763459 44093027 3925971049 1 341 1159 25685 235651 3250589 36885213 459630701 5472622123
1 2 3 4 5 6 7 8 91 1 1 1 1 1 1 1 1 12 1 3 4 7 11 18 29 47 763 1 5 7 17 31 65 127 257 5114 3 9 21 65 173 501 1389 3937 110375 3 15 48 191 673 2550 9271 34495 1267326 5 31 119 659 3125 16111 79679 402803 20131317 5 53 275 2097 13135 90917 598169 4038961 269097358 11 101 698 6901 58481 543590 4821373 43847709 3936348149 11 171 1661 22123 252981 3147819 37448849 456381347 5491108013
5. Comments and Observations
The numbers in our tables.
The problem-2 tilings for rectangles of height 3,
3, 7, 17, 41, 99, 239, 577, 1393
10 PETER G. ANDERSON
Table 3. Problem 4 calculations. Top: tiling rectangles,middle: tiling cylinders, bottom: Mobius strip. The columnlabels are the rectangles’ width. The row numbers are therectangles’ height (before edge identification for the cylinderand Mobius strip).
1 2 3 4 5 6 7 8 91 0 1 0 1 0 1 0 1 02 1 2 3 5 8 13 21 34 553 0 3 0 11 0 41 0 153 04 1 5 11 36 95 281 781 2245 63365 0 8 0 95 0 1183 0 14824 06 1 13 41 281 1183 6728 31529 167089 8179917 0 21 0 781 0 31529 0 1292697 08 1 34 153 2245 14824 167089 1292697 12988816 1084357459 0 55 0 6336 0 817991 0 108435745 0
1 2 3 4 5 6 7 8 91 0 2 0 2 0 2 0 2 02 1 5 4 9 11 20 29 49 763 0 12 0 32 0 108 0 392 04 1 29 19 121 176 725 1471 5041 119895 0 70 0 450 0 4480 0 51842 06 1 169 91 1681 2911 28561 79808 591361 20918177 0 408 0 6272 0 179928 0 6422528 08 1 985 436 23409 48301 1138660 4375897 71385601 3727137289 0 2378 0 87362 0 7193450 0 784792962 0
1 2 3 4 5 6 7 8 91 0 2 0 2 0 2 0 2 02 3 3 6 7 13 18 31 47 783 0 8 0 28 0 104 0 388 04 7 11 37 71 252 539 1813 4271 135195 0 30 0 322 0 3960 0 49538 06 17 41 239 769 5047 17753 114376 434657 26637537 0 112 0 3584 0 141232 0 5762576 08 41 153 1502 8449 98681 603126 7155833 46069729 5325414569 0 418 0 39618 0 4936162 0 648500098 0
are OEIS no. A001333 [4], identified as “numerators of continued fractionconvergents to
√2.” The sequence is also identified as the “number of sym-
metric 2n× 2 or (2n− 1)× 2 crossword puzzle grids: all white squares areedge connected; at least 1 white square on every edge of grid.” If we colorblack the corner square of or L-trimonono and strip off the top row andrightmost column of all white squares, we get exactly this description—theyare isomorphic. (The new description does not suffer from an orientability
TILING RECTANGLES, CYLINDERS, AND MOBIUS STRIPS 11
restriction: we could tile Mobius strips with black and white squares withno two black squares sharing an edge.) The fourth row of the same table
1, 5, 17, 63, 227, 827, 2999, 10897, 39561
is OEIS no. A051736, similarly identifies as the “number of 3 × n (0, 1)-matrices with no consecutive 1’s in any row or column.” The cylinder tilingnumbers for problem 3 are similarly shown (e.g., sequence A050400) andidentified as the “number of independent sets of vertices in P3×Cn (i.e., theCartesian product of path and cycle graphs).
The problem-3 counts for rectangles of width 3,
1, 3, 5, 11, 21, 43, 85, 171, 341
are OEIS no. A001045, the Jacobsthal sequence and the “number of waysto tile a 3× (n−1) rectangle with 1×1 and 2×2 square tiles.” (Many rowsof this table are in the OEIS.) As with problem 2, we could color black thelower left 1×1 square of the 2×2, remove the top row and rightmost columnof all white squares and speak of the tilings with black and white squaresfor which no two black squares share a corner (i.e,, are never a king’s moveapart).
The problem-3 cylinder tiling numbers (rows and columns) are not, ingeneral, in the OEIS, beyond the first few rows or columns, which are low-order linear recurrences. For instance,
(1), 1, 4, 7, 19, 40, 97, 217, 508, 1159
is the hight 3 tilings count. That is sequence A006130, computed with
an = an−1 + 3an−2, a0 = a1 = 1
It also counts the walks of length n on a couple of graphs whose adjacencymatrices are 4× 4.
Problem 4 rectangle tilings were determined by P. W. Kasteleyn [3]and H. N. V. Temperley and Michael E. Fisher [5]. Our Table 1 is essentiallysequence OEIS no. A099390. Column 8 in Table 1 is sequence A028479,the “number of perfect matchings in graph C8×Pn.” Column 9 is sequenceA028480.
The Mobius strip tiling made from 3× n rectangles,
(2), 3, 3, 6, 7, 13, 18, 31, 47, 78
are sequence OEIS no. A020878. the “number of one-factors in Mobiusladder Mn,” essentially the same as our result.
Column 2
2, 3, 8, 11, 30, 41, 112, 153, 418
in Table 3 is OEIS no. A048788, the “numerators of continued fractionconvergents to
√3− 1.”
12 PETER G. ANDERSON
Future work. Rectangles, cylinders, and Mobius strips do not exhaustthe gridded two manifolds. Obvious next problems to tackle are tori andKlein bottles, and, more generally, periodic tilings of the gridded R2.
Acknowledgement. A sincere thank you to the careful, diligent referee.
References
[1] A. T. Benjamin and J. J. Quinn, Proofs That Really Count, The Art of CombinatorialProofs, Mathematical Association of America, Providence, RI, 2003.
[2] The J programming language. http://www.jsoftware.com/[3] Kasteleyn, P. W. The statistics of dimers on a lattice: I. the number of dimer arrange-
ments on a quadratic lattice. Physica, 27(12):1209 1225, 1961.[4] N. J. A. Sloane, The On-Line Encyclopedia of Integer Sequences, Published electroni-
cally at http://www.research.att.com/~njas/sequences/, 2010.[5] Temperley, H. N. V. and Michael E. Fisher, Dimer problem in statistical mechanics -
an exact result. Philosophical Magazine, 6:1061 1063, 1961.
AMS Classification Numbers: 05B45, 11B37, 11B39, 11B75, 52C20printed Saturday 27th November, 2010, 13:57
Department of Computer Science, Rochester Institute of Technology, Rochester,NY 14623
E-mail address: [email protected]