1 Introduction

We say that a collection of d-dimensional boxes (i.e., rectangular parallelepipeds) can be packed into the d-dimensional unit cube \(I_d\) (i.e., a cube of edges of length 1) if the boxes can be rotated and translated so that they are subsets of \(I_d\) and that they have pairwise disjoint interiors. When boxes arrive one by one and each box that has arrived must be packed (without any information about the size of next boxes) and cannot be moved thereafter, the packing method is called online. We focus on the problem of online packing of d-dimensional boxes into the unit cube.

Denote by \(b_d\) [by \(c_d\), respectively] the greatest number such that any sequence of d-dimensional boxes [cubes, respectively] of edge length smaller than or equal to 1 and of total volume not greater than \(b_d\) [than \(c_d\), respectively] can be packed online into \(I_d\).

Lassak [11] showed that \(\ b_2 \ge 0.1464\) and that

$$\begin{aligned} b_d\ge \left( 1-\frac{1}{2}\sqrt{3}\right) ^{d-1}\approx 7.46\cdot 0.13^{d} \end{aligned}$$

for \(\ d \ge 3.\) The bound for \(d=2\) was improved to \(\ b_2\ge 0.2837\) in [10]. Let us note that in the case of packing of sequences of squares the following lower bounds were presented: \(\ c_2\ge 5/16\) in [7], \(\ c_2\ge 1/3\) in [5], \(\ c_2\ge 11/32\) in [3], \(\ c_2\ge 3/8\) in [1] and \(\ c_2\ge 2/5\) (see [2]). Moreover, \(\ c_d=2^{1-d}\ \) for \(d\ge 4\) (see [9] and [7]). It is an open question whether \(\ c_d=2^{1-d}\ \) for \(d=2\) and \(d=3\) as well as whether \(\ b_d=c_d\ \) for \(d\ge 2\).

More is known for offline packing. Moon and Moser [13] proved that any collection of squares with total area not greater than 1/2 can be packed offline into a unit square, which is tight. Moser [14] conjectured also that a similar result may be obtained for packing rectangles of side lengths not greater than 1. This has been confirmed in [8]. Furthermore, Meir and Moon [12] showed that any collection of d-dimensional cubes of total volume \(2^{1-d}\) can be packed (offline) into \(I_d\).

The main result of this paper, presented in Theorem 4.6, is as follows

$$\begin{aligned} b_d \ge (3-2\sqrt{2})\cdot 3^{-d}\approx 0.17\cdot 0.33^{d}. \end{aligned}$$

The packing method is based on the drawer algorithm described in [4]. Our basic algorithm P(d) is defined inductively from lower dimensions to higher and the inductive step goes two dimensions back, so we will start with cases \(d=1\) and \(d=2\).

We will assume that any edge of each box and any edge of each unit cube is parallel to an axis of the coordinate system. Denote by |B| the d-dimensional volume of a d-dimensional box B.

2 Packing algorithm for \(d=1\)

Consider m unit intervals \(\ I_1^{(1)}, I_1^{(2)}, \dots , I_1^{(m)}\ \) with pairwise disjoint interiors.

Each interval \(I_1^{(l)}\) is divided into \(2^j\) intervals of length \(2^{-j}\), called j-units, for \(\ l =1,2,\ldots , m\). Moreover, for each \(j=1,2,\ldots \), all j-units are numbered by 1 to \(m\cdot 2^j\) so that \((j-1)\)-unit numbered with q is partitioned into two j-units with numbers \(2q-1\) and 2q in an arbitrary order.

Let \(\ S_1, S_2, \dots \ \) be a sequence of segments of length not greater than 1. Denote by \(j_i\) the greatest integer such that \(S_i\) can be packed into \(j_i\)-unit. For example, if the length of \(S_i\) equals 0.3, then \(j_i=1\) (\(S_i\) can be packed into a unit of length \(2^{-1}\), but it cannot be packed into any unit of length \(2^{-2}\)).

Packing methodP(1)

Each segment \(S_i\) is packed into \(\ I_1^{(1)}\cup \cdots \cup I_1^{(m)}\) into a unit. A unit is called active, if its interior has an empty intersection with any packed segment. At the beginning all \(m2^{t}\) units of length \(2^{-t}\), for \(\ t =0,1,2\ldots \), are active.

  • We find the smallest integer k such that the \(j_i\)-unit with number k is active. Let U be such a unit. We pack \(S_i\) into U. We say that U is full. From now on only units that have an empty intersection with the interior of U are active.

Example 2.1

Figure 1 illustrates the packing method. At the beginning all units are active. The first segment \(S_1\) of length 0.35 is packed into the first 1-unit. No other segment will be packed into this 1-unit (this unit is not active and full). All j-units (\(j\ge 1\)) contained in this 1-unit are also not active. Moreover, the first 0-unit is not active. The second interval of length 0.1 is packed into the fifth 3-unit in \(I^{(1)}_1\) (four 3-units contained in the first 1-unit are not active). From now on all j-units (\(j\ge 3\)) contained in this 3-unit are not active. Furthermore, both the second 1-unit as well as the third 2-unit are not active. The next segment is placed into the 1-unit with number 3 (in \(I^{(2)}_1\)- there is no active 1-unit in \(I^{(1)}_1\)). The proper unit for the fourth segment is 2-unit. We pack this segment into the 2-unit with the smallest possible number, i.e., with number 4. Full and active j-units (\(j\in \{1,2,3\}\)) after packing \(S_4\) are shown on Fig. 1. Note that any two full units have pairwise disjoint interiors, while any active j-unit (\(j\ge 1\)) contains smaller active k-units (\(k>j\)).

Proposition 2.2

If a segment \(S_z\) cannot be packed into \(\ I_1^{(1)}\cup \cdots \cup I_1^{(l)}\ \) by P(1), then the sum of lengths of segments packed into \(\ I_1^{(1)} \cup \cdots \cup I_1^{(l)}\ \) plus the length of \(S_z\) is greater than l/2.

Proof

Assume that \(S_z\) is the first segment that cannot be packed and let \(\ k=j_z\), i.e., \(S_z\) should be packed into k-unit (if \(l=1\), then \(\ z=3\ \) and \(\ k=1\ \) on Fig. 1). Denote by F the union of full units in \(I_1^{(1)}\cup \cdots \cup I_1^{(l)}\) and let E be the closure of

$$\begin{aligned} (I_1^{(1)}\cup \cdots \cup I_1^{(l)}) \setminus F. \end{aligned}$$

Clearly, E is the union of segments with pairwise disjoint interiors. For example, on Fig. 1 if we pack only \(S_1\) and \(S_2\) in \(I_1^{(1)}\), then E is a segment equal to the union of the fourth 2-unit and the sixth 3-unit. There is no interval in E with length greater than or equal to \(2^{-k}\); otherwise \(S_z\) can be packed into it. Moreover there is at most one interval with length \(2^{-k-1}\); the numbering of units causes that if there are two active \((k+1)\)-units, then there is an active k-unit. Thus E is smaller than the length of \((k+1)\)-unit plus the length of \((k+2)\)-unit plus the length of \((k+3)\)-unit, etc., i.e.,

$$\begin{aligned} |E|< \left( \frac{1}{2}\right) ^{k+1} + \left( \frac{1}{2}\right) ^{k+2} + \cdots = \left( \frac{1}{2}\right) ^{k} . \end{aligned}$$

