Automatic Counting of Tilings of Skinny Plane Regions Shalosh B. EKHAD and Doron ZEILBERGER^{1}

Very Important This article is accompanied by the Maple packages

• http://www.math.rutgers.edu/~zeilberg/tokhniot/RITSUF ,
• http://www.math.rutgers.edu/~zeilberg/tokhniot/RITSUFwt ,
• http://www.math.rutgers.edu/~zeilberg/tokhniot/ARGF ,

to be described below. In fact, more accurately, this article accompanies these packages, written by DZ and the many output files, discovering and proving deep enumeration theorems, done by SBE, that are linked to from the webpage of this article

http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/ritsuf.html  .

How It All Started: April 5, 2012 During one of the Rutgers University Experimental Mathematics Seminar dinners, the name of Don Knuth came up, and two of the participants, David Nacin, who was on sabbatical from William Patterson University, and first-year graduate student Patrick Devlin, mentioned that they recently solved a problem that Knuth proposed in Mathematics Magazine[Kn]. The problem was: 1868. Proposed by Donald E. Knuth, Stanford University, Stanford, CA. Let n ≥ 2 be an integer. Remove the central (n − 2)^{2} squares from an (n + 2) × (n + 2) array of squares. In how many ways can the remaining squares be covered with 4n dominoes? As remarked in the published solution in Math. Magazine, the problem was already solved in the literature by Roberto Tauraso[T]. The answer turned out to be very elegant: 4(2F_{n}^{2} + (−1)^{n})^{2}. David and Patrick, as well as the solution published in Math. Magazine, used human ingenuity and mathematical deduction. But, as already preached in [Z1] and [Z2], the following is a fully rigorous proof: “By direct counting of tilings, the first 10 terms (starting at n = 2) of the enumerating sequence are

1 Department of Mathematics, Rutgers University (New Brunswick), Hill Center-Busch Campus, 110 Frelinghuysen

Rd., Piscataway, NJ 08854-8019, USA. zeilberg at math dot rutgers dot edu , http://www.math.rutgers.edu/~zeilberg/ . First Written: June 21, 2012. This version: Aug. 10, 2012. The authors wish to thank the anonymous referee and the non-anonymous editor (Mark Wildon) for helpful suggestions and minor corrections. Supported in part by the USA National Science Foundation.

36, 196, 1444, 9604, 66564, 454276, 3118756, 21362884, 146458404, 1003749124 ,

but so are the first 10 terms of the sequence {4(2F_{n}^{2} + (−1)^{n})^{2}}. Since the statement is true for the first 10 terms, it must be true for all n ≥ 2. QED!”

In order to justify this “empirical” proof, all we need to say is that both sides are obviously C-finite sequences whose minimal recurrences have order ≤ 5, hence their difference is a C-finite sequence of order ≤ 10 and hence if it vanishes for the first 10 terms, it always vanishes. See below for a justification.

But first let’s remind ourselves what are C-finite sequences, and recall how to find upper bounds for the orders of the recurrences.

C-finite Sequences

Recall that a C-finite sequence {a(n)}_{n=0}^{∞} is a sequence that satisfies a homogeneous linearrecurrence equation with constant coefficients. It is known (but not as well-known as it should be!) and easy to see (e.g. [Z2],[KP]) that the set of C-finite sequences is an algebra. Even though a C-finite sequence is an “infinite” sequence, it is in fact, like everything else in mathematics (and elsewhere!) a finite object. An order-L C-finite sequence {a(n)}_{n=0}^{∞} is completely specified by the coefficients c_{1}, c_{2}, …, c_{L} of the recurrence

a(n) = c_{1}a(n − 1) + c_{2}a(n − 2) + … + c_{L}a(n − L) ,  (Cfinite)

and the initial conditions

a(0) = d_{1} , …, a(L − 1) = d_{L} .

So a C-finite sequence can be coded in terms of the 2L “bits” of information

[[d_{1}, …, d_{L}], [c_{1}, …, c_{L}]] .

For example, the Fibonacci sequence is written:

[[0, 1], [1, 1]].

