Domino Arithmetic

Randall Pruim

Calvin University

What is a Domino?

What is a Domino?

What is a Domino?

For our purposes, a domino is a 2 x 1 rectangle:

  • Numbers on the dominos don’t matter
  • Arithmetic will be about something else (stay tuned)

Problem of the day

Q. How many ways can we tile a 3 \(\times\) n rectangle
with 2 \(\times\) 1 dominoes?

Rules

  • no overlap
  • no gaps

Notation

  • u(n) = number of ways to tile a 3 \(\times\) n rectangle
  • U(n) = listing of all tilings of a 3 \(\times\) n rectangle
  • u(n) = |U(n)|

Example: What is u(2)? What is U(2)?

u(2) = 3

Here’s U(2):

u(2) = 3

Here’s U(2):



How do we know there aren’t any more?

  • “I couldn’t find any more” is not an acceptable answer.

Your Turn

How much of this table can you fill out?

n u(n) U(n)
1 ? ?
2 ? ?
3 ? ?
4 ? ?
5 ? ?
n u(n) U(n)
6 ? ?
7 ? ?
8 ? ?
9 ? ?
10 ? ?

Which values of u(n) are easy?

Which values of u(n) are easy?

If n is odd, then u(n) = 0.

  • Area of 3 \(\times\) n rectangle is 3n, which is odd when n is odd.
  • Area covered by dominos is 2d (d = number of dominos), which is even.
  • So it isn’t possible to tile a 3 \(\times\) n rectangle with dominos when n is odd.

What is u(4)?

What is u(4)?

u(4) = 11



u(6) = ??



u(8) = ??

Filling out the table

u(0) u(1) u(2) u(3) u(4) u(5) u(6) u(7) u(8)
1 0 3 0 11 0 ? 0 ?



These get hard fast… We need some help.

Help!

We need some help

To solve this problem, we need

  • an easier problem to practice on
  • a more systematic approach

Let’s try tiling 2 \(\times\) n rectangles

Notation

  • t(n) = number of ways to tile a 2 \(\times\) n rectangle
  • T(n) = listing of all tilings of a 2 \(\times\) n rectangle
  • t(n) = |T(n)|

Example: What is t(2)? What is T(2)?

t(2) = 2

Here’s T(2):

Your Turn

How much of this table can you fill in?

n t(n) T(n)
1 ? ?
2 ? ?
3 ? ?
4 ? ?
5 ? ?
n t(n) T(n)
6 ? ?
7 ? ?
8 ? ?
9 ? ?
10 ? ?

T

A table for t

n t(n)
1 1
2 2
3 3
4 5
5 8
n t(n)
6 13
7 21
8 34
9 55
10 89

What is Domino Arithmetic?

What is Arithmetic?

Wikipedia says:

Arithmetic is a branch of mathematics that consists of the study of numbers, especially the properties of the traditional operations on them – addition, subtraction, multiplication and division.

The primary operations are addition and multiplication.

What is Domino Arithmetic?

Domino arithmetic is a branch of mathematics that consists of the study of numbers domino tilings, especially the properties of the traditional operations on them – addition, subtraction, multiplication and division.

We need some operations on tilings

If A and B are tilings, what are

  • A + B?
  • A \(\cdot\) B = A * B = AB?

(Note: there is a little white lie on this slide that we will fix in a moment.)

Domino Algebra

We would like domino algebra to be

  • useful
  • somewhat familiar

Can you come up with definitions of addition and multiplication so that

(A+B) (C+D) = AC + AD + BC + BD

Examples:

( + ) ( + ) = ??

( + ) ( + ) = ??

Domino Algebra

Can you come up with definitions of addition and multiplication so that

(A+B) (C+D) = AC + AD + BC + BD

Examples:

( + ) ( + ) = + + +
( + ) ( + ) = + + +
= + 2 +

Note:

  • multiplication does not commute!
  • addition does commute if we are not interested in the order of our list.

Equations for T(n)

T(n) = T(n-1) + T(n-2)

So t(n) = t(n-1) + t(n-2) [Fibonacci]

T Time

Let T be the list of all tilings of rectangles with 2 rows (and any number of columns).

T = T(0) + T(1) + T(2) + \(\cdots\)


Wait, what is T(0)? Tilings of a 2 \(\times\) 0 rectangle?

  • How many are there? (What is t(0)?)
  • How should we denote this?