Consequently,

$$\begin{aligned} |F|= l - |E| > l - \left( \frac{1}{2}\right) ^{k}. \end{aligned}$$

The length of any segment packed into a full unit is greater than 1/2 times the length of this full unit. Hence the sum of lengths of segments packed into \(\ I_1^{(1)}\cup \cdots \cup I_1^{(l)}\ \) is greater than

$$\begin{aligned} \frac{1}{2} |F| > \frac{1}{2}l - \left( \frac{1}{2}\right) ^{k+1}. \end{aligned}$$

Since \(\ |S_z|> (1/2)^{k+1}\), it follows that the sum of length of all segments packed into \(I_1^{(1)}\cup \cdots \cup I_1^{(l)}\ \) plus \(|S_z|\) is greater than l/2. \(\square \)

Fig. 1
figure 1

Units

Corollary 2.3

If a segment was packed into \(I_1^{(l)}\)\((l\ge 2)\) by P(1), then the sum of lengths of segments packed into \(\ I_1^{(1)} \cup \cdots \cup I_1^{(l)}\ \) is greater than \((l-1)/2\).

Remark

If all segments \(S_i\) have lengths from the set \(\ \{ 1,1/2,1/4,1/8,\ldots \}\), then such a packing is called 2-adic. The 2-adic covering was considered in [6].

3 Packing algorithm for \(d=2\)

Let \(R_i\) be a rectangle of side lengths \(w_i\) and \(h_i\), where \(\ w_i \le h_i \le 1\) (for \(i\ge 1\)). We say that \(R_i\) is

  • big provided \(h_i> 1/3\);

  • small provided \(\ h_i \le 1/3\).

For any small rectangle \(R_i\) there is a positive integer r such that

$$\begin{aligned} \frac{1}{3} \cdot \Bigl ( \frac{1}{\sqrt{2}} \Bigr )^{r}=\frac{\sqrt{2}}{3} \cdot \Bigl ( \frac{1}{\sqrt{2}} \Bigr )^{r+1} < h_i \le \frac{\sqrt{2}}{3} \cdot \Bigl ( \frac{1}{\sqrt{2}} \Bigr )^{r}. \end{aligned}$$

If \(\ w_i > \frac{1}{3} \cdot \bigl ( \frac{1}{\sqrt{2}} \bigr )^{r}\), then we say that \(R_i\) is a special rectangle and that it is of type\((r-1,0)\). Otherwise

$$\begin{aligned} \frac{1}{3} \cdot \Bigl ( \frac{1}{\sqrt{2}} \Bigr )^{r} \cdot \Bigl ( \frac{1}{2} \Bigr )^{s+1} < w_i \le \frac{1}{3} \cdot \Bigl ( \frac{1}{\sqrt{2}} \Bigr )^{r} \cdot \Bigl ( \frac{1}{2} \Bigr )^{s} \end{aligned}$$

for a non-negative integer s. We say then that \(R_i\) is of type (rs).

For example, a small rectangle \(R_i\) is of type (0, 0) only if \(\ w_i > \frac{\sqrt{2}}{6}\). A rectangle \(R_i\) is of type (1, 0) either if \(\ w_i > \frac{1}{6}\ \) and at the same time \(\ h_i \le \frac{\sqrt{2}}{6}\ \) or if \(\ \frac{\sqrt{2}}{12} <w_i \le \frac{\sqrt{2}}{6}\ \) and at the same time \(\ \frac{\sqrt{2}}{6} < h_i \le \frac{1}{3}\). A rectangle \(R_i\) is of type (1, 1) if \(\ \frac{\sqrt{2}}{6} < h_i \le \frac{1}{3}\ \) and \(\ \frac{\sqrt{2}}{24}< w_i \le \frac{\sqrt{2}}{12}\).

By (rs)-unit we mean a rectangle of sides of length

$$\begin{aligned} \frac{\sqrt{2}}{3} \cdot \Big ( \frac{1}{\sqrt{2}}\Big )^r\ \ \ \mathrm{and} \ \ \ \ \frac{1}{3}\cdot \Big ( \frac{1}{\sqrt{2}}\Big )^r \cdot \Big (\frac{1}{2} \Big )^s \end{aligned}$$

(see Fig. 2).

Fig. 2
figure 2

The (rs)-units

By the proper unit\(U(R_i)\) for a small rectangle \(R_i\) of type (rs) we mean the (rs)-unit. Clearly, \(U(R_i)\) is the unit with the smallest area into which \(R_i\) can be packed (rotations are allowed). The reason is that the longest side of \(U(R_i)\) has to be greater than or equal to \(h_i\) and the other side has to be greater than or equal to \(w_i\).

Fig. 3
figure 3

Proper units for rectangles \(R_1\), \(R_2\), \(R_3\) and \(R_4\)

For example, on Fig. 3 the proper unit for the square \(R_1\) of side length \(0.24> \sqrt{2}/6\) is (0, 0)-unit; the proper units for \(R_2\), \(R_3\) and \(R_4\) are (1, 0)-, (2, 2)- and (1, 2)-units, respectively.

Note that no (0, s)-unit for \(s\ge 1\) is the proper unit for a small rectangle \(R_i\); the reason is that both sides of any small rectangle are not longer than 1/3 (there are no small rectangles of type (0, s)).

Lemma 3.1

The area of any small rectangle \(R_i\) of type (rs) is greater than \(\sqrt{2}/4\) times the area of (rs)-unit.

Proof

Let \(R_i\) be a small rectangle and let \(U(R_i)\) be the proper unit for \(R_i\).

If \(R_i\) is a special rectangle of type \((r-1,0)\), then \(U(R_i)\) is \((r-1,0)\)-unit of sides of length \(\ \frac{\sqrt{2}}{3} \cdot \bigl ( \frac{1}{\sqrt{2}} \bigr )^{r-1}\ \) and \(\ \frac{1}{3} \cdot \bigl ( \frac{1}{\sqrt{2}} \bigr )^{r-1}\cdot \bigl ( \frac{1}{2} \bigr )^{0}.\) It is easy to see that

$$\begin{aligned} |R_i| = w_ih_i > \frac{1}{3} \cdot \Bigl ( \frac{1}{\sqrt{2}} \Bigr )^{r} \cdot \frac{1}{3} \cdot \Bigl ( \frac{1}{\sqrt{2}} \Bigr )^{r} = \frac{1}{9} \cdot \Bigl ( \frac{1}{2} \Bigr )^{r} = \frac{\sqrt{2}}{4} \cdot |U(R_i)|. \end{aligned}$$

If \(R_i\) is a non-special rectangle of type (rs), then \(U(R_i)\) is the rectangle of sides of length \(\ \frac{\sqrt{2}}{3} \cdot \bigl ( \frac{1}{\sqrt{2}} \bigr )^{r}\ \) and \(\ \frac{1}{3} \cdot \bigl ( \frac{1}{\sqrt{2}} \bigr )^{r} \cdot \bigl ( \frac{1}{2} \bigr )^{s}.\) Hence