Since this ansatz (see [Z1]) is fully decidable, it is possible to decide equality, and evaluate ab initio, wide classes of sums, and things are easier than the holonomic ansatz (see, e.g., [Z2]). The wonderful new book by Manuel Kauers and Peter Paule[KP] also presents a convincing case.

The Art of Guessing

If you know a priori, or suspect, that a given sequence {a(n)}, is C-finite of order ≤ L, all you need is to compute the first 2L terms of a(n), and then plug-in n = L, L + 1, … 2L − 1 into the ansatz (Cfinite), get a system of L linear equations for the L unknowns c_{1}, …, c_{L}, and let the computer solve them. Having found them, you should test the recurrence for quite a few larger n, just to make sure that it is indeed C-finite.

Orders of Recurrences

We need a

Crucial Lemma: If a(n) is C-finite of order L then, for every i ≥ 0, a(n+i) is a linear combination of {a(n), …, a(n + L − 1)}

Proof: For i < L this is utterly trivial. For i = L it follows from Equation (Cfinite), with n → n + L, and for i > L it follows by induction on i, by substituting n → n + i into (Cfinite), and then noting, that by the inductive hypothesis, a(n + j) for j < i are all linear combinations of {a(n), …, a(n + L − 1)}, and a linear combination of linear combinations is a linear combination.

We are now ready to recall the following facts (see [KP]):

Fact 0. If {a(n)} and {b(n)} are C-finite of orders L_{1} and L_{2} respectively, then {a(n) + b(n)} is C-finite of order L_{1} + L_{2} .

Proof: By the Crucial Lemma, for all i ≥ 0, a(n+i) is a linear combination of a(n), …, a(n+L_{1}−1) and b(n + i) is a linear combination of b(n), …, b(n + L_{2} − 1), hence putting c(n) := a(n) + b(n), c(n+i) is a linear combination of a(n), …, a(n+L_{1}−1), b(n), …, b(n+L_{2}−1), hence the L_{1}+L_{2}+1 sequences c(n), …, c(n + L_{1} + L_{2}) are linearly dependent, hence the sequence c(n) is C-finite of order L_{1} + L_{2}.

Fact 1. If two sequences satisfy the same homogeneous linear recurrence with constant coefficients (but with different initial conditions) so does their sum.

Fact 2. If two sequences a(n) and b(n) satisfy the same homogeneous linear recurrence with constant coefficients of order L, then their product a(n)b(n) satisfies another such recurrence of order \binom{L+1}{2} .

Proof: By the Crucial Lemma, for all i ≥ 0, a(n + i) ia a linear combinations of {a(n), …, a(n + L − 1)}. Now note that b(n) is a linear combination of a(n), …, a(n + L − 1), (since the latter form a basis for the L-dimensional vector space of all solutions of the recurrence). It follows that also b(n + i), for i ≥ 0, being a linear combinations of {b(n), …, b(n + L − 1)} (by the Crucial Lemma) is a linear combination of {a(n), …, a(n + L − 1)}.

So a(n + i)b(n + i) (for any i ≥ 0) is a certain linear combination of

{a(n + α)a(n + β) ; 0 ≤ α ≤ β ≤ L − 1} .

There are M := \binom{L+1}{2} such sequences, so the M + 1 sequences

{a(n)b(n), a(n + 1)b(n + 1) …, a(n + M)b(n + M)}

must be linearly dependent, giving an order-\binom{L+1}{2} recurrence.

More generally, with an analogous proof:

Fact 3. If r sequences a_{1}(n), a_{2}(n), … a_{r}(n) satisfy the same homogeneous linear recurrence with constant coefficients of order L, then their product a_{1}(n)a_{2}(n) ⋯ a_{r}(n) satisfies another such recurrence of order \binom{L+r−1}{r}. In particular, if a(n) is a C-finite sequence of order L, then a(n)^{r} is a C-finite sequence of order \binom{L+r−1}{r}.

Fact 4. If two sequences a(n) and b(n) satisfy different homogeneous linear recurrences with constant coefficients of orders L_{1} and L_{2}, respectively, then their product satisfies such a recurrence of order L_{1}L_{2} .

