The maths behind packing objects like those in a jar of sweets was first studied by Johannes Kepler in 1606, after being asked by Sir Walter Raleigh about the stacking of cannonballs on the decks of his ships. The mathematical history of packing objects has been found to be much harder than anyone had anticipated. The subject area is now called Granular Matter and covers a vast range of materials, from the packing of domestic products to industrial processes involving the movement of grains and pellets. A greater understanding of how granular matter moves, twists, spins and breaks is the key to how cost savings can be made during the production process. Yet granular mathematics is still not fully understood and is an area of ongoing research and development.
An approximate method to calculate the number of sweets in a jar, is to multiply the number along the width and length of the base by the number of sweets in the height of the jar.
Granular Matter theory then tells us that on average a jar of mixed shapes will have about a 30% air gap in between the sweets. This percentage value will of course vary depending on the shape of the sweet. For example, an unshaken jar of spherical shaped sweets will have a gap of 39%, but if you gently shake them a few times this will drop to 35%.
For a jar with 6 sweets along both the width and length of the base and a depth of 15 sweets you would need to calculate 6x6x15=540. Then to take account of the gap in between the sweets, reduce this total by thirty percent 0.70×540 giving an answer of 378 sweets in the jar.
Here is a puzzle for you to try:
If a jar has approximately 4 sweets along the width, 5 along the length and a depth of 12 sweets, how many sweets are in the jar?