$$\begin{aligned}&|R_i| = w_ih_i > \frac{1}{3} \cdot \Bigl ( \frac{1}{\sqrt{2}} \Bigr )^{r} \cdot \Bigl ( \frac{1}{2} \Bigr )^{s+1} \cdot \frac{1}{3} \cdot \Bigl ( \frac{1}{\sqrt{2}} \Bigr )^{r} \\&\quad = \frac{1}{9} \cdot \Bigl ( \frac{1}{2} \Bigr )^{r} \cdot \Bigl ( \frac{1}{2} \Bigr )^{s}\cdot \frac{1}{2} = \frac{\sqrt{2}}{4} \cdot |U(R_i)|. \end{aligned}$$

\(\square \)

Consider m unit squares \(\ I_2^{(1)}, I_2^{(2)},\ldots , I_2^{(m)} \), with pairwise disjoint interiors. Each unit square \(I_2^{(l)}\) is divided into two rectangles \(\ D_2^{(l)}\) of sides of length 1 and \(2\sqrt{2}/3\ \) and \(\ T_2^{(l)}\) of sides of length 1 and \(1- 2\sqrt{2}/3\) (see Fig. 4, where \(D_2^{(1)}\) and \(\ T_2^{(l)}\) are denoted by \(D_2\) and \(T_2\), respectively). Small items will be packed into \( D_2^{(l)}\).

The rectangle \(D_2=D_2^{(1)}\) is divided into six (0, 0)-units numbered with natural numbers in the order showed on Fig. 4. Each (0, 0)-unit is divided into smaller units. When \((r-1,s)\)-unit (for \(\ r \ge 1, \ s \ge 0\)) numbered with q is partitioned into two (rs)-units, these two units are numbered by \(2q-1\) and 2q in an arbitrary order. Moreover, when an \((r,s-1)\)-unit (for \(\ s \ge 1\)) numbered with p is partitioned into two (rs)-units, these two units are numbered by \(2p-1\) to 2p in an arbitrary order (see Fig. 5).

The remaining unit squares are divided in a similar way. The rectangle \(D_2^{(l)}\) is partitioned into six (0, 0)-units of numbers \(\ 6l-5, \ldots , 6l\), into twelve (1, 0)-units of numbers \(\ 12l-11, \ldots , 12l\) and so on.

We say that a rectangle is packed along the right side of the unit square if its shorter side is contained in the right side of the square.

Now we describe an algorithm for packing rectangles of sides of length not greater than 1 into \(\ I_2^{(1)} \cup \cdots \cup I_2^{(m)}\). Each small rectangle will be placed into corresponding unit with the smallest number.

Packing methodP(2)

At the beginning all units are active.

  • If \(R_i\) is a small rectangle of type (rs), then we find the smallest integer k such that (rs)-unit of \(\ I_2^{(1)} \cup \cdots \cup I_2^{(m)}\ \) with number k is active. Let \(U_i\) be such a unit and let \(U_i^+\) be (r, 0)-unit containing \(U_i\). The rectangle \(R_i\) is packed into \(U_i\). From now on we say that \(U_i\) is full and not active. All (pq)-units \((p\ge r+1, q \ge 0)\) contained in \(U_i^+\) are not active. Moreover all units that have a non-empty intersection with the interior of \(U_i\) are not active.

  • If \(R_i\) is big, then we find the smallest integer l such that \(R_i\) can be packed into \(I_2^{(l)}\) along the right side of the square. We pack \(R_i\) as near to the top of \(I_2^{(l)}\) as it is possible. All units that have a non-empty intersection with \(R_i\) became not active.

Fig. 4
figure 4

The rectangle \(\ D_2 \subset I_2^{(1)}\ \) partitioned into: six (0, 0)-units (left) and twelve (1, 0)-units (right)

Fig. 5
figure 5

The rectangle \(\ D_2 \subset I_2^{(1)}\ \) partitioned into: twenty four (2, 0)-units (left) and twenty four (1, 1)-units (right)

Fig. 6
figure 6

Packing rectangles into \(\ I_2^{(1)} \cup I_2^{(2)}\cup I_2^{(3)}\)

Example 3.2

Figure 6 illustrates the packing method. At the beginning all units are active. The first rectangle \(R_1\) is packed into the first (1, 1)-unit. No other rectangle will be packed into this (1, 1)-unit (this unit is not active and full). Clearly, \(U_1^+\) is the first (1, 0)-unit. All (pq)-units for \(p\ge 2 \) and \(q \ge 0\) contained in \(U_1^+\) are not active. This means that two first (2, 0)-units (and all units contained in these units) become not active. However the second (1, 1)-unit as well as (1, s)-units (\(s \ge 1\)) contained in the second (1, 1)-unit remain active. The second rectangle is packed into the second (0, 0)-unit. In this case \(U_2^+ = U_2\). From now on all units contained in this (0, 0)-unit become not active. Since the proper unit for the third rectangle is (2, 0)-unit, the third rectangle is packed into the (2, 0)-unit with number 3. All units contained in this (2, 0)-unit (\(U_3^+=U_3\)) as well as (1, s)-units ( for \(s \ge 1\)) contained in the second (1, 0)-unit become not active (these units have a non-empty intersection with the interior of \(U_3\)), however all units contained in the fourth (2, 0)-unit are still active. The next rectangle is placed into the fifth (1, 0)-unit. The proper unit for the fifth rectangle is (1, 2)-unit. There is an empty space in the upper half of the first (1, 0)-unit. We pack this rectangle into the (1, 2)-unit with number 3. Remaining rectangles are placed in a similar way.

Fig. 7
figure 7

The small rectangle \(R_z\) cannot be packed into \(I_2^{(l)}\)

Lemma 3.3

Assume that all big rectangles packed in each \(I_2^{(k)}\) are contained in \(T_2^{(k)}\ \) for \(\ k \in \{ 1,2,\ldots , l \}\). Moreover, let \(\ Q=D_2^{(1)} \cup \cdots \cup D_2^{(l)}\ \) and let \(R_z\) be the first small rectangle that cannot be packed into Q by P(2). If p and q are integers such that \(R_z\) is of type (pq), then the sum of areas of full units in Q is greater than \(\ \frac{2\sqrt{2}}{3}\cdot l-\frac{2\sqrt{2}}{9} \cdot \bigl (\frac{1}{2}\bigr )^{p+q}\).

Proof

Denote by F the union of full units in Q and let E be the closure of \(\ Q \setminus F\). For example, if \(l=1\), then \(Q=D_2\) and E is the union of uncolored rectangles contained in \(D_2\) on Fig. 6, left.

First assume that \(R_z\) is of type (0, 0) (i.e., \(h_z \ge w_z> \sqrt{2}/6\)), as on Fig. 6, where \(z=16\) or as on Fig. 7. Recall that no (0, s)-unit for \(s\ge 1\) is the proper unit for any small rectangle. Observe that there is no (0, 0)-unit in E; otherwise \(R_z\) can be packed into it. Moreover there is at most one active (1, 0)-unit in E (as the fourth (1, 0)-unit on Fig. 7); the numbering of units causes that if there are two active (1, 0)-units, then there is an active (0, 0)-unit. If there is an active (1, 0)-unit in E, then denote it by \(E_{1,0}\); otherwise let \(\ E_{1,0} = \emptyset \). There is at most one active (2, 0)-unit in \(\ E \setminus E_{1,0}\ \) (see (2, 0)-unit with number 6 on Fig. 7); the numbering of units causes that if there are two active (2, 0)-units, then there is an active (1, 0)-unit. If there is an active (2, 0)-unit in E, then denote it by \(E_{2,0}\); otherwise let \(\ E_{2,0} = \emptyset \). Similarly, there is at most one active (1, 1)-unit in \(\ E \setminus (E_{1,0} \cup E_{2,0}) \) (as the second (1, 1)-unit on Fig. 7); if there are two active (1, 1)-units, then there is an active (1, 0)-unit. Arguing in this way we obtain that the area of E is smaller than the sum of the areas of units of different size (smaller than (0, 0)-unit), i.e., \(\ |E| < \sum _{r\ge 1, s\ge 0} A_{r,s}\), where \( A_{r,s}\) is the area of (rs)-unit. Hence