The Fundamental Equation for T

T = 1 + T + T

Can you Solve for T?

Fundamental Equation

T = 1 + T + T

Solving for T

1 = T - T - T

1 = (1 - - ) T

T = 1 / (1 - - )

Technically, we need a left multiplicative inverse, but let’s stick with this notation.

Do you Recognize This?

T =
1
1 - -
=
1
1 - ( + )

Geometric Series!

T =
1
1 - ( + )
= 1 + ( + ) + ( + )2 + ( + )3 + \(\cdots\)

    = 1 + + + + + + + + + \(\cdots\)

Using letters

If we let x = and y2 = (and let \(x\) and \(y\) commute), then

\[ \begin{align} T &= \frac{1}{1 - (x + y^2)} = \sum_{k=0}^\infty (x + y^2)^k \\ & = \sum_{k,j \ge 0} \binom{k}{j} x^j y^{2(k-j)} \\ & = \sum_{m,j \ge 0} \binom{m+j}{j} x^j y^{2m} \tag{$m = k-j$} \end{align} \]

So the number of tilings with \(j\) and \(m\) is \(\binom{m+j}{j}\).

This gives us another way to compute t(n)

Example:

\[ \small \begin{align*} t(8) &= \binom{0+4}{0} + \binom{2 + 3}{2} + \binom{4 + 2}{4} + \binom{6 + 1}{6} + \binom{8 + 0}{8} \\ &= 1 + 10 + 15 + 7 + 1 \\ &= 34 \end{align*} \]

One more slight of hand

Now let \(x = y = z\) (a domino is a domino is a domino – ignore orientation).

\[ \begin{align} T &= 1 + zT + z^2 T \end{align} \]

So

\[ \begin{align} T &= \frac{1}{1 - z - z^2}\\ \end{align} \]

Geometric Series to the Rescue

We would like to write

\[ \begin{align} T &= \frac{1}{1 - z - z^2} = \sum_{n=0}^\infty t_n z^n \\ \end{align} \]

as

\[ \begin{align} T &= \frac{1}{1 - z - z^2} = \frac{A}{1 - \alpha z} + \frac{B}{1-\beta z}\\[5mm] & = A[1 + \alpha z + \alpha^2 z^2 + \cdots] + B[1 + \beta z + \beta^2 z^2 + \cdots]\\\\ \end{align} \]

So \(t_n = A \alpha^n + B \beta^n\).    We just need to determine \(\alpha\), \(\beta\), \(A\), and \(B\).

Finding \(\alpha\), \(\beta\), \(A\), and \(B\)

\[ \begin{align} T &= \frac{1}{1 - z - z^2} = \frac{A}{1 - \alpha z} + \frac{B}{1-\beta z} = \frac{A(1-\beta z) + B(1-\alpha z)}{(1-\alpha z)(1 - \beta z)} \\[5mm] \end{align} \]

Finding \(\alpha\), \(\beta\), \(A\), and \(B\)

\[ \begin{align} T &= \frac{1}{1 - z - z^2} = \frac{A}{1 - \alpha z} + \frac{B}{1-\beta z} = \frac{A(1-\beta z) + B(1-\alpha z)}{(1-\alpha z)(1 - \beta z)} \\[5mm] \end{align} \]

Denominator:

\[ \begin{align} 1 - z - z^2 & = 1 - (\alpha + \beta)z + \alpha\beta z^2 \\ 1 &= \alpha + \beta\\ -1 & = \alpha \beta \end{align} \]

Finding \(\alpha\), \(\beta\), \(A\), and \(B\)

\[ \begin{align} T &= \frac{1}{1 - z - z^2} = \frac{A}{1 - \alpha z} + \frac{B}{1-\beta z} = \frac{A(1-\beta z) + B(1-\alpha z)}{(1-\alpha z)(1 - \beta z)} \\[5mm] \end{align} \]

Denominator:

\[ \begin{align} 1 - z - z^2 & = 1 - (\alpha + \beta)z + \alpha\beta z^2 \\ 1 &= \alpha + \beta\\ -1 & = \alpha \beta \end{align} \]

Numerator:

\[ \begin{align} 1 &= A (1 -\beta z) + B (1-\alpha z) = (A + B) - (A \beta + B \alpha) z \\ 1 &= A+B \\ 0 &= A\beta + B \alpha \end{align} \]

