How many spheres can fit in this box?

HASELBAUER - DICKHEISER TEST #15:

What is the maximum number of one inch-diameter spheres that can be packed into a box ten inches square and five inches deep?

My attempt to solve this:

If i fit 2 spheres in a row, then the next row above it, with the hive pattern (see image), it fits one sphere less. Repeat this for 10 rows, starting with 10 spheres, gives us 95 spheres: $10 + 9 + 10 + 9 + 10 + 9 + 10 + 9 + 10 + 9$

Given that the spheres form an equilateral triangle, either by using $\sin60$ or Pythagoras theorem, the height of this triange, hence the distance between rows, is $2 x r + h$, where $r$ is the radius and $h$ is the triangle height.

sin of $A$ (60 deg) is opposite ($CF$ or $h$) over hypotenuse ($AF$ or $1$), which is $\sqrt{3}/2$ (approx $0.866$). Therefore, $h = 0.866$.

The total height of two rows is then $$0.5 + 0.5 + 0.866 = 1.866.$$ Each row is then $$\frac{1.866}{2} = 0.933.$$ This means 10 could give $9.33$. This is not good enough for a new row.

However, that calculation is wrong.

The gain is what should be calculated. Not the average. The first row uses 1 inch. The second gains $$1 - 0.866 = 0.1339$$

The next row also gains $$0.1339. 9 x 0.1339 = 1.2051,$$ so when used 9 (we don't count the first because it doesn't gain) times we gain one row. So we fit 10 rows and gain an extra one.

Can we reset the stack after 5 rows? i.e. $$(10 + 9 + 10 + 9 + 10) + (10 + 9 + 10 + 9 + 10) = 96$$ This way we lose 4, not 5.

Considering that we gain $0.1339$ per row for 4 rows, then double that, means we gain $1.0712$. Yes. We do gain more.

So, the best pattern may be: $$(10 + 9 + 10 + 9 + 10) + (10 + 9 + 10 + 9 + 10) + 10. = 106.$$

Now stacking these would mean, $106 \times 5 = 530$ total.

If we apply the same pattern to stack them vertically, 4 rows could gain $0.1339$ each, so our gain could be $0.5356$, which only fits half a new row, and we would lose $2 \times 5 = 10$ spheres + the loss of each gap in 3d resulting in $19 + 19$ more.

I believe 530 is the answer.

• I checked meta if posting puzzles is considered a bad idea. Seeing the tag and the fact that I actually want the answer, I think its ok. – ericosg Mar 27 '16 at 10:12
• When you say "ten inches square," do you mean "ten square inches in area" or "a square with a side of ten inches"? – Joel Reyes Noche Mar 27 '16 at 10:20
• @Blue, i'll edit and post it there then, thanks. – ericosg Mar 27 '16 at 10:39
• @JoelReyesNoche, actually, I always took it as 10x10x5, as for it to be 10^2x5 I think it would be squared and not square. But it is unclear. Let's all assume 10x10x5. – ericosg Mar 27 '16 at 10:40
• @JoelReyesNoche, odd, i got a notification of -15. either-way, ignore me :) – ericosg Apr 7 '16 at 8:08

For now the most balls I can pack is 570. If we take the hexagonal close-packing (see Standardized test problem: Packing spheres into a rectangular prism ) then we can pack 570 spheres into the box: Put the rectangle $10\times 5$ on the bottom. The first layer is hexagonal, with 6 rows of 5 balls and 5 rows of 4 balls, so it has 50 balls (Note that $10\sqrt{3}/2+1\sim 9.66<10$). The second layer is such that the centers of three balls in the bottom layer together with the center of a ball form a tetrahedron of side length 1. Then the second layer has 45 balls. We can put 6 layers of 50 and 6 layers of 45, since the height is $11\sqrt{2/3}+1\sim 9.98 <10$, which results in 570 balls.
If you use FCC, you only achieve 562: dividing the box into two boxes of $10\times 10\times 2.5$, and putting in each box a layer of 81 balls between two layers of 100 balls each. The height of the three layers is $1+\sqrt 2\sim 2.414<2.5$.