$$\begin{aligned}&|E|< \frac{1}{3}\Bigl (\frac{\sqrt{2}}{6}+\frac{\sqrt{2}}{12}+\frac{\sqrt{2}}{24}+\cdots \Bigr ) + \frac{\sqrt{2}}{6}\Bigl (\frac{1}{6}+\frac{1}{12}+\frac{1}{24}+\cdots \Bigr ) \\&\quad \qquad + \frac{1}{6}\Bigl (\frac{\sqrt{2}}{12}+\frac{\sqrt{2}}{24}+\frac{\sqrt{2}}{48}\ldots \Bigr ) + \frac{\sqrt{2}}{12}\Bigl (\frac{1}{12}+\frac{1}{24}+\frac{1}{48}+\cdots \Bigr ) + \cdots \\&\quad =\frac{\sqrt{2}}{9}+\frac{\sqrt{2}}{18}+\frac{\sqrt{2}}{36}+\frac{\sqrt{2}}{72}+\cdots =2\frac{\sqrt{2}}{9}. \end{aligned}$$

The area of E is smaller than the area of two (0, 0)-units (see Fig. 7, where E is contained in the union of first two (0, 0)-units). This implies that

$$\begin{aligned} |F| = |Q|-|E| > |Q|-\frac{2}{9} \sqrt{2} = \frac{2\sqrt{2}}{3}l-\frac{2\sqrt{2}}{9}= \frac{2\sqrt{2}}{3}l-\frac{2\sqrt{2}}{9}\cdot \Bigl ( \frac{1}{2} \Bigr )^{0+0}. \end{aligned}$$

Now assume that \(R_z\) is of type (pq), where \(p+q>0\). The area of E is smaller than

$$\begin{aligned}&\Bigl ( \frac{1}{\sqrt{2}}\Bigr )^p \cdot \Bigl ( \frac{1}{\sqrt{2}}\Bigr )^p \cdot \Bigl ( \frac{1}{2}\Bigr )^q \cdot \left[ \frac{1}{3}\Bigl (\frac{\sqrt{2}}{6}+\frac{\sqrt{2}}{12}+\frac{\sqrt{2}}{24}+\cdots \Bigr ) + \frac{\sqrt{2}}{6}\Bigl (\frac{1}{6}+\frac{1}{12}+\frac{1}{24}+\cdots \Bigr ) \right. \\&\quad \left. + \frac{1}{6}\Bigl (\frac{\sqrt{2}}{12}+\frac{\sqrt{2}}{24}+\frac{\sqrt{2}}{48}\ldots \Bigr ) + \cdots \right] = \Bigl (\frac{1}{2}\Bigr )^{p+q}\cdot \frac{2}{9} \sqrt{2} \end{aligned}$$

Consequently,

$$\begin{aligned} |F| > |Q|-\frac{2}{9} \sqrt{2}\cdot \Bigl (\frac{1}{2}\Bigr )^{p+q} = \frac{2\sqrt{2}}{3}l- \frac{2\sqrt{2}}{9} \cdot \Bigl (\frac{1}{2}\Bigr )^{p+q}. \end{aligned}$$

\(\square \)

Lemma 3.4

Assume that all big rectangles packed in each \(I_2^{(k)}\) are contained in \(T_2^{(k)}\ \) for \(\ k \in \{ 1,2,\ldots , l \}\). Moreover, let \(\ Q=D_2^{(1)} \cup \cdots \cup D_2^{(l)}\ \) and let \(R_z\) be the first small rectangle that cannot be packed into Q. If p and q are integers such that \(R_z\) is of type (pq), then the total area of small rectangles packed into Q plus the area of \(R_z\) is greater than \(\ \frac{1}{3} l - \frac{1}{18} \cdot \bigl ( \frac{1}{2} \bigr )^{p+q}\).

Proof

By Lemma 3.3, the sum of areas of full units in Q is greater than

$$\begin{aligned} \frac{2\sqrt{2}}{3}l- \frac{2\sqrt{2}}{9} \cdot \Bigl (\frac{1}{2}\Bigr )^{p+q}. \end{aligned}$$

By Lemma 3.1, the total area of packed small items plus the area of \(R_z\) is greater than

$$\begin{aligned} \frac{\sqrt{2}}{4} \cdot \Bigl [ \frac{2\sqrt{2}}{3}l- \frac{2\sqrt{2}}{9} \cdot \Bigl (\frac{1}{2}\Bigr )^{p+q}+ \frac{\sqrt{2}}{9} \Bigl ( \frac{1}{2} \Bigr )^{p+q} \Bigr ] = \frac{1}{3} l - \frac{1}{18} \Bigl ( \frac{1}{2} \Bigr )^{p+q}. \end{aligned}$$

\(\square \)

Proposition 3.5

Assume that a rectangle \(R_z\) cannot be packed into \(\ I_2^{(1)} \cup \cdots \cup I_2^{(l)}\). The total area of all packed rectangles plus the area of \(R_z\) is greater than \(\ (3-2\sqrt{2})l/9\).

Proof

Let

$$\begin{aligned} v_2 =(3-2\sqrt{2})/9. \end{aligned}$$

Denote by \({\mathcal J}_s\) the set of integers \(\ i \in \{ 1,2,\ldots , l \}\ \) such that all big rectangles packed into \(I_2^{(i)}\) are contained in \(T_2^{(i)}\).

Clearly, if \(\ j \in \{ 1,2,\ldots , l \} \setminus {\mathcal J}_s\), then the total area of big rectangles in \(I_2^{(j)}\) is greater than \(\ \frac{1}{3} \cdot \bigl ( 1 - \frac{2\sqrt{2}}{3} \bigr ) = v_2\).

If \(\ {\mathcal J}_s= \emptyset \), then the sum of areas of packed big rectangles is greater than \(lv_2\). Otherwise consider the set

$$\begin{aligned} {\mathcal U} = \bigcup _{i \in {\mathcal J}_s} I_2^{(i)}. \end{aligned}$$

Denote by \(\ I_2^{(m_1)}, I_2^{(m_2)},\ldots , I_2^{(m_c)}\), where \(\ m_1<m_2<\cdots <m_c\), all unit squares from \({\mathcal U}\) (c is equal to the number of unit squares in \({\mathcal U}\)). It remains to prove that the total area of rectangles packed in \({\mathcal U}\) plus \(|R_z|\) is greater than \(cv_2\).

Case 1\(R_z\) is small.

By Lemma 3.4, the total area of small rectangles packed into \({\mathcal U}\) plus the area of \(R_z\) is greater than \(\ \frac{1}{3} c - \frac{1}{18} \cdot \bigl ( \frac{1}{2} \bigr )^{0+0} > cv_2\).

Case 2\(R_z\) is big.

If no small rectangle was packed into \({\mathcal U}\), then we take \(t=1\). Otherwise, let t be the greatest integer such that a small rectangle was packed into \(I_2^{(m_t)}\).

