# 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. Commented Mar 27, 2016 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"?
– JRN
Commented Mar 27, 2016 at 10:20
• @Blue, i'll edit and post it there then, thanks. Commented Mar 27, 2016 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. Commented Mar 27, 2016 at 10:40
• @JoelReyesNoche, odd, i got a notification of -15. either-way, ignore me :) Commented Apr 7, 2016 at 8:08