Prove the smallest cube that can be made from cuboids of a given size. I am given cuboids of size $l\times w\times h$. I know that I can make a cube of side length $lcm(l,w,h)$ from such cuboids. How can I prove that no arrangement of the cuboids (parallel along the 3 axes) can result in a smaller cube size?
For example, if I were given cuboids of size $2^2(3)\times 3^2(5)\times 2(3^2)$, then I know that there is an obvious arrangement of them with which I can make a cube of side length $2^2(3^2)(5)$. But how do I know that some arrangement of such cuboids won't let me make a cube of side length $2(3^2)(5)$? After all, such a cube would have volume $(2(3^2)(5))^3=2^3(3^6)(5^3)$, which is a multiple of the volume of the cuboid ($2^3(3^5)(5)$).
 A: The classical answer is as follows:
Suppose we have a cube of some size which is partitioned into axis-aligned $\ell \times w \times h$ cuboids. Define a function $f$ on this cube by assigning a point $(x,y,z)$ the value $f(x,y,z)=\exp\left(\frac{2\pi i}{\ell}(x+y+z)\right)$. Then give each subset $S$ of the cube the value
$$
   f[S] = \int_{(x,y,z) \in S} f(x,y,z)\,\text{d}x\,\text{d}y\,\text{d}z.
$$
If $S$ is a set of the form $[x_0,x_1] \times [y_0,y_1] \times [z_0,z_1]$, then
$$
   f[S] = \left(\frac{\ell}{2\pi i}\right)^3 \left(e^{\frac{2\pi ix_1}{\ell}}-e^{\frac{2\pi ix_0}{\ell}}\right)\left(e^{\frac{2\pi iy_1}{\ell}}-e^{\frac{2\pi iy_0}{\ell}}\right)\left(e^{\frac{2\pi iz_1}{\ell}}-e^{\frac{2\pi iz_0}{\ell}}\right)
$$
which is zero if and only if at least one of $\{x_1-x_0, y_1-y_0, z_1-z_0\}$ is an integer multiple of $\ell$. In particular, if $S$ is any axis-aligned $\ell \times w \times h$ cuboid then $f[S]=0$.
But $f[S]$ is additive, so if the entire cube $C$ is partitioned into cuboids of these dimensions, then $f[C]=0$. This means that $C$'s side length must be divisible by $\ell$.
The same argument shows that $C$'s side length is divisible by $w$ and $h$ as well, so it must be a multiple of $\operatorname{lcm}(\ell,w,h)$.