If \(\ t \ge 2\), then by Lemma 3.4, the total area of small rectangles packed into \(\ I_2^{(m_1)} \cup I_2^{(m_2)} \cup \ldots \cup I_2^{(m_t)}\ \) is greater than

$$\begin{aligned} \frac{1}{3}\cdot (t-1) - \frac{1}{18} \cdot \Bigl ( \frac{1}{2} \Bigr )^{0+0} > (t-1)v_2. \end{aligned}$$

It remains to show that the total area of big rectangles packed into \(\ I_2^{(m_t)} \cup I_2^{(m_{t+1})} \cup \ldots \cup I_2^{(m_c)}\ \) plus the area of \(R_z\) is greater than \( (c-t+1)v_2.\)

First assume that \(\ t=c\), i.e., that \(I_2^{(m_t)}\) is the last unit square in \({\mathcal U}\). Since \(R_z\) cannot be packed, it follows that the total area of big rectangles packed in \(I_2^{(m_t)}\) plus the area of \(R_z\) is greater than \(\ \frac{1}{3} \cdot \Bigl ( 1 - \frac{2\sqrt{2}}{3} \Bigr ) = v_2\).

Now assume that \(t<c\). In \(c-t\) unit squares \(\ I_2^{(m_{t+1})}, I_2^{(m_{t+2})}, \ldots , I_2^{(m_c)}\ \) only big rectangles was packed. The total area of big rectangles packed in \(\ I_2^{(m_{t+1})}\cup \ldots \cup I_2^{(m_c)}\ \) plus \(|R_z|\) is greater than \(\ \frac{1}{2} \cdot \frac{1}{3} \cdot (c-t) > (c-t+1)v_2.\)\(\square \)

Corollary 3.6

Assume that a rectangle was packed into \(I_2^{(l)}\)\((l\ge 2)\). The total area of all packed rectangles is greater than \(\ (3-2\sqrt{2})(l-1)/9\).

4 Packing algorithm for \(\ d \ge 3\)

If W is a box \(\ [v_1,w_1]\times \cdots \times [v_d,w_d]\), i.e.,

$$\begin{aligned} W = \{ (x_1,\dots ,x_d): \ v_1\le x_1 \le w_1,\ \dots ,\ v_d\le x_d \le w_d \}, \end{aligned}$$

then by the front wall of W we mean the set of its points with \(\ x_1=v_1, \ldots , x_{d-2}=v_{d-2}\). For example, the front wall of \(I_d^{(1)}\) (see Fig. 8) is the unit square (see Fig. 4). Another example: the front wall of the box \(H_3 \) on Fig. 9 (left) is the rectangle \(P(B_3)\) (see Fig. 9, right).

Consider md-dimensional unit cubes \(\ I_d^{(1)}, I_d^{(2)},\ldots , I_d^{(m)}\ \) with pairwise disjoint interiors. Without loss of generality we can assume that \(\ I_d^{(l)} = [l-1,l]\times [0,1]^{d-1}\ \) for \(\ l=1,\ldots ,m\). Each unit cube \(I_d^{(l)}\) is divided into two boxes \(\ D_d^{(l)}\) of \(d-1\) edges of length 1 and of one edge of length \(2\sqrt{2}/3\ \) and \(\ T_d^{(l)}\) of \(d-1\) edges of length 1 and of one edge of length \(1- 2\sqrt{2}/3\).

We can treat the front wall of \(\ D_d^{(l)}\) as the rectangle \(\ D_2^{(l)}\). The division of \(\ D_2^{(l)}\) into units described in Sect. 2 causes the division of \(\ D_d^{(l)}\) into boxes, called drawers, with \(d-2\) edges of length 1 whose front walls are units. Any drawer whose front wall is (rs)-unit is called (rs)-drawer. The numbering of units in \(\ D_2^{(l)}\) causes the numbering of drawers (see Figs. 4, 8).

Fig. 8
figure 8

Six (0, 0)-drawers (left) and twelve (1, 0)-drawers (right)

Fig. 9
figure 9

The (rs)-drawers for \(d=3\)

Let \(\ B_1, B_2, \ldots \) be a sequence of d-dimensional boxes. We can assume that

$$\begin{aligned} a_1(i) \ge a_2(i) \ge \cdots \ge a_{d-1}(i) \ge a_d(i), \end{aligned}$$

where \(a_j(i)\) is the length of the j-th edge of \(B_i\).

A box \(B_i\) with \(a_{d-1}(i)\le \frac{1}{3}\) is called small, otherwise it is called big. Note that \(\ a_1(i)\ge \cdots \ge a_{d-2}(i)\ge a_{d-1}(i) > \frac{1}{3}\), therefore \(\ |B_i|>3^{1-d}\cdot a_d(i) \ \) for any big box. A small box is of type (rs) if its front wall is a rectangle of type (rs). For each small box B of type (rs), let P(B) be the (rs)-unit (see Fig. 9 right). Clearly, P(B) is the unit with the smallest area containing the front wall of B. Moreover, let D(B) be the drawer with the front wall P(B). Since the packing algorithm is defined inductively two dimensions back, for \(d=1\) and \(d=2\) we use algorithms described in Sects. 2 and 3.

Assume that \(\ d\ge 3\).

By the top of \(\ W=[v_1,w_1]\times \cdots \times [v_d,w_d]\ \) we mean the set of its points with \(\ x_d=w_d\). For example, the top of \(I_3^{(1)}\) on Fig. 9 is the rectangle \(\ \{(x_1, x_2, x_3): \ 0\le x_1\le 1, 0\le x_2 \le 1, x_3=1\}.\) The \((d-2)\)-dimensional bottom of W is the set of its points with \(\ x_d=v_d\ \) and \(\ x_{d-1}=v_{d-1}\). For example, the \((d-2)\)-dimensional bottom of \(I_3^{(1)}\) on Fig. 9 is the unit segment \(\ \{(x_1, x_2, x_3): \ 0\le x_1\le 1, x_2 =0, x_3=0\};\) the \((d-2)\)-dimensional bottom of \(I_4^{(1)}\) on Fig. 11 is the unit square \(\ \{(x_1, x_2, x_3): \ 0\le x_1\le 1, 0\le x_2\le 1, x_3 =0, x_4=0\}.\) We say that W is packed along the right edge of \(\ I_d^{(l)} = [l-1,l]\times [0,1]^{d-1}\ \) provided the shortest edge of W is contained in the edge of \(\ I_d^{(l)}\ \) described by conditions: \(\ x_1=l, \ x_2=\cdots = x_{d-1}=1\ \) (see Fig. , where \(B_6\) is packed along the right side of \(I_3^{(1)}\)).

Now we will present an algorithm for packing boxes \(B_i\) of edges not longer than 1 into \(\ I_d^{(1)} \cup \cdots \cup I_d^{(m)}\). Small boxes of type (rs) will be placed into active (rs)-drawers. At the beginning of the packing process all drawers are active. We say that some (rs)-drawer is used for the packing if a box of type (rs) was packed into it. All drawers used for the packing have pairwise disjoint interiors. Not each active drawer will be used for the packing. If a drawer is used for the packing, then it remains active during the whole packing process.

Before we present a detailed description of the packing algorithm, we will give a simple example illustrating how it works.

Example 4.1

