Sunday 15 September 2024

Compressing a Hollow Cube


Rewatching the movie "Transformers", my attention was caught by the giant (presumably hollow) cube made up out of many tiny "unit" cubes, that reassembled itself into a much smaller solid cube. This got me thinking about what volume a hollow cube could be compressed into to form a solid cube. Let's consider a  hollow cube with a side of \(n\) units. It has a volume of \(n^3\) cubic units with a hollow centre of \( (n-2)^3 \) cubic units . Thus the number of unit cubes are:$$\begin{align} n^3 - (n-2)^3 &= 2 (n^2 + n(n-2) + (n-2)^2) \\ &= 2(n^2+n^2-2n+n^2-4n+4)\\ &=2(3n^2-6n+4) \end{align}$$Using this formula we can determine the size of the solid cube that can be formed from the unit cubes and how many blocks are left over from this process. See Table 1.


Table 1: permalink

From Table 1 we can see that 216 of the 218 unit cubes that comprise a hollow cube of side 7 units can be used to form a solid cube of side 6 units with only two cubes left over. See Table 2.


Table 2

Also we can see that 13824 of the 13826 unit cubes that comprise a hollow cube of side 49 units can be used to form a solid cube of side 24 units with only two cubes left over. See Table 3.


Table 3

Looking beyond the figures in Table 1, we find that hollow cubes with sides of 163, 385, 751 and 1297 units also compress to solid cubes with sides of 54, 96, 150 and 216 units with two cubes left over (permalink).

We can summarise the results for the "2 left over hollow to solid cubes" as follows:

  • (7, 6) gives 62.97 % ratio of volumes (solid to hollow)
  • (49, 24) gives 11.75 % ratio of volumes (solid to hollow)
  • (163, 54) gives 3.636 % ratio of volumes (solid to hollow)
  • (385, 96) gives 1.550 % ratio of volumes (solid to hollow)
  • (751, 150) gives 0.7968 % ratio of volumes (solid to hollow)
  • (1297, 216) gives 0.4619 % ratio of volumes (solid to hollow)

Naturally as the side length of the hollow cube increases, the ratio of the volume of the solid cube to its hollow counterpart decreases rapidly as more and more empty space is formed inside. For example, in the case of the 751 hollow cube, the ratio of the solid to hollow volumes in less than 1%. It can be noted that none of the sides of the "2 left over hollow to solid cubes" have any factors in common.

Let's see if there's a pattern in the sides of the hollow and solid cubes:
  • 7 = 7 and 6 = 2 * 3
  • 49 = 7^2 and 24 = 2^3 * 3
  • 163 = 163 and 54 = 2 * 3^3
  • 385 = 5 * 7 * 11 and 96 = 2^5 * 3
  • 751 = 751 and 150 = 2 * 3 * 5^2
  • 1297 = 1297 and 216 = 2^3 * 3^3
It can be seen that the solid cubes all contain "6" as a factor. Let's investigate further. Is it possible that a hollow cube with integer sides can be collapsed into a solid cube of integer side \(x\) with no unit cubes left over? If it were possible then we would have:$$ \begin{align} 2(3n^2-6n+4) &= x^3\\6n^2-12n+8 &= x^3\\x &= (6n^2-12n+8)^{1/3}  \end{align}$$Now testing up to \(n=10000\), the expression on the LHS of the equation above never produces a whole number. I'll test for larger values of \(n\) later.

What about when there are two unit cubes left over. In that case we have:$$ \begin{align} 2(3n^2-6n+4) &= x^3+2\\6n^2-12n+6 &= x^3 \\ x &= (6n^2-12n+6)^{1/3} \end{align} $$Now in this case, up to \(n=10000\), we get all the solutions shown above plus some more. These are shown in Table 4.


Table 4: permalink

So the key equation to work with is \(6n^2-12n+(8-a) \) where \(a\) is the number of unit cubes left over. Up to 10000, there are no solutions for \(a=0\) and \(a=1\) but with \(a=2\) we get the solutions shown in Table 4. Going back to Table 1 and using the values of \(a\) shown there in the column "blocks wasted" will produce other tables of solutions as shown in Table 4. There's more to be discovered here but this post is at least a start.

No comments:

Post a Comment