Proof: By the Crucial Lemma, a(n+i) (i ≥ 0) is a linear combination of {a(n), …, a(n+L_{1} −1)}. Likewise, b(n + i) (i ≥ 0) is a linear combination of {b(n), …, b(n + L_{2} − 1)}, So a(n + i)b(n + i) (i ≥ 0) is a linear combination of the L_{1}L_{2} sequences

{ a(n + α)b(n + β) ; 0 ≤ α < L_{1} , 0 ≤ β < L_{2} },

hence, putting M = L_{1}L_{2}, we see that the M + 1 sequences {a(n)b(n), …, a(n + M)b(n + M)} must be linearly dependent.

Rational Generating Functions

Equivalently, a C-finite sequence is a sequence {a(n)} whose ordinary generating function, ∑_{n=0}^{∞} a(n)z^{n}, is rational and where the degree of the denominator is more than the degree of the numerator. These come up a lot in combinatorics and elsewhere (e.g. formal languages). See the old testament[St], chapter 4, and the new testament[KP], chapter 4.

Why is the Number of tilings of the Knuth Square-Ring C-finite?

Each of the four “corners” (2 × 2 squares) is tiled in a certain way, where either the tiles covering it only cover it, or some tiles also cover neighboring cells not in the corner-square. There are finitely many such scenarios for each corner-square, hence for the Cartesian product of these scenarios. Having decided how to cover these four corner squares, one must decide how to tile the remaining four sides, each of which is either a 2 by n rectangle, or one with a few bites taken from one or both ends. By the transfer matrix method ([St], 4.7), it follows a priori that each of these enumerating sequences is C-finite. In fact each individual side, for each scenario, satisfies a certain recurrence (that is easily seen to be second-order), hence each product-of-four scenarios satisfies a certain order-5 (Fact 3 with r = 4 and L = 2) recurrence, and hence their sum (Fact 1). By the same reasoning {4(2F_{n}^{2} + (−1)^{n})^{2}} also satisfies an order-5 recurrence, so their difference satisfies an order 10 recurrence, by Fact 0.

But we still need to be able to compute the first 10 terms. If we had a very large and very fast computer, we could have actually constructed all the tilings, and then counted them, but 1003749124 is a pretty big number, so we need a more efficient way.

A More Efficient Way Suppose that you are given a set of unit-squares (let’s call them cells) and you want your computer to find the number of ways of tiling it with dominoes. You pick any cell (for the sake of convenience the left-most bottom-most cell), and look at all the ways in which to cover it with a domino piece. For each of these ways, removing that tile leaves a smaller region, thereby getting an obvious dynamical programming recurrence.

Procedure NT(R) in the Maple package RITSUF computes the number of domino tilings of any set of cells.

Using this method, the first-named author solved Knuth’s problem in 15 seconds, by typing (in a Maple session, in a directory where RITSUF has been downloaded to)

read RITSUF: SeqFrameCsqDirect(2,2,2,2,20,t); .

We will soon try to solve analogous problems for fatter frames, but then we would need to be even more efficient, and using this more efficient method, the same calculation would take less than half a second, typing:

read RITSUF: SeqFrameCsq(2,2,2,2,20,t); .

An even More Efficient Way Our general problem is to find an efficient automatic way to compute the C-finite description, and/or its generating function (that must always be a rational function), for the sequence enumerating domino tilings of the region, that we denote, in RITSUF, by

Frame(a1,a2,b1,b2,n,n),

that consists of an (a1 + n + a2) × (b1 + n + b2) rectangle with the “central” n × n square removed. Before describing the algorithm, let us mention that this is accomplished by procedure

SeqFrameC(a1,a2,b1,b2,N,t) .
For example, SeqFrameC(1,3,3,1,30,t); yields:

−4 \frac{−9 + 8 t + 29 t^{2} − 10 t^{3} − 7 t^{4} + 2 t^{5}}{(t^{2} − 4 t + 1) (t^{4} − 4 t^{2} + 1)} .