Let \(d=3\). Three small 3-dimensional boxes: \(\ B_1=0.6\times 0.3\times 0.3\), \(\ B_2=0.6\times 0.2\times 0.2 \ \) and \(\ B_3=0.6\times 0.3\times 0.3\) are packed in drawers (see Fig. 10). First we choose the drawer into which \(B_1\) should be packed. All six (0, 0)-drawers are active at the beginning of the packing process (only two of them will be used for the packing). The (0, 0)-drawers are numbered with natural numbers in the order showed on Fig. 8. Moreover, all twelve (1, 0)-drawers (see Fig. 8) are active at the beginning of the packing process (only one of them will be used for the packing). The first box \(B_1\) is of type (0, 0) and all (0, 0)-drawers are active. The 1-dimensional bottoms of active (0, 0)-drawers are unit segments. The numbering of active (0, 0)-drawers causes the numbering of their 1-dimensional bottoms (segments): the 1-dimensional bottom of the first active drawer is the first unit segment \(I_1^{(1)}\), the 1-dimensional bottom of the second active drawer is the second unit segment \(I_1^{(2)}\) and so on. We pack the segment which is the bottom of \(B_1\) into \(I_1^{(1)} \cup ... \cup I_1^{(6)}\) by P(1) into \(I_1^{(1)}\). This implies that \(B_1\) is packed into the active (0, 0)-drawer with number 1 in the place \([0,0.6]\times [0,0.3]\times [0,0.3]\). From now on this drawer is used for the packing. Moreover, it is still active and only boxes of type (0, 0) can be packed into it. All drawers contained in the drawer used for the packing (in particular (1, 0)-drawers with numbers 1 and 2) become not active.

The small box \(B_2\) is of type (1, 0). There are ten active (1, 0)-drawers (with numbers: \(3,4,\ldots , 12\)). The 1-dimensional bottoms of active (1, 0)-drawers are unit segments. The bottom of the third (1, 0)-drawer (the first active (1, 0)-drawer) is denoted by \(I_1^{(1)}\), the bottom of the fourth (1, 0)-drawer (the second active (1, 0)-drawer) is denoted by \(I_1^{(2)}\) and so on. We pack the segment which is the bottom of \(B_2\) into \(I_1^{(1)} \cup \cdots \cup I_1^{(10)}\) by P(1) into \(I_1^{(1)}\). This implies that \(B_2\) is packed into the active (1, 0)-drawer with number 3 in the place \([0,0.6]\times [1/3,8/15]\times [0,0.2]\). From now on this drawer is used for the packing. It is still active and only boxes of type (1, 0) can be packed into it. All drawers contained in the drawer used for the packing become not active. Moreover, the second (0, 0)-drawer is not active. The small box \(B_3\) is of type (0, 0). There are five active (0, 0)-drawers (with numbers: 1, 3, 4, 5, 6). The 1-dimensional bottoms of active (0, 0)-drawers are unit segments. The bottom of the first (0, 0)-drawer (the first active (0, 0)-drawer) is denoted by \(I_1^{(1)}\), the bottom of the third (0, 0)-drawer (the second active (0, 0)-drawer) is denoted by \(I_1^{(2)}\) and so on. We pack the segment which is the bottom of \(B_3\) into \(I_1^{(1)} \cup \cdots \cup I_1^{(5)}\) by P(1) into \(I_1^{(2)}\) (there is no empty space in \(I_1^{(1)}\)) . This implies that \(B_3\) is packed into the active (0, 0)-drawer with number 3 in the place \([0,0.6]\times [2/3,29/30]\times [0,0.3]\). From now on this drawer is used for the packing. It is still active: only boxes of type (0, 0) can be packed into it. All drawers contained in the drawer used for the packing (in particular (1, 0)-drawers with numbers 5 and 6) become not active.

Fig. 10
figure 10

Example 3

Packing methodP(d) for\(d\ge 3\)

  • If \(B_i\) is a small box of type (rs), then let \(U_{r,s}\) be the union of all active (rs)-drawers. We can treat the \((d-2)\)-dimensional bottoms of drawers from \(U_{r,s}\) as the union of \((d-2)\)-dimensional unit cubes. We pack \(B_i\) into \(U_{r,s}\) so that the \((d-2)\)-dimensional bottom of \(B_i\) is packed into the union of \((d-2)\)-dimensional bottoms of drawers by \(P(d-2)\) method. If (rs)-drawer D is used for the packing, then all drawers different from D that have a non-empty intersection with int(D) become not active. Moreover, all (pq)-drawers (\(p\ge r+1, q \ge 0\)) contained in the (r, 0)-drawer containing D become not active too.

  • If \(B_i\) is big, then we find the smallest integer l such that \(B_i\) can be packed into \(I_d^{(l)}\) along the right edge of the cube. We pack \(B_i\) along the right edge of \(I_d^{(l)}\) as near to the top as it is possible (see \(B_6\) on Fig. 9, where \(d=3\)). All drawers that have a non-empty intersection with \(int(B_i)\) become not active.

Example 4.2

Figure 9 illustrates the packing method P(3). Small boxes \(\ B_1, \ldots , B_5\ \) are packed in drawers. The first box \(B_1\) (of type (1, 0)) is packed into the first (1, 0)-drawer \(H_1\). This drawer will be active during the whole packing process, only boxes of type (1, 0) can be packed into it. All drawers (different from \(H_1\)) contained in \(H_1\) are not active. The first (0, 0)-drawer is also not active. Boxes \(B_2\) and \(B_5\) are packed into the second (0, 0)-drawer \(H_2\) so that 1-dimensional bottoms of these boxes, i.e., segments of length 0.4 are packed in 1-dimensional bottom of \(H_2\), i.e., unit interval \(I_1^{(1)}\) by P(1). All drawers different from \(H_2\) contained in \(H_2\) are not active. \(B_3\) is packed into the third (2, 0)-drawer \(H_3\). All drawers different from \(H_3\) contained in \(H_3\) are not active. All (1, s)-drawers \((s\ge 0)\) contained in the second (1, 0)-drawer are also not active. \(B_4\) is packed in a similar way.

Fig. 11
figure 11

The (rs)-drawers for \(d=4\)

Example 4.3