Four equations, four unknowns

\[ \begin{align} \alpha + \beta & = 1 & \alpha \beta &= -1 \\ A + B &= 1 & A\beta + B \alpha &= 0 \end{align} \]

Finding \(\alpha\), \(\beta\)

\[ \begin{align} \alpha + \beta & = 1 & \alpha \beta &= -1 \\ \end{align} \]

From this we get

\[ \begin{align} -1 &= \alpha \beta = \alpha (1-\alpha) = \alpha - \alpha^2 & 0 & = \alpha^2 - \alpha - 1\\ \alpha &= \frac{1 + \sqrt{5}}{2} \approx 1.618 & \beta &= \frac{1 - \sqrt{5}}{2} \approx -0.618\\ \end{align} \]

Recall that \(t_n = A\alpha^n + B \beta^n\).

Since \(|\beta| < 1\), \(|\beta|^n \searrow 0\) as \(n \to \infty\), so we can basically ignore that part:

\[ \fbox{$t_n \approx A \alpha^n$} \]

Finding \(A\) (and \(B\))

\[ \begin{align} \alpha + \beta & = 1 & \alpha \beta &= -1 \\ A + B &= 1 & A\beta + B \alpha &= 0 \\[12mm] \end{align} \]

 

\[ \begin{align} 0 &= A \beta + (1-A) \alpha \\ 0 &= A \beta + \alpha - A \alpha \\ 0 &= A (\beta -\alpha) + \alpha \\[5mm] A &= \frac{\alpha}{\alpha - \beta} = \frac{\alpha}{\sqrt{5}}\\ B &= 1 - A = \frac{\alpha - \beta}{\alpha - \beta} - \frac{\alpha}{\alpha - \beta} = \frac{-\beta}{\sqrt{5}} \end{align} \]

Putting it all together

\[ \begin{align} t_n &= A \alpha^n + B \beta^n = \frac{\alpha^{n+1}}{\sqrt{5}} - \frac{\beta^{n+1}}{\sqrt{5}} \\[5mm] t_n &\approx A \alpha^n = \frac{\alpha^{n+1}}{\sqrt{5}} \\[12mm] \end{align} \]

where

\[ \begin{align*} \alpha &= \frac{1 + \sqrt{5}}{2} \approx 1.618 & \beta &= \frac{1 - \sqrt{5}}{2} \approx -0.618\\ \end{align*} \]

Computation

t <- function(n) {
  alpha <- (1 + sqrt(5))/2
  beta  <- (1 - sqrt(5))/2
  A <-   alpha / sqrt(5)
  B <- - beta  / sqrt(5)
  A * alpha^n + B * beta^n
}  

t(0:20)
 [1]     1     1     2     3     5     8    13    21    34    55    89   144
[13]   233   377   610   987  1597  2584  4181  6765 10946

Table of Values

n t A part B part
0 1 0.7236068 0.276393202
1 1 1.1708204 -0.170820393
2 2 1.8944272 0.105572809
3 3 3.0652476 -0.065247584
4 5 4.9596748 0.040325225
5 8 8.0249224 -0.024922359
6 13 12.9845971 0.015402865
7 21 21.0095195 -0.009519494
8 34 33.9941166 0.005883371
9 55 55.0036361 -0.003636123
10 89 88.9977528 0.002247248

Back to Tiling 3 x n

Fundamental Equation for U


U = ??

Fundamental Equation for U


U = 1 + U + V + Λ

Fundamental Equations for U


U = 1 + U + V + Λ


V = + U + V


Λ = + U + Λ

Algebra

We start with 3 equations and 3 unknowns, \(U\), \(V\), and \(\Lambda\).

\[ \begin{align} U &= 1 + z^3 U + z^2 V + z^2 \Lambda \\ V &= z U + z^3 V \\ \Lambda &= z U + z^3 \Lambda \\ \end{align} \]

We can use these to express \(V\) and \(\Lambda\) in terms of \(U\).

\[ \begin{align} V &= (1 - z^3)^{-1} z U\\ \Lambda &= (1 - z^3)^{-1} z U\\ \end{align} \]

Plugging these in, we now have just one equation with one unknown.

\[ \begin{align} U &= 1 + z^3 U + z^2 (1 - z^3)^{-1} z U + z^2 (1 - z^3)^{-1} z U \end{align} \]