The fifth argument, N is a parameter for “guessing” the C-finite description, indicating how many data points to gather before one tries to guess the C-finite description. It is easy to find a priori upper bounds, but it is more fun to let the user take a guess, and increasing it, if necessary. Mihai Ciucu’s Amazing Theorem The sequence of positive integers, demanded by Knuth, enumerating the domino tilings of F rame(2, 2, 2, 2, n, n), turned out to be all perfect squares. This is not a coincidence! A beautiful theorem of Mihai Ciucu[C] tells us that whenever there is a reflective symmetry, the number of domino tilings is either a perfect square or twice a perfect square. Since we know that (and even if we didn’t, we could have discovered it empirically for each case that we are computing), we have to gather far less data points. For example, according to the first-named author of this article, the number of domino tilings of F rame(3, 3, 3, 3, n, n) is 2B(n)^{2}, where

∑_{n=0}^{∞} B(n)t^{n} = −2 \frac{−29 + 19 t + 102 t^{2} − 32 t^{3} − 25 t^{4} + 7 t^{5}}{(t^{2} − 4 t + 1) (t^{4} − 4 t^{2} + 1)} ,

while the number of domino tilings of F rame(4, 4, 4, 4, n, n) is C(n)^{2} where

∑_{n=0}^{∞} C(n)t^{n} = \frac{P (t)}{Q(t)} ,

where

P (t) = −4(901 + 2517 t − 17574 t^{2} − 46322 t^{3} + 112903 t^{4} + 291045 t^{5} − 269376 t^{6}
−741508 t^{7} + 215233 t^{8} + 786069 t^{9}−
21836 t^{10} − 352896 t^{11} − 24137 t^{12} + 67487 t^{13} + 5874 t^{14}
−5056 t^{15} − 359 t^{16} + 97 t^{17}) , and
Q(t) = (t − 1) (t + 1) (t^{4} + t^{3} − 5 t^{2} + t + 1) (t^{4} − 11 t^{3} + 25 t^{2} − 11 t + 1) ·
(t^{4} + 7 t^{3} + 13 t^{2} + 7 t + 1) (t^{4} − t^{3} − 5 t^{2} − t + 1) .

If you want to see the analogous expressions for F rame(5, 5, 5, 5, n, n) and F rame(6, 6, 6, 6, n, n), then you are welcome to look at the output file

http://www.math.rutgers.edu/~zeilberg/tokhniot/oRITSUF2,

that you can generate yourself, ab initio by running (once you uploaded RITSUF onto a Maple session)

http://www.math.rutgers.edu/~zeilberg/tokhniot/inRITSUF2 .

Our method is pure guessing, but in order to guess, we need to efficiently generate sufficiently many terms of the counting sequence. We must start with rectangles of fixed width.

The Number of Domino Tilings of a Rectangle of a Fixed Width

Let m be a fixed positive integer. We are interested in a C-finite description, as a function of n, of the sequence A_{m}(n), the number of domino tilings of an m × n rectangle. In fact, for this specific problem there is an “explicit” solution, famously found by Kasteleyn[Ka] and Fisher & Temperly [FT], but their solution only applies to domino tiling, and we want to illustrate the general method.

Also the general approach, using the transfer-matrix method, is not new as such (see, e.g. [St]), but since we need it for counting more elaborate things, let’s review it.

Consider the task of tiling the n columns of an m × n rectangle. Let’s label the cells of a given column from bottom to top by {1, …, m}. When we start, all the m cells of the leftmost column are available, so we start with the state {1, …, m}. As we keep on going, not all cells of the current column are available, since some of them have already been tiled by the previous column. The other extreme is the empty set, where nothing is available, and one must go immediately to the next column, where now everything is available, i.e. the only follower of ∅ is the universal set {1, …, m}.

Let’s take m = 4 and see what states may follow the state {1, 2, 3, 4}. We may have two vertical tiles {1, 2} and {3, 4}, leaving all the cells of the next column available, yielding the state {1, 2, 3, 4}. We may decide instead to only use horizontal tiles, leaving nothing available for the next column, resulting in the state ∅. If we decide to have one vertical tile in the current column, then

If it is {1, 2} then both 3 and 4 are parts of horizontal tiles that go to the next column, leaving the set of cells {1, 2} available.

If it is {2, 3} then both 1 and 4 are parts of horizontal tiles that go to the next column, leaving the set of cells {2, 3} available.

If it is {3, 4} then both 1 and 2 are parts of horizontal tiles that go to the next column, leaving the set of cells {3, 4} available.