Let \(d=4\). Consider small 4-dimensional boxes \(\ B_1=0.24\times 0.24\times 0.24\times 0.24\), \(\ B_2=0.35\times 0.28\times 0.28\times 0.26\), \(\ B_3=0.28\times 0.25\times 0.24\times 0.17\), \(\ B_4=0.26\times 0.26\times 0.26\times 0.18\), \(\ B_5=0.3\times 0.28\times 0.28\times 0.2\), \(\ B_6=0.6\times 0.3\times 0.3\times 0.22\), \(\ B_7=0.4\times 0.25\times 0.22\times 0.06\), \(\ B_8=0.3\times 0.25\times 0.21\times 0.05\), \(\ B_9=0.2\times 0.1\times 0.1\times 0.06\), \(\ B_{10}=0.26\times 0.18\times 0.16\times 0.11\), \(\ B_{11}=0.27\times 0.2\times 0.14\times 0.1\), \(\ B_{12}=0.3\times 0.2\times 0.13\times 0.09\), \(\ B_{13}=0.25\times 0.25\times 0.115\times 0.07\). Denote by \(D_i\) the drawer into which \(B_i\) is packed. Figure 11 illustrates the packing method P(4). The front wall of \(B_1\) is a rectangle \(\ 0.24\times 0.24\ \) and \(\ P(B_1)=\sqrt{2}/3\times 1/3\ \) is (0, 0)-unit. All (0, 0)-drawers are active at the moment. We pack \(B_1\) into the active (0, 0)-drawer with the number 1 in the place \(\ [0,0.24]\times [0,0.24]\times [0,0.24]\times [0,0.24]\). From now on this drawer \(D_1\) is used for the packing. The drawer \(D_1\) is still active. Only boxes of type (0, 0) will be packed into it. All (rs)-drawers (\(r\ge 1\)\(s\ge 0\)) contained in \(D_1\) become not active. The front wall of \(B_2\) is a rectangle \(\ 0.28 \times 0.26\ \) and \(\ P(B_2)=\sqrt{3}/2\times 1/3\ \) is a (0, 0)-unit. Since there is enough empty space in (0, 0)-drawer \(D_1\) used for the packing, we pack \(B_2\) into it. Now \(a_1(2)>1/3\), therefore we pack \(B_2\) into \(D_1\) in such a way that \((d-2)\)-dimensional bottom of \(B_2\), i.e., the rectangle \(a_1(2)\times a_2(2)=0.35\times 0.28\) is placed along the right side of the 2-dimensional bottom \(I_2^{(1)}\) of \(D_1\) as near to the top as it is possible, i.e., in the place \(\ [0.65,1]\times [0.72,1]\times [0,0.26]\times [0,0.28]\) (see Fig. 11, bottom, left).

The front wall of \(B_3\) is a rectangle \(\ 0.24\times 0.17\ \) and \(\ P(B_3)=1/3\times \sqrt{2}/6\ \) is (1, 0)-unit. Since (1, 0)-drawers with numbers 1 and 2 are contained in (0, 0)-drawer \(D_2\) used for the packing and are not active, we pack \(B_3\) into the active (1, 0)-drawer with the number 3 in the place \(\ [0,0.25]\times [0,0.28]\times [1/3,43/75] \times [0,0.17]\). From now on this drawer \(D_3\) is used for the packing. Only boxes of type (1, 0) will be packed into \(D_3\). The second (0, 0)-drawer has a non-empty intersection with the interior of \(D_3\) and is not active, however all drawers contained in the fourth (1, 0)-drawer (in the upper half of the second (0, 0)-drawer) are still active. Remaining boxes are placed in a similar way.

Fig. 12
figure 12

4-dimmensional boxes packing into three (4, 4)-drawers

Example 4.4

Let \(d=4\). Figure 12 illustrates the packing method P(4). We pack a sequence of eighteen 4-dimensional boxes. We use a similar notation as in Example 4.1. A front wall of each box \(B_i\) for \(i=1,\ldots , 18\) is a rectangle \(a_4(i)\times a_3(i)\), where \(\ \sqrt{2}/48<a_4(i)\le \sqrt{2}/24 \ \) and \(1/48<a_3(i)\le 1/24\). Thus the proper unit \(P(B_i)\) for the front wall of \(B_i\) is (6, 0)-unit. This implies that we pack boxes into (6, 0)-drawers. Recall that any (6, 0)-drawer is of the form \(\ 1\times 1 \times \frac{1}{24}\times \frac{\sqrt{2}}{24}\). The first fifteen boxes are packed into the first (6, 0)-drawer, boxes \(B_{16}\) and \(B_{17}\) are packed into the second (6, 0)-box and \(B_{18}\) is packed into the third (6, 0)-drawer (compare Fig. 6, when we can treat \(I_2^{(l)}\) as the 2-dimensional bottom of \(I_4^{(l)}\)). We can give a lower bound for the total volume of packed boxes. By Corollary 3.6 the total area of the 2-dimensional bottoms of \(B_1,\ldots , B_{18}\) packed into \(\ I_2^{(1)}\cup I_2^{(2)} \cup I_2^{(3)}\) is greater than \(2(3-2\sqrt{2})/9\). By Lemma 3.1, the area of the front wall of each \(B_i\) is greater than \(\sqrt{2}/{4}\) times the area of the proper unit \(P(B_i)\), i.e., is greater than \(\frac{\sqrt{2}}{4}\cdot \frac{\sqrt{2}}{24}\cdot \frac{1}{24}\). Thus the total volume packed boxes is greater than \(\frac{1}{1152}\cdot \frac{2(3-2\sqrt{2})}{9}\).

Let

$$\begin{aligned} v_d=(3-2\sqrt{2})\cdot 3^{-d}. \end{aligned}$$

Proposition 4.5

Assume that a box \(B_z\) from the sequence cannot be packed into \(\ I_d^{(1)} \cup \cdots \cup I_d^{(l)}\) by P(d). The total volume of boxes packed in \(\ I_d^{(1)} \cup \cdots \cup I_d^{(l)}\ \) plus the volume of \(B_z\) is greater than \(\ l v_{d} \).

Proof

The proof goes by induction with respect to d.

By Proposition 2.2 for \(d=1\) we have \(\ l/2>l(3-2\sqrt{2})/3=l v_{1}.\) Moreover, by Proposition 3.5 the statement holds for \(d=2\).

Assume that \(\ d \ge 3 \ \) and that the statement holds in each dimension \(\ j \in \{1, 2, \dots , d-1 \}\). This means also that we can assume that if a j-dimensional box is packed into \(I_j^{(l)}\), then the total volume of all packed boxes is greater than \(\ (l-1)\cdot v_{j} \ \) (compare Corollary 2.3 and 3.6).

Denote by \({\mathcal J}_s\) the set of integers \(\ i \in \{ 1,2,\ldots , l \}\ \) such that all big boxes packed into \(I_d^{(i)}\) are contained in \(U_d^{(i)}\).

Clearly, if \(\ j \in \{ 1,2,\ldots , l \} \setminus {\mathcal J}_s\), then the total volume of big boxes in \(I_d^{(j)}\) is greater than \(\ \bigl ( 1 - \frac{2\sqrt{2}}{3} \bigr )\cdot 3^{-d+1} = v_d\).

If \(\ {\mathcal J}_s= \emptyset \), then the sum of volumes of packed big rectangles is greater than \(lv_d\). Otherwise consider the set

$$\begin{aligned} {\mathcal U} = \bigcup _{i \in {\mathcal J}_s} I_d^{(i)}. \end{aligned}$$

Denote by \(\ I_d^{(m_1)}, I_d^{(m_2)},\ldots , I_d^{(m_c)}\), where \( m_1<m_2<\cdots <m_c\), all unit cubes from \({\mathcal U}\) (c is equal to the number of unit cubes in \({\mathcal U}\)). It remains to prove that the total volume of boxes packed in \({\mathcal U}\) plus \(|B_z|\) is greater than \(cv_d\).

If \(B_z\) is small, then let p and q be integers such that \(B_z\) is of type (pq). Let us fix \(r\ge 0\) and \(s\ge 0\), let \(A_{r,s}\) denote the area of (rs)-unit and let \(n_{r,s}\) be the number of (rs)-drawers of \({\mathcal U}\) used for the packing. If there is no drawer used for the packing, then we take \(\ n_{r,s}=0\). Since \(d-2\) edges of each drawer have length 1, the volume of (rs)-drawer equals \(A_{r,s}\).