Solving for \(U\)

\[ \begin{align} U &= 1 + z^3 U + z^2 (1 - z^3)^{-1} z U + z^2 (1 - z^3)^{-1} z U \end{align} \]

\[ \begin{align} 1 &= U - z^3 U - z^2 (1 - z^3)^{-1} z U - z^2 (1 - z^3)^{-1} z U \\ 1 &= \left[1 - z^3 - z^2 (1 - z^3)^{-1} z - z^2 (1 - z^3)^{-1} z\right] U \\ U &= \frac{1}{\left[(1 - z^3) - z^2 (1 - z^3)^{-1} z - z^2 (1 - z^3)^{-1} z\right]} \\ U &= \frac{1 - z^3}{\left[(1 - z^3)^2 - 2z^3\right]} \\ \end{align} \]

Let \(w = z^3\) (dominoes come in threes)

\[ \begin{align} U &= \frac{1 - z^3}{\left[(1 - z^3)^2 - 2z^3\right]} = \frac{1 - w}{\left[(1 - w)^2 - 2w\right]} \\ &= \frac{1 - w}{\left[1 -2w + w^2 - 2w\right]} \\ &= \frac{1 - w}{\left[1 - 4w + w^2 \right]} \\ & = \frac{A}{1 - \alpha w} + \frac{B}{1-\beta w}\\ & = A[1 + \alpha w + \alpha^2 w^2 + \cdots] + B[1 + \beta w + \beta^2 w^2 + \cdots]\\\ &= \sum A \alpha^n w^n + B \beta^n w^n \end{align} \]

Same story as before (but different constants)

\[ \begin{align} u_n &= A \alpha^n + B \beta^n \\ & = \mbox{number of ways to tile $3 \times 2n$ with $3n$ dominoes} \end{align} \]

We just need to determine \(\alpha\), \(\beta\), \(A\), and \(B\).

Using algebra similar to the \(2 \times n\) case, we get

\[ \begin{align} \alpha &= 2 + \sqrt{3} & \beta &= 2 - \sqrt{3} \\ A &= \frac{1}{2} + \frac{\sqrt{3}}{6} & B &= \frac{1}{2} - \frac{\sqrt{3}}{6}\\ \end{align} \]

Computation

u <- function(n) {
  alpha <- 2 + sqrt(3)
  beta  <- 2 - sqrt(3)
  A <-   1/2 + sqrt(3) / 6
  B <-   1/2 - sqrt(3) / 6
  A * alpha^n + B * beta^n
}
u(0:20)
 [1]            1            3           11           41          153
 [6]          571         2131         7953        29681       110771
[11]       413403      1542841      5757961     21489003     80198051
[16]    299303201   1117014753   4168755811  15558008491  58063278153
[21] 216695104121

Table of Values

n t u A part B part
0 1 1 0.7886751 0.2113248654051871345
1 1 3 2.9433757 0.0566243270259356168
2 2 11 10.9848276 0.0151724426985552496
3 3 41 40.9959346 0.0040654437682853643
4 5 153 152.9989107 0.0010893323745862042
5 8 571 570.9997081 0.0002918857300594508
6 13 2131 2130.9999218 0.0000782105456515985
7 21 7953 7952.9999790 0.0000209564525469433
8 34 29681 29680.9999944 0.0000056152645361746
9 55 110771 110770.9999985 0.0000015046055977551
10 89 413403 413402.9999996 0.0000004031578548458
11 144 1542841 1542840.9999999 0.0000001080258216282
12 233 5757961 5757961.0000000 0.0000000289454316670
13 377 21489003 21489003.0000000 0.0000000077559050397
14 610 80198051 80198051.0000000 0.0000000020781884920
15 987 299303201 299303200.9999999 0.0000000005568489281
16 1597 1117014753 1117014752.9999995 0.0000000001492072206
17 2584 4168755811 4168755810.9999976 0.0000000000399799543
18 4181 15558008491 15558008490.9999905 0.0000000000107125965
19 6765 58063278153 58063278152.9999771 0.0000000000028704316
20 10946 216695104121 216695104120.9998779 0.0000000000007691298

Want to Know More?

Inquire within

https://www2.math.upenn.edu/~wilf/gfologyLinked2.pdf

You can find these slides at…

https://rpruim.github.io/talks/domino-arithmetic/domino-arithmetic-slides.html