It follows that the “followers” of the state {1, 2, 3, 4} are the five states

∅, {1, 2, 3, 4}, {1, 2}, {2, 3}, {3, 4} .

Who can follow the state {1, 4}? Since only cell 1 and cell 4 are available there can’t be any vertical tiles, and both must be parts of horizontal tiles, occupying {1, 4} of the next column, and leaving {2, 3} available, so the state {1, 4} has only one follower, the state {2, 3}.

Check out procedure Followers(S,m) in RITSUF .

This way we can view any tiling of an m × n rectangle as a walk of length n in a directed graph whose vertices are labeled by subsets of {1, …, m}. The transfer matrix of this graph is the 2^{m}×2^{m} matrix whose rows and columns naturally correspond to subsets (in RITSUF we made the natural convention that the indices of the rows and columns correspond to the binary representations of the subsets plus 1). Let’s call SN(i) the set of positive integers corresponding to the positive integer i. For example, SN(1) is the empty set, SN(10) is {1, 4} etc.

Check out procedure TM(m) in RITSUF for the transfer matrix.

Calling this transfer matrix A_{m}, the number of domino tilings of an m×n rectangle is the (2^{m}, 2^{m}) entry of the matrix A_{m}^{n}, since we have to completely tile it, the starting state must be {1, …, m}, of course, but so is the ending state, since every thing must be covered, leaving the next column completely available.

Check out procedure SeqRect(m,N) in RITSUF for the counting sequence for the number of domino tilings of an m by n rectangle for n = 0, 1, …, N .

But not just the (2^{m}, 2^{m}) entry of A_{m}^{n} is informative. Each and every one of the (2^{m})^{2} entries contains information! A typical (i, j) entry of A_{m}^{n} tells you the number of ways of tiling an m × n rectangle where the leftmost column only has the cells in SN(i) available for use, while the rightmost column has some tiles that stick out, leaving available for the (n + 1)-th column the cells of SN(j).

Counting the Number of Domino Tilings of a Holey Rectangle

We want to figure out how to use matrix-multiplication to determine the number of tilings of the region

F rame(a_{1}, a_{2}, b_{1}, b_{2}, m, n)

that consists of an (a_{1} + m + a_{2}) × (b_{1} + n + b_{2}) rectangle with the central m × n rectangle removed.

There are four corner rectangles in our frame:

• the left-bottom (SW) corner consisting of an a_{1} × b_{1} rectangle ,

• the right-bottom (SE) corner consisting of an a_{1} × b_{2} rectangle ,

• the left-top (NW) corner consisting of an a_{2} × b_{1} rectangle ,

• the right-top (NE) corner consisting of an a_{2} × b_{2} rectangle .

If we look at a typical tiling of the region F rame(a_{1}, a_{2}, b_{1}, b_{2}, m, n), and focus on the induced tilings of the four corner-rectangles, we get a tiling with (usually) some of the tiles intersecting the adjacent non-corner rectangles.

Indeed, for the left-bottom a_{1} × b_{1} corner-rectangle (usually) some of the tiles covering its very top row intersect the very bottom row of the left (West) m×b_{1} rectangle, and (usually) some of the tiles covering its very right column intersect the leftmost column of the bottom (South) a_{1} ×n rectangle, and similarly for the other three corner rectangles. So suppose that the West m × b_{1} rectangle has already been tiled, with some of its bottom tiles overlapping with our above-mentioned left-bottom a_{1} × b_{1} corner-rectangle, leaving only some of the cells in the top row available, and after we complete the tiling of that left-bottom a_{1} × b_{1} corner-rectangle, we may use-up some of the cells of the left column of the bottom (South) a_{1} × n rectangle, and the complement of that occupied set is only available for tiling.

This leads naturally to a transfer matrix between the “states” of one side of a corner-rectangle to the states of another side of that corner-rectangle. So let’s define R(a, b, S_{1}, S_{2}), for positive integers a and b, and distinct S_{1}, S_{2} ∈ {1, 2, 3, 4} where we make the convention 1=Up Side , 2=Left Side , 3=Down Side , 4=Right Side ,