If \(B_z\) a small box (of type (pq)), then all \(n_{p,q}\) (pq)-drawers used for the packing are called full. Moreover, if either \(B_z\) is big or \(B_z\) is small but \((r,s)\ne (p,q)\), then from among \(n_{r,s}\) (rs)-drawers used for the packing, the first \(n_{r,s}-1\) are called full and the last drawer is almost full. It is possible that almost full drawer contains only one box.

Case 1\(B_z\) is small.

Since \(\ |B_z| > \frac{\sqrt{2}}{4} \cdot |P(B_z)|\), it follows that the area of the front wall of each box packed in (rs)-drawer is greater than \(\frac{\sqrt{2}}{4} \cdot A_{r,s}\). Thus the sum of volumes of all boxes packed in an (rs)-drawer is greater than \(\frac{\sqrt{2}}{4} \cdot A_{r,s}\) times the sum of volumes of \((d-2)\)-dimensional bottoms of these boxes. By the inductive assumption (for \(j=d-2\)), the total \((d-2)\)-dimensional volume of \((d-2)\)-dimensional bottoms of boxes packed in full (rs)-drawers is greater than \(\ (n_{r,s}-1)\cdot v_{d-2}\). Thus, if \(\ (r,s)\ne (p,q)\), then total volume of boxes packed in all full (rs)-drawers is greater than

$$\begin{aligned} \frac{\sqrt{2}}{4} \cdot A_{r,s}\cdot (n_{r,s}-1) v_{d-2}. \end{aligned}$$

Moreover, the sum of volumes boxes packed in all full (pq)-drawers plus the volume of \(B_z\) is greater than

$$\begin{aligned} \frac{\sqrt{2}}{4} \cdot A_{p,q}\cdot n_{p,q}\cdot v_{d-2}. \end{aligned}$$

There are no (0, s)-drawers used for the packing for \(s\ge 1\). Denote by F the union of front walls of (full and almost full) drawers in \(\mathcal U\) used for the packing. Clearly,

$$\begin{aligned} |F| = \sum _{r\ge 1, s\ge 0} n_{r,s} \cdot A_{r,s} + n_{0,0}\cdot A_{0,0} \end{aligned}$$

This implies that the total volume of all packed boxes is greater than

$$\begin{aligned}&\frac{\sqrt{2}}{4} \cdot v_{d-2} \cdot \Bigl [ \sum _{r\ge 1, s\ge 0} (n_{r,s}-1)A_{r,s} +(n_{0,0}-1)A_{0,0}+ A_{p,q} \Bigr ]\\&\quad = \frac{\sqrt{2}}{4} \cdot v_{d-2} \cdot \Bigl [ |F| - \sum _{r\ge 1, s\ge 0} A_{r,s} -A_{0,0} + A_{p,q} \Bigr ] . \end{aligned}$$

Observe that

$$\begin{aligned} \sum _{r \ge 1, s\ge 0} A_{r,s} \le 2\cdot \frac{\sqrt{2}}{9} \end{aligned}$$

(compare the proof of Lemma 3.3 and the bound for |E|). Moreover \(\ |A_{0,0}| = \frac{\sqrt{2}}{9}\ \) and \(\ |A_{p,q}|= \frac{\sqrt{2}}{9} \cdot \Bigl (\frac{1}{2} \Bigr )^{p+q}\). By Lemma 3.3,

$$\begin{aligned} |F| \ge \frac{2\sqrt{2}}{3}c - \frac{2\sqrt{2}}{9} \Bigl ( \frac{1}{2} \Bigr )^{p+q}. \end{aligned}$$

Consequently, the total volume of all boxes packed in \(\mathcal U\) is greater than

$$\begin{aligned}&\frac{\sqrt{2}}{4} \cdot v_{d-2} \cdot \Bigl [ |F| - \sum _{r\ge 1, s\ge 0} A_{r,s} -A_{0,0} + A_{p,q} \Bigr ]\\&\quad> \frac{\sqrt{2}}{4} \cdot v_{d-2} \cdot \Bigl [ \frac{2\sqrt{2}}{3}c - \frac{2\sqrt{2}}{9} \Bigl ( \frac{1}{2} \Bigr )^{p+q} -\frac{2\sqrt{2}}{9} - \frac{\sqrt{2}}{9} + \frac{\sqrt{2}}{9} \cdot \Bigl (\frac{1}{2} \Bigr )^{p+q} \Bigr ]\\&\quad > \frac{\sqrt{2}}{4} \cdot v_{d-2} \Bigl [ \frac{\sqrt{2}}{3}c - \frac{\sqrt{2}}{9} \cdot \Bigl (\frac{1}{2} \Bigr )^{p+q}\Bigr ]\\&\quad \ge \frac{\sqrt{2}}{4} \cdot v_{d-2} \cdot \frac{2\sqrt{2}}{9}c = \frac{1}{9} \cdot cv_{d-2} = cv_d. \end{aligned}$$

Case 2\(B_z\) is big.

If no small box was packed into \({\mathcal U}\), then we take \(t=1\). Otherwise, let t be the greatest integer such that a small box was packed into \(I_d^{(m_t)}\).

If \(\ t \ge 2\), then arguing as in Case 1 we get that the total volume of small boxes packed into \(\ I_d^{(m_1)} \cup I_d^{(m_2)} \cup \ldots \cup I_d^{(m_t)}\ \) is greater than \( (t-1)v_d.\)

It remains to show that the total volume of big boxes packed into \(\ I_d^{(m_t)} \cup I_d^{(m_{t+1})} \cup \ldots \cup I_d^{(m_c)}\ \) plus the volume of \(B_z\) is greater than \( (c-t+1)v_d.\)

First assume that \(\ t=c\), i.e., that \(I_d^{(m_t)}\) is the last unit cube in \({\mathcal U}\). Since \(B_z\) cannot be packed, it follows that the total volume of big boxes packed in \(I_d^{(m_t)}\) plus the volume of \(B_z\) is greater than \(\ \Bigl ( 1 - \frac{2\sqrt{2}}{3} \Bigr )\cdot 3^{-d+1} = v_d\).

Now assume that \(t<c\). In \(c-t\) unit cubes \(\ I_d^{(m_{t+1})}, I_d^{(m_{t+2})}, \ldots , I_d^{(m_c)}\ \) only big boxes was packed. The total volume of big boxes packed in \(\ I_d^{(m_{t+1})}\cup \ldots \cup I_d^{(m_c)}\ \) plus \(|B_z|\) is greater than \(\ \frac{1}{2} \cdot \bigl (\frac{1}{3}\bigr )^{d-1} \cdot (c-t) > (c-t+1)v_d.\)\(\square \)

Theorem 4.6

Any sequence of d-dimensional boxes of edge length smaller than or equal to 1 with total volume not greater than \(\ (3-2\sqrt{2})\cdot 3^{-d}\ \) can be packed online into the d-dimensional unit cube.

Proof

Let \(B_1, B_2, \ldots \) be a sequence of boxes of total volume not greater than \(\ (3-2\sqrt{2})\cdot 3^{-d}\). Assume that \(B_z\) is the first box that cannot be packed into \(I_d^{(1)}\). We use Proposition 4.5 with \(l=1\). The total volume of all boxes packed in \(I_d^{(1)}\) plus the volume of \(B_z\) is greater than \(\ (3-2\sqrt{2})\cdot 3^{-d}\), which is a contradiction. \(\square \)