Fill a cube with small cubes with different integer side lengths

752 Views Asked by At

We are given two (potentially unlimited) sets of cubes, say red cubes (with side $n$) and white cubes (with side $m$), with $m,n \in \mathbb{N} \setminus \{0\}, m \neq n$ (let's assume $n>m$).

Using the same number of red and white cubes, "build" a bigger cube, in the sense that this bigger cube is tessellated with the small cubes.

What is the minimum length $\mathfrak{L}_{n,m}$ of the side of the big cube (as a function of $m$ and $n$)? (How many small cubes are used?)

As noted by @achillehui, we have

$$ \mathfrak{L}_{an,am} = a \mathfrak{L}_{n,m}, \quad a \in \mathbb{N} \setminus \{0\},$$

so it suffices to consider the case $\text{gcd}(n,m)=1.$

  • $\mathfrak{L}_{n,m}^1 = \text{lcm}(l,\frac{L}{l^2}(m^3 + n^3))$ is a solution (check my answer below for the details)

  • $\mathfrak{L}_{n,m}^2 = n (m^3 + n^3)$ is a solution (due to @Logophobic)

  • $\mathfrak{L}_{n,m}^3 = m (m^3 + n^3)$ and $\mathfrak{L}_{n,m}^4 = 2m (m^3 + n^3)$ are solutions for some pairs $(n,m)$.

None of them is minimal, since we have

$$ \mathfrak{L}_{4,2}^1 = 36, \quad \mathfrak{L}_{4,2}^2 = 288 $$

while $\mathfrak{L}_{4,2} = 12$ is also a solution.

2

There are 2 best solutions below

3
On

I write here what I have in mind; this shows that there exists a solution for all pairs $(n,m)$.

  • Step 0: Let

$$ l = \text{lcm}(m,n) \\ L= \text{lcm} \left( \frac{l^2}{m^2},\frac{l^2}{n^2} \right) \\ \mathfrak{L} = \text{lcm} \left(l, \frac{L}{l^2} (m^3 + n^3) \right) $$

  • Step 1: Let us denote by $C_1$ a square cuboid of size $l \times l \times n$, made of $(l/n)^2$ red cubes.

  • Step 2: Let us denote by $C_2$ a square cuboid of size $l \times l \times m$, made of $(l/m)^2$ white cubes.

  • Step 3: Square cuboid $C_3$ is made by stacking up some $C_1$'s so that it contains L red cubes. In order to do this, we stack up $ \frac{L}{\frac{l^2}{n^2}} = \frac{L n^2}{l^2}$ cuboids $C_1$; since the heigth of $C_1$ is $n$, $C_3$ has dimensions

$$ l \times l \times \frac{L n^3}{l^2} $$

  • Step 4: Analogously to Step 3, square cuboid $C_4$ is obtained by stacking up $\frac{L m^2}{l^2}$ cuboids $C_2$, contains $L$ white cubes and has dimensions

$$ l \times l \times \frac{L m^3}{l^2} $$

  • Step 5: now we stack up one cuboid $C_3$ and one cuboid $C_4$ and this gives cuboid $C_5$; $C_5$ contains $2 L$ cubes ($L$ red and $L$ white) and has dimensions

$$ l \times l \times \left( \frac{L n^3}{l^2} + \frac{L m^3}{l^2} \right) = l \times l \times \frac{L }{l^2} (m^3 + n^3)$$

  • Step 6: Using $$\frac{\mathfrak{L}}{l} \cdot \frac{\mathfrak{L}}{l} \cdot \frac{\mathfrak{L}}{\frac{L }{l^2} (m^3 + n^3)} $$ cuboids $C_5$, we can build the big cube, with dimensions $\mathfrak{L} \times \mathfrak{L} \times \mathfrak{L}$. This cube contains $$ \frac{\mathfrak{L}}{l} \cdot \frac{\mathfrak{L}}{l} \cdot \frac{\mathfrak{L}}{\frac{L }{l^2} (m^3 + n^3)} \cdot 2L = \frac{2 \mathfrak{L}^3}{m^3 + n^3} $$ small cubes (half red and half white).

Case $(n,m)=(3,2)$

Here is what we get when $n=3$ and $m=2$ are put into the solution.

  • We have $l=6, L=36, \mathfrak{L}=210$.

  • Cuboid 3: $6 \times 6 \times 27$, made of 36 red cubes.

  • Cuboid 4: $6 \times 6 \times 8$, made of 36 white cubes.

  • Cuboid 5: $6 \times 6 \times 35$, made of 36 red cubes and 36 white cubes (cuboid 3 + cuboid 4)

  • Cube: $210 \times 210 \times 210$, using $7350 (=35 \cdot 35 \cdot 6)$ cuboids 5; there are $264600 (=7350 \cdot 36)$ white cubes and $264600$ red cubes.


Case $\text{GCD}(m,n)=1$

If $m$ and $n$ are coprime, then the expression can be simplified

$$ l = mn, \quad L= m^2 n^2, \quad \mathfrak{L}=m n (m^3 + n^3) $$

$ 2 m^3 n^3 (m^3 + n^3)^2$ cubes are used ($m^3 n^3 (m^3 + n^3)^2$ for each color).


Case $n=a m$

$$ l = n, \quad L= a^2, \quad \mathfrak{L}= n (1 + a^3) $$

$ 2 n^3 \left(1 + \left(\frac{n}{m}\right)^3\right)^2$ cubes are used ($n^3 \left(1 + \left(\frac{n}{m}\right)^3\right)^2$ for each color).

6
On

Your solution is not minimal. I will provide a few examples.

I previously suggested that $\mathfrak{L} = m(m^3+n^3)$ is always a solution. That assumption proved false. However, $\mathfrak{L} = n(m^3+n^3)$ is a solution, though not always minimal.

Case $(n,m)=(3,2) : \mathfrak{L} = m(m^3+n^3) = 70$

  • Cube $70 \times 70 \times 70$ can be filled with $(m^3+n^3)^3=42,875$ cubes $m$
  • Replace $n^3(m^3+n^3)^2=33,075$ cubes $m$ with $m^3(m^3+n^3)^2=9,800$ cubes $n$
  • Cube $70 \times 70 \times 70$ then contains $9,800$ each of cubes $m$ and $n$

Case $(n,m)=(5,2) : \mathfrak{L} = n(m^3+n^3) = 665$

  • Cube $665 \times 665 \times 665$ can be filled with $(m^3+n^3)^3=2,352,637$ cubes $n$
  • Replace $m^3(m^3+n^3)^2=141,512$ cubes $n$ with $n^3(m^3+n^3)^2=2,211,125$ cubes $m$
  • Cube $665 \times 665 \times 665$ then contains $2,211,125$ each of cubes $m$ and $n$

Case $(n,m)=(4,2) : \mathfrak{L} = 12$

  • Cube $12 \times 12 \times 12$ can be filled with $27$ cubes $n$
  • Replace $3$ cubes $n$ with $24$ cubes $m$
  • Cube $12 \times 12 \times 12$ then contains $24$ each of cubes $m$ and $n$

I have revised my solution for $\mathfrak{L}_{n,m}=km$ to be stated more clearly. I have also taken into account achille hue's observation that $\mathfrak{L}_{dn,dm} = d\mathfrak{L}_{n,m}$ so this solution assumes $\text{gcd}(n,m)=1$ $$\mathfrak{L}_{dn,dm} = d\mathfrak{L}_{n,m}=kdm\\ \text{where $k$ is the least positive integer satisfying}\\(m^3+n^3)|k^3 \text{ and } \left\lfloor\frac{k}{n}\right\rfloor^3 \ge \frac{k^3}{(m^3+n^3)}$$ Unfortunately, this still does not guarantee a minimal solution because we could also find $$\mathfrak{L}_{dn,dm} = d\mathfrak{L}_{n,m}=kdn\\ \text{where $k$ is the least positive integer satisfying}\\(m^3+n^3)|k^3 \text{ and } \left\lfloor\frac{k}{m}\right\rfloor^3 \ge \frac{k^3}{(m^3+n^3)}$$ Which will in some cases provide a more minimal solution. Case in point: $$\mathfrak{L}_{5,3}=38n=190 \lt \mathfrak{L}_{5,3}=76m=228$$ Proof that such cubes can be constructed:

  • Cube with edge length $kdm$ will have $\frac{(km)^3}{(m^3+n^3)}$ of each cube size.
  • This is an integer because $(m^3+n^3)|k^3$
  • The cube can be filled with $k^3$ cubes $dm$
  • $n^3$ cubes $dm$ in sub-cube with edge length $dnm$ can be replaced with $m^3$ cubes $dn$
  • This replacement must be repeated $\frac{k^3}{(m^3+n^3)}$ times so that the cube contains $\frac{(km)^3}{(m^3+n^3)}$ cubes $dn$
  • The replacement can be completed because $\left\lfloor\frac{k}{n}\right\rfloor^3 \ge \frac{k^3}{(m^3+n^3)}$

Using $\mathfrak{L}_{3,2}=35m$ as an example (this is the same as Case $(n,m) = (3,2)$ above.)

  • Cube with edge length $70$ will have $\frac{70^3}{35} = 9800$ of each cube
  • The cube can be filled with $35^3 = 42,875$ cubes $m$
  • $27$ cubes $m$ in sub-cube with edge length $6$ can be replaced with $8$ cubes $n$
  • This replacement must be repeated $\frac{35^3}{35} = 1225$ times so that the cube contains $9800$ cubes $n$
  • The replacement can be completed because $\left\lfloor\frac{35}{3}\right\rfloor^3 = 11^3 = 1331 \gt 1225$