that tells you the number of ways of tiling the a × b rectangle where the two sides that are not in {S_{1}, S_{2}} are “smooth” (i.e. nothing sticks out) and the two sides S_{1}, S_{2} may (and usually do) have some of their tiles “sticking out”.

Going counterclockwise starting at the left-bottom (SW) corner, we need to find

• For the left-bottom (SW) corner consisting of an a_{1} × b_{1} rectangle we need R(a_{1}, b_{1}, 1, 4) ,

• For the right-bottom (SE) corner consisting of an a_{1} × b_{2} rectangle we need R(a_{1}, b_{2}, 2, 1) ,

• For the right-top (NE) corner consisting of an a_{2} × b_{2} rectangle we need R(a_{2}, b_{2}, 3, 2) ,

• For the left-top (NW) corner consisting of an a_{2} × b_{1} rectangle we need R(a_{2}, b_{1}, 4, 3) .

Like the matrices A_{m} that for each needed m, we only compute once and then record it, (using option remember), we also only compute R(a, b, S_{1}, S_{2}) once for each needed a, b, S_{1}, S_{2} and remember it.

But how to compute R(a, b, S_{1}, S_{2})? We first construct, literally, all the domino tilings that completely cover the cells of the a × b rectangle where nothing sticks out of the sides that are not labelled S_{1} or S_{2}, but that may (and usually do) stick out from the sides labelled S_{1} and S_{2}. Then we look at all the pairs of states, and form a matrix whose (i, j) entry is the number of stuck-out tilings of the a × b rectangle where the “stick-out” state of side S_{1} corresponds to the set labelled i, and the “stick-out” state of side S_{2} corresponds to the set labelled j.

See procedure RTM(a,b,S1,S2) for its implementation in RITSUF.

It follows that, in terms of the matrices A_{m} and R(a, b, S_{1}, S_{2}), the quantity of interest, the number of tilings of the rectangular picture-frame F rame(a_{1}, a_{2}, b_{1}, b_{2}, m, n), is

T race[R(a_{1}, b_{1}, 1, 4)A_{a_{1}}^{n}R(a_{1}, b_{2}, 2, 1)A_{b_{2}}^{m}R(a_{2}, b_{2}, 3, 2)A_{a_{2}}^{n}R(a_{2}, b_{1}, 4, 3)A_{b_{1}}^{m}] .

Since matrix power-raising is very fast, and so is matrix-multiplication, we can quickly crank-out sufficiently many terms in the enumerating sequence, and since we know a priori that it is C-finite (by the Cayley-Hamilton theorem each entry of A^{n} is C-finite (for any matrix A), and the rest follows from Facts 0-4 above), we can guess a C-finite description (and/or a rational generating function), that is proved rigorously a posteriori by checking that the order bounds are right.

The Bivariate Generating Function

If you are interested in the discrete function of the two discrete variables m and n, for the number of domino tilings of F rame(a_{1}, a_{2}, b_{1}, b_{2}, m, n), then it is doubly C-finite, meaning that its bivariate generating function has the form P (x, y)/(Q_{1}(x)Q_{2}(y)), for some polynomials P (x, y), Q_{1}(x), Q_{2}(y).

Using an analogous method for guessing, after cranking-out enough data, we can get these generating functions easily, using procedure

GFframeDouble(a1,a2,b1,b2,x,y,N)

in RITSUF. For example, if D(m, n) is the number of domino tilings of F rame(2, 2, 2, 2, m, n), then

∑_{m=0}^{∞} ∑_{n=0}^{∞} D(m, n)x^{m}y^{n} = \frac{P (x, y)}{Q(x, y)} ,

where

P (x, y) = 4 x^{3}y^{3} − 7 x^{3}y^{2} − 7 x^{2}y^{3} − 14 x^{3}y + 10 x^{2}y^{2} − 14 xy^{3} + 13 x^{3}
+35 x^{2}y + 35 xy^{2} + 13 y^{3} − 30 x^{2} + 10 xy − 30 y^{2} − 23 x − 23 y + 36 ,

and

Q(x, y) = (x − 1) (x + 1) (x^{2} − 3 x + 1) (y − 1) (y + 1) (y^{2} − 3 y + 1) .

