📜 ⬆️ ⬇️

So how many golf balls really fit on a school bus?

I recently read a note on “15 Questions at an interview with Google, because of which you may feel stupid” on the Internet and I didn’t like the very first answer to the very first question. I am a meticulous person, so I decided to mathematically calculate the number of those golf balls.

image

There the reader takes the volume of the bus, divides it into the volume of the ball and gets the number of balls. It deducts, however, a certain amount, given that there are “seats and other nonsense that occupies free space, as well as the spherical shape of the ball means that there will be a lot of free space between them.” Did he take into account correctly?
')
Let's see.

Imagine a box with dimensions of 20x20x20 cm and balls with a diameter of 10 cm. 8 balls fit into such a box:


Did you know that by increasing each side of the box by only ~ 1.5 cm, can you place the 9th ball there? Where? Of course, in the very center. That’s how the balls “strive” to settle down in any space.

Let's calculate everything mathematically. To make it clearer, let's start with the plane.

image

Let d be the diameter of a circle, D be the distance between the circles diagonally. Now we calculate how much we need to increase D, i.e. the distance between the circles to fit another circle between them:

image

We will not delve into the formulas; a spreadsheet will come to our aid:

image

Take the diameter of the circle d 10 cm, immediately calculate D , the empty space between the circles is then equal to Dd . We need to increase this space in order to “shove” another circle there: D2 = d- (Dd ) = 2d-D . The projection on one of the axes, for example x , will be equal to D2x , or D2 divided by the root of 2. Miraculously, D2x = Dd . As we see, we need to increase the sides of the square by 4.14 cm in order to increase the number of circles by 1.

We turn into reality - in 3D:

image

The distance between opposing balls became larger, and the difference D3 , i.e. The number of cm that you need to increase this distance to fit another ball is smaller. In the projection on the axis, this distance is even smaller. As I said at the beginning, we need to increase each box size by only 1.547005 cm.

But what is all this for? And in order to calculate the ratio of the volume of the balls to the volume of the box. In a box with 8 balls, this ratio = 0.5235, with 9 balls = 0.4711. But the more balls, so this ratio will be more accurate. Calculate it.

In the box with 2x2x2 balls we can “shove” another ball, with 3x3x3 8 more (here the ratio of volumes = 0.5056), with 4x4x4 another 27 balls (ratio = 0.5355) ...

And again the spreadsheet comes to the rescue:

image

In the box with 10x10x10 balls (or, more precisely, 1729 balls), the ratio, as we see = 0.6123. Those. balls occupy about 61% of the box volume.

Let's not continue to waste time on trifles, but imagine a box of 1 mln. X1 mln. X1 million balls:

image

We see that the balls occupy 68.02% of the volume of the box. It makes no sense to increase further, because further unnecessary accuracy will go.

Let's return to our rams bus. Let 500,000 balls, I think, be in view of the seats, as well as the fact that the floor level in the bus is not at the mark of +0.0 m, but without the "spherical shape of the ball." But with all the amendments, the number of golf balls in the school bus = 500,000 x 0.68017 = 340087

So here!

Source: https://habr.com/ru/post/112731/


All Articles