R912 Philips Res. Repts 30,337*-343*,1975 Issue in honour of C. J. Bouwkamp A FINITE BASIS THEOREM FOR PACKING BOXES WITH BRICKS*) by N. G. de BRUIJN Technological University Eindhoven Eindhoven, The Netherlands and D. A. KLARNER State University of New York at Binghampton Binghampton, N.Y., U.S.A. (Received January 22, 1975) Consider a catalogue Swhich lists one to infinitely many shapes of rectangular bricks with positive integer dimensions. Using as many bricks of each shape as needed, the bricks listed in S may be used to completely fill certain rectangular boxes. We assume the shapes to be oriented, i.e. we are not allowed to turn bricks around when trying to fill a box. Thus, a new catalogue res) may be formed which lists the (infinitely many) rectangular boxes which may be completely filled with bricks having their shape listed in S. Some of the bricks listed in Smay be shapes of boxes which can be filled up completely with smaller bricks listed in S; in other words, there may be elements SE S such that SE r(s\{s}). The bricks which may be formed with bricks in S smaller than themselves are composites. Bricks in S which are not composites are primes in S. If Br = Br(S) is the set of primes in S, then B; is non-empty and every box which can be formed with elements of S can be formed with elements of the subset Br of S; in other words, r(br) = res) (see lemma 4). The subject ofthis note is the remarkable fact that the set of primes Br(S) is finite for every set S. The brief history of this problem is as follows: Results involving the tiling of rectangles and three-dimensional boxes with identical polyominoes and polycubes are discussed in ref. 3. One sort of result presented there is typified by the following example. The L-tetromino and two of the smallest rectangles it tiles are shown in fig. I. An a X b rectangle can be tiled with copies of the L-tetromino Fig. 1. The L-tetromino *) Dedictated to our mutual friend e.j. Bouwkamp. and the smallest rectangles it tiles.
338* N. G. DE llruijn AND D. A. KLARNER if and only if a and b are integers greater than 1 such that 8 divides ab. Also, every a xb rectangle having integer sides a and b greater than 1 with ab a multiple of 8 can be tiled with 2 X 4 and 3 X 8 rectangles. If S denotes the set of rectangles which can be tiled with L-tetrominoes, one way to characterize S is to list the elements of B res) which are (2, 4), (3, 8), (4, 2), (8, 3); the first two are shown in fig. 1. On reading ref. 3 and doing some investigation of his own, Frits Göbel noted that in every case where one has a characterization of the set S of rectangles which can be tiled with copies of one polyomino, a characterization of S can be given by listing the elements of Br(S) because this always turned out to be a finite set. Thus, he was led to conjecture that Br(S) is finite for every set S of rectangular k-dimensional boxes. Bouwkamp (see ref. 1) has done considerable work with a computer to determine the set of prime boxes among the boxes which can be tiled with the Y-pentacube. Frits Göbel described his conjecture to the second author of the present note who found a prooffor the one- and two-dimensional instances ofthe conjecture. This proof was generalized in collaboration 2), but the proof breaks down in three and higher dimensions (the mistake in the proof is in the bottom third of p. 467 in ref. 2). The proof is illustrated for 2 dimensions, and this correct instance evidently convinced readers of the full generality. The mistake was finally noted and corrected in ref. 4. On reading this correction the first author of the present note thought of a simpler proof. Both proofs are presented here. The first proof is a corrected version of the proof which appears in ref. 2. Let (dl'..., d k ) denote a k-tuple of positive integers. Such a k-tuple will also be called a shape, occasionally written as d. Then an (oriented) k-dimensional box with shape (dl'..., d k ) is a set K of dl... d k integer points containing one point (the smallest) (Cl>., Ck) such that The set of all k-dimensional boxes with shape (dl>..., d k ) is denoted (dl'..., d k ). Boxes with shapes dl, d 2, are said to tile a box C if there exists a partition {Cl' C 2, } of C with Cl' C 2, E (dl) U (d 2 ) U... If S is a set of shapes then res) is the set of shapes of boxes that can be tiled by S. We shall also consider a more special kind of tiling (which we might refer to as repeated one-dimensional concatenation). If ä, b, ë are shapes, and ifthere is an i (1 ~ i ~ k) such that Cl= al + bh and such that Cl = al = bl for all j =1= i, then we say that ë is obtained from ä and b by one-dimensional concatenation. If S is a set of shapes, we define A(S) as the smallest set of shapes closed under one-dimensional concatenation, i.e. A(S) is the smallest set with the properties
I I : FINITE BASIS THEOREM FOR PACKING BOXES WITH BRICKS 339* (i) A(S);;;2 S; (ii) if a E A(S), b E A(S), and ë is obtained from a and b by one-dimensional concatenation, then ë E A(S). For example, if a, b, ë are shapes, a ES, bes, if Cl = al + bl> and if cj is the least common multiple of aj and b J for 2 ~j ~ k, then ë E A(S). It is easy to see that if a E A(S) then S tiles every box of shape ti. In other words A(S) res). The following example shows that A(S) can be smaller I than r(s): If S = {(I, 4), (4, 1), (3, 3)} then (5, 5) E res) but (5, 5) rf= A(S). An element b of S is called prime with respect to A and Sif b rf= A(S\ {b }). The set of all these primes is called BA(S) (or BA for short). The operator A has the following properties (for all sets S, T): (i) S A(S); (ii) if S T then A(S) A(T); (iii) A(A(S)) = A(S); (iv) if a E A(S) then there exists a subset U of S with a E A(U) and such that every shape in U is ~ a (we say that b :::::;; a if bi ~ ai for i = 1,..., k). From these properties we derive: Lemma 1. If T S A(T) then BA(S) T. Proof Let b be any element of BA(S). By the definition of BA(S) we have b rf= A(S \ {b }). Now by (ii): b rf= A(T \ {b }). Since BA(S) S A (T) we have b e A(T), and it follows that A(T \ {b}) =1= A(T), whence bet. Lemma 2. A(BA(S)) = A(S). Proof According to (i), (ii), (iii) and to BA(S) S it suffices to show that S A(BA(S)). We do this by showing that if S \ A(BA(S)) contains a shape a then it contains a shape b with b ~ a, b =1= a (and that cannot go on for ever!). Let a be such a shape. Then a rf= BA(S), whence a E A(S \ {a}). By (iv) we can find U such that U S\ {a}, a E A( U) and such that all shapes in U are :::::;; a. We cannot have U A(BA(S)) since that would imply a E A(BA(S)). So we can take beu such that b rf= A(BA(S)). Since beu S\ {a} we have b ~ a, bes, b =1= a. Hence bes \ A(BA(S)). Lemma 3. If T S r(t) then Br(S) T. Lemma 4. r(br(s)) = res). Proofs of lemmas 3 and 4 are obtained from those of lemmas 1 and 2 by replacing all A's by r's. We now express our main result as a theorem.
340* N. G. DE BRUIJN AND D. A. KLARNER Theorem. Let S denote a set of k-dimensional shapes. Then we have (i) S has a finite subset T such that S s;; r(t) (whence res) = T(T»; (ii) Br(S) is finite; (iii) S has a finite subset T such that S s;; A(T) (whence A(S) = A(T»; (iv) BA(S) is finite. Remark. It follows from the lemmas that (i) is equivalent to (ii), and that (iii) is equivalent to (iv). Furthermore (iii) implies (i) (since A(T) T(T», hence it.suffices to prove either (iii) or (iv). First proof (Corrected version of the proof given in ref. 2; it will prove the theorem in the form (iv).) The proofis by induction on the dimension k ofthe boxes. For k = 1, Smay be regarded as a set of positive integers and BA(S) is the smallest subset of S such that every number in S is a non-negative linear combination of elements of BA(S). Suppose the greatest common divisor of elements of S is d; then it is easy to show that some finite subset F of S has greatest common divisor equal to d. Hence, since every large multiple of d is a non-negative linear combination of elements of F, all but a finite subset E of S is contained in A(F). Hence, S A(F U E) and BA(S) F u E. This proves BA(S) is finite in the 1- dimensional case. Now suppose BA(S) is finite for every set S of k-dimensional shapes for k = 1,..., n - 1 with n ;;;;:2. But, suppose there exists a set Tof n-dimensional boxes with BiT) infinite (this leads to a contradiction). Without loss of generality it can be supposed that BA(T) = T. Also, let the elements of T be put in a sequentialorder (i!> i 2, ) with i l = ««...., tin) for i = 1,2,... Each of the n sequences (til: i = 1,2,... ),..., (tin: i = 1,2,... ) must tend to infinity. For example, if the first sequence (til: i = 1, 2,... ) does not tend to infinity, then there exists an infinite constant subsequence (til: i E I) so that the infinite subsequence (il: i E I) of (il: i = 1,2,... ) contains boxes all having the same height. It follows from the induction hypothesis that the set {il: i E I}has finite basis with respect to A. A moment's thought may be required here because a detail is being passed over. At bottom, we are using the fact that having boxes all of one height really amounts to dealing with boxes of one lower dimension. Now we select an infinite subsequence R of T and show that BA(R) is finite. This provides the contradiction we seek since this implies there exists an element (in fact, infinitely many elements) of Twhich is composite. (Supposing T = B A(T) means no element of T is composite.) Given n-tuples ä = (al'..., an), h = (bi,..., bn) ofpositive integers, ä is said to divide h if al divides bi for i = 1,..., n. This notion of division leads to a notion of greatest common divisor of two or more n-tuples of positive integers.
FINITE BASIS THEOREM FOR PACKING BOXES WITH BRICKS 341* We form the subsequence R = (il> i 2, ) as follows: Let,\ = i1> and note that i 1 has only a finite number of divisors. Hence, f 1 has the same greatest common divisor dl with each one of an infinite set of subsequent terms of Tfor some divisor dl of i 1 Let T 2 denote such an infinite subsequence of (i2' i 3,. ), and let i 2 denote the first term of T 2 Now this process is repeated with T 2 in place of Tand i 2 in place off 1, thus forming a new subsequence T 3 of T 2 with 1'2 deleted, and,\ is defined to be the first term of T 3 Thus, the ith term of Ris found by i-i repetitions of this process. It follows from this construction that R has the peculiar property that, for each i, the greatest common divisor of Fi with all subsequent terms of R is the same n-tuple dl for i = 1, 2,... Any sequence with this property is said to be stab/e. Note that every subsequence of a stable sequence is again stable. Now we show by construction that BA(R) is finite. Let for i= 1,..., n where then we shall show there exists an integer P such that A ({F 1,, F 2 n}) contains all boxes having shape (PI (J1>., Pn (JII) with P1>..., P«~ p. This implies BA(R) is finite since all but a finite subset of the elements of R have this form. Let /hies) denote the least common multiple of r 1,i>, r 2 S,i for i, s = 1,..., n where Fi = (ri1>..., rin) for i = 1, 2,... Now we show by induction onj: (A)). For every stable sequence there exists a number p) such that every shape (q1 151>"" q) c5j> /hj+1(j),..., /hn(j)) with q1>..., q) ~ p) is an element of A({i 1,, i 2 J})' Forj = 1, x, y = 1,2,..., the shape (1) (r11 x + r 21 y, /hil),...,,u1l(1)) may be formed from 1'1 and 1'2 by repeated one-dimensional concatenation. But, there exists an integer PI such that ç, 15 1 has the form r11 x + r 21 Y with x, y ~ 1 for all q1 ~ PI because the greatest common divisor of r 11 and r 21 divides 15 1, This proves A i- Now suppose A) is true for somej ~ 1; we shall prove AJ+1' Let,u/cs) denote the least common multiple of r 2 S+1,i', r 2 s+ 1,i> and note that A) also applies to the stable sequence (ft: t = 2) + 1,..., 2J+1). Thus, there exists a number P/ such that every shape where q1", q) ~ p/ is an element of A({F 2 J+1>', f 2 J+1}). Now we apply (2)
342* N. G. DE BRUIJN AND D. A. KLARNER repeated one-dimensional concatenation to shapes given in (1) and (2) to obtain the shape ql ~l'..., qj ~J> X ftj+l(j) + Y ftj+/(j), ftj+z"(j),..., ft,,"(j» (3) for all ql,..., qj ~ max (P1>p/), x, Y = 1,2,... where ft/, denotes the least common multiple of ftt and ftt'. Now observe that the greatest common divisor of ftj+l(j) and ftj+/(j) divides ~J+1' so there exists an integer PJ+l ~ max (PJ'p/) such that every number qj+1 ~J+ 1 with qj+1 ~ PJ+ 1 has the form x ftj+l(j) + Y ftj+l'(j) with x, Y ~ 1. Also, note that IttCj) and ft/(j) have the least common multiple ftt(j + 1) by definition forj = 1,..., n. Hence AJ implies AJ+l' This completes the proof. Second proof We shall prove (iii); the idea is modelled after the following proof (slightly longer than necessary) for the case k = 1. Let S be a set of positive integers. If S is empty, nothing has to be proved. If S is not empty, choose an hes. For any r (0 ~ r < h) with the property that A(S) contains a number = r (mod h) we select such a number. The set of selected numbers is denoted by D. Let q be some positive upper bound for the elements of this finite set D. We now havea(s) = A({h} u D u {I,...,q- I}) since every element of S exceeding q - 1 is the sum of an element of D and a non-negative multiple of h. We next proceed by induction with respect to the dimension k. We take n > 1 and assume the theorem correct for k = n - 1. One of the dimensions is singled out and referred to as "height". If oe= (al'..., an) is an n-dimensional shape we write (al'..., an-l) = a* (the "cross-section") and an = height (oe). Furthermore, if t is a positive integer we write oe*t= (al'..., an-i> t). As shapes of constant height can be treated as shapes of lower dimension, we note that if oe,oel,'.., a p are such that oe*e A({al*'..., oe/}) then oe*tea({al*t,..., oep*t}). Let S be a set of n-dimensional shapes. We put Y = {oe*: oee S}. By the induction hypothesis Yhas a finite subset Zwith Y A(Z). Take al'..., oepe S such that Z = {oel*'..., oep*}.we put p h = IT height 1=1 (oei)' Since h is a multiple of height (oei), we have oet*"e A( { oe}).if oeesthen oe*e Y, whence oe*e A( {oei*,..., oep*}).therefore oe*1ie A( {al *11,..., oep*1'}). Since h is a multiple of height (ai), we have al*l. E A(X). Thus we have proved: if oee S then oe*l'e A(X).
FINITE BASIS THEOREM FOR PACKING BOXES WITH BRICKS 343* For 0 ~ r < h we consider T, = {a* : a E S, height (a) = r (mod h)}. By the induction hypothesis T, has a finite subset R, with T, s;; A(R r ). We select a finite subset Qr of S such that R, = {a* : a E Qr}. Let q be a positive integer such that height (ex) ~ q for all ex E R, and all r (0 ~ r < h). Let y be any element of S whose height m exceeds q; let r satisfy o ~ r < 11, m - r 0 (mod 11). For every ex E Qr we have a*" E A(X), and since m > q ~ height (ex), m _ height (ex) (mod h), we conclude ex*m E A(X U Qr). Furthermore y* E T, S;; A(Rr), whence y = y*ms;; A({ ex*m: a E Qr}) S;; A(X U Qr). Consequently: if fj E S, height (fj) > q, then fj E A(X U Qo U... U Q,.-l)' If 1 ~ i ~ q we consider the sets W, = {ex: a ES, height (a) = i}, V, = {a* : a E W,}. By the induction hypothesis V, has a finite subset U, with V, S;; A(U,). Let P, be the set of all shapes with height i and cross-section in V" Then W, S;; A(P,). Our final conclusion is that for every ex E S. This proves (iii). The theorem has the following interesting corollary. Let S be any set of shapes. A box with its shape in res) is called cleavable if some hyperplane cuts it into two non-empty boxes with shapes in res). Thus a non-cleavable box is a box which can be tiled with boxes having their shape listed in S, but never with a "fault" hyperplane. The corollary is that the set of shapes of non-cleavable boxes is either empty or finite. Note that every shape in Br is non-cleavable, and that every non-cleavable shape is in BA' REFERENCES 1) C. J. Bouwkamp and D. A. Klarner, J. recreational Math. 3, ló-26, 1970. 2) D. A. Klarner and Frits Göbel, Indag. math. 31, 465-472,1969. 3) D. A. Klarner, J. comb. Theory. 7,107-115, 1969. 4) D. A. Klarner, A finite basis theorem revisited, Stanford Research Report. Stan-CS-73-338 (Computer Science Department), February, 1973.