Tiling Crosses

In how many ways can we tile a cross whose center is a 2 × 2 square and each of the four arms has length n? The answer is obtained by typing, in RITSUF, “ SeqCrossCsq(2,2,20,t);”, getting (in 0.072 seconds!) that the number is 2B_{2}(n)^{2}, where

∑_{n=0}^{∞} B_{2}(n)t^{n} = \frac{1}{(t + 1) (t^{2} − 3 t + 1)} .

Incidentally, {B_{2}(n)} is http://oeis.org/A001654, the “Golden rectangle number” F_{n}F_{n+1}, so the number of tilings of this cross is 2F_{n}^{2}F_{n+1}^{2}, and it is a fairly simple exercise for humans to prove this fact. But we doubt that any human can derive, by hand, the answer to the analogous question for the cross whose center is a 4 × 4 square. The answer turns out to be B_{4}(n)^{2}, where

∑_{n=0}^{∞} B_{4}(n)t^{n} = −2 \frac{3 − t − 5 t^{2} + 13 t^{3} − 11 t^{4} − 2 t^{5} + 2 t^{6}}{(t − 1) (t^{4} − 11 t^{3} + 25 t^{2} − 11 t + 1) (t^{4} + 7 t^{3} + 13 t^{2} + 7 t + 1)} .

Even SBE needed 4.528 seconds to derive this formula after DZ typed:

SeqCrossCsq(4,4,30,t); .

Once again, the approach is purely empirical. The computer finds all the tilings that completely cover the central square (or rectangle), possibly (and usually) with some tiles extending beyond. For each such scenario we have the state for each of the four arms of the cross. Then we use the previously computed (and remembered!) matrices A_{m}, find the corresponding entry in (A_{m})^{n}, and multiply all these four numbers. Finally we (meaning our computers) add up all these scenarios, getting the desired number. See the source code of SeqCross(a, b, N).

Monomer-Dimer Tilings

The beauty of programming is that, once we have finished writing a program, it is easy to modify it in order to solve more general, or analogous, problems. By typing ezraMD(); in RITSUF the readers can find the list of analogous procedures for monomer-dimer tilings, where one can use either a 1 × 2 a 2 × 1 or 1 × 1 tile, or equivalently, tiling with dominoes where one is not required to cover all the cells.

For example, if A(n) is the number of ways of tiling the Knuth region (obtained by removing the central n^{2} squares from an (n + 4) × (n + 4) array of squares) by dimers and monomers, the answer is much messier. It took SBE 15 seconds to discover that

∑_{n=0}^{∞} A(n)t^{n} = \frac{P (t)}{Q(t)} ,

where

P (t) = −94 t^{30} + 1361 t^{29} + 43975 t^{28} − 494267 t^{27} − 5787443 t^{26}
+61186056 t^{25} + 266911158 t^{24}
−3200500450 t^{23} − 3505671568 t^{22} + 74767156291 t^{21} − 29007687275 t^{20}
−796609853769 t^{19} + 823823428983 t^{18}
+3924729557742 t^{17} − 4977782472712 t^{16} − 9040256915004 t^{15}
+11643454084810 t^{14} + 9751493606823 t^{13}
−11693567793807 t^{12} − 4837640809485 t^{11} + 5123918478955 t^{10} + 1059903067708 t^{9}
−944330286322 t^{8} − 87120095554 t^{7}
+67451928324 t^{6} + 657867045 t^{5} − 1679236205 t^{4}
+73176689 t^{3} + 6962033 t^{2} − 226706 t − 10012 ,

and

Q(t) = (t − 1) (t^{3} − 7 t^{2} + 11 t − 1) (t^{3} + 7 t^{2} − 33 t − 1) (t^{3} − 11 t^{2} + 7 t − 1) ·
(t^{3} + t^{2} − 3 t − 1) (t^{3} − 27 t^{2} + 107 t − 1) (t^{3} + 3 t^{2} − t − 1) ·
(t^{6} + 20 t^{5} + 55 t^{4} − 304 t^{3} − 337 t^{2} + 8 t + 1) (t^{6} − 37 t^{4} − 76 t^{3} − 37 t^{2} + 1) .

