Last Friday, my residential college offered everyone the chance to take a little field trip. We piled on a school bus and headed to Bishop’s, a local orchard about 15 miles east of New Haven for nearly two hours of glorious New England apple picking. The last time I went apple picking was at least seven years ago as a tiny elementary student, so getting to experience this again was like reliving my childhood! I also thought of some relevant mathematical problems and analogies to class selection along the way, hence the title.
We were each given a four-quart bag and were told that it would contain about eight to ten apples. As a greedy person who loves optimization problems, this posed a challenge. Was it possible to fit more apples? What’s the maximum number of apples one could fit in the bag?
There were many different apples available, and only so much space, much like how with Yale classes, there are so many cool and fun classes to pick, yet so few credits available to take each year (you may applaud for this incredible analogy now). As an indecisive but definitively STEM-y person, I opted to take five STEM classes (ASTR 080, EENG 200, CPSC 201, MATH 241, PHYS 260) to try and decide which field to major in. But this schedule, albeit very fun so far, comes at a cost— I still have interests in history, music, writing, etc., but I can’t take any classes and explore these areas because I’ve already allocated all of my credits toward exploring STEM. And although the purpose of this schedule was to decide on a major, even a month in, I am just as indecisive as I was before. Is it “worth it,” one may ask? Well, that’s a question I can’t answer. I am sure that had I changed my schedule to be something different, I would be envious of my current actual schedule to an extent, and that is something that is impossible to quantify.
Back to apples. When choosing an apple, two considerations have to be kept in mind— the number of apples in the future and the number of apples already chosen. A given apple may seem to be the best at the time, but there’s always the chance that a better apple lies ahead! Committing space in the bag to an apple means that there’s less space for these better apples in the future. Ten apples is not a lot of space; it reduces down to just a few apples per type and even fewer if the apples are big (like the Mutsu apples I decided to forego, which were massive and would have probably reduced my total yield by about half). So, picking the best apple is crucial. Of course, I could have gone through the complicated math of defining indicator variables and converting the scenario into an optimal stopping problem and applying the odds algorithm to find when to stop picking apples to get the best possible ones, but I didn’t. The fact remains that the apples are all of excellent quality and the enjoyment I would get from them would be virtually the same anyway and not worth the over-meticulous planning. Again, the same can be said about Yale classes.
Once they have been chosen, packing the apples can be reduced to a mathematical problem: assuming apples are approximately spherical, what’s the most efficient way to pack apples in a given space? In three-dimensional space, the one we all know and love, this has been solved to an extent; optimally, spheres can fill up to about 74% of space (given space infinitely large in all directions), which can be achieved by stacking a few nice hexagonal lattices on top of each other, or given a bunch of spheres in a random configuration, closer to 64%. I’ll leave out the nitty-gritty of the math here, but assuming apples are approximately 4-centimeter-radius spheres, a four-quart bag should be able to contain about 9 to 10 or so apples, which is pretty close to what the suggestion was. However, I managed to fit 13:
This wasn’t very stable, but it worked, which is all that matters.
Pulling upwards on the handle created an inward force to support the apples, letting me stack a few extra on top. Sometimes, math and planning can’t account for everything.
And finally, the most important thing about the trip: were the apples tasty?
Please don’t sue me, Apple.
Indeed they were.