Weighted Counting

What if instead of straight counting one wants to do weighted counting?. The weight of a domino tiling is defined to be h^{#HorizontalT iles}v^{#V erticalT iles} (in the case of domino tilings) and h^{#HorizontalT iles}v^{#V erticalT iles}m^{#MonomerT iles} (in the case of monomer-dimer tiling).

For this we have the Maple package RITSUFwt, freely downloadable from

http://www.math.rutgers.edu/~zeilberg/tokhniot/RITSUFwt, that also contains all the procedures of RIT-

SUF. To get a list of the procedures for weighted counting, type:

ezraWt();

For example, to get the weighted analog of the Knuth problem, type:

SeqFrameCwt(2,2,2,2,30,t,h,v);

To see the output, go to:

http://www.math.rutgers.edu/~zeilberg/tokhniot/oRITSUFwt1 ,

where one can also see statistical analysis. The Maple package ARGF The Maple package ARGF (short for “Analysis of Rational Generating Functions”) downloadable from:

http://www.math.rutgers.edu/~zeilberg/tokhniot/ARGF ,

does automatic statistical analysis of random variables whose weight-enumerators are given by rational functions, like the one outputted by RITSUFwt, and whose procedures are also included in the latter. We urge the readers to look at

http://www.math.rutgers.edu/~zeilberg/tokhniot/oRITSUFwt4 ,

and the other output files in the webpage of this article

http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/ritsuf.html ,

for examples. Here we use the methodology of [Z3][Z4]. Conclusion Sometimes the naive, empirical, inductive approach, of “guessing”, is superior to the traditional deductive method, that ruled mathematics for the last 2500 years.

References

[C] Mihai Ciucu, Enumeration of perfect matchings in graphs with reflective symmetry, J. Combin. Theory Ser. A 77(1997), 67-97.

[FT] M. Fisher and H. Temperley, Dimer Problems in Statistical Mechanics-an exact result, Philos. Mag. 6 (1961), 1061-1063.

[Ka] P. W. Kasteleyn, The statistics of dimers on a lattice: I. The number of dimer arrangements in a quadratic lattice, Physica 27 (1961), 1209-1225.

[KP] Manuel Kauers and Peter Paule, “The Concrete Tetrahedron”, Springer, 2011.

[Kn] Donald E. Knuth, Tiling a square ring with dominoes, proposed problem #1868, Math. Magazine 84 No. 2 (April 2011) Solution by John Bonomo and David Offner, Math. Magazine 85 No. 2 (April 2012), 154-155.

[St] Richard Stanley, “Enumerative combinatorics”, volume 1, Wadsworth and Brooks/Cole, Pacific Grove, CA, 1986, second printing, Cambridge University Press, Cambridge, 1996.

[T] Roberto Tauraso, A New Domino Tiling Sequence, Journal of Integer Sequences, 7 (2004), Article 04.2.3 .Available on-line:

http://www.cs.uwaterloo.ca/journals/JIS/VOL7/Tauraso/tauraso3.pdf .

[Z1] Doron Zeilberger, The C-finite Ansatz, a “sanitized” version is to appear in the Ramanujan Journal, the original, uncensored version is available on-line:

http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/cfinite.html

[Z2] Doron Zeilberger, An Enquiry Concerning Human (and Computer!) [Mathematical] Understanding, Appeared in: C.S. Calude, ed., “Randomness & Complexity, from Leibniz to Chaitin” World Scientific, Singapore, 2007. Available on-line:

http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/enquiry.html

[Z3] Doron Zeilberger, The Automatic Central Limit Theorems Generator (and Much More!), in: “Advances in Combinatorial Mathematics”, Proceedings of the Waterloo Workshop in Computer Algebra 2008 in honor of Georgy P. Egorychev, chapter 8, pp. 165-174, (I.Kotsireas, E.Zima, eds.), Springer Verlag, 2009. Available on-line:

http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/georgy.html

[Z4] Doron Zeilberger, HISTABRUT: A Maple Package for Symbol-Crunching in Probability theory, Personal Journal of Shalosh B. Ekhad and Doron Zeilberger, Aug. 25, 2010,

http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/histabrut.html