Can You Solve the Tricky Mathematical Treat?
A large bag of candy contains a few peanut butter cups, while the rest is candy corn. You randomly pick out some peanut butter cups. Can you estimate how much candy corn is in the bag?
Welcome to Fiddler on the Proof! The Fiddler is the spiritual successor to FiveThirtyEight’s The Riddler column, which ran for eight years under the stewardship of myself and Ollie Roeder.
Each week, I present mathematical puzzles intended to both challenge and delight you. Beyond these, I also hope to share occasional writings about the broader mathematical and puzzle communities.
Puzzles come out Friday mornings (8 a.m. Eastern time). Most can be solved with careful thought, pencil and paper, and the aid of a calculator. Many include “extra credit,” where the analysis gets particularly hairy or where you might turn to a computer for assistance.
I’ll also give a shoutout to 🎻 one lucky winner 🎻 of the previous week’s puzzle, chosen randomly from among those who submit their solution before 11:59 p.m. the Monday after that puzzle was released. I’ll do my best to read through all the submissions and give additional shoutouts to creative approaches or awesome visualizations, the latter of which could receive 🎬 Best Picture Awards 🎬.
This Week’s Fiddler
It’s Halloween time! While trick-or-treating, you encounter a mysterious house in your neighborhood.
You ring the doorbell, and someone dressed as a mathematician answers. (What does a “mathematician” costume look like? Look in the mirror!) They present you with a giant bag from which to pick candy, and inform you that the bag contains exactly three peanut butter cups (your favorite!), while the rest are individual kernels of candy corn (not your favorite!).
You have absolutely no idea how much candy corn is in the bag—any whole number of kernels (including zero) seems equally possible in this monstrous bag.
You reach in and pull out a candy at random (that is, each piece of candy is equally likely to be picked, whether it’s a peanut butter cup or a kernel of candy corn). You remove your hand from the bag to find that you’ve picked a peanut butter cup. Huzzah!
You reach in again and pull a second candy at random. It’s another peanut butter cup! You reach in one last time and pull a third candy at random. It’s the third peanut butter cup!
At this point, whatever is left in the bag is just candy corn. How many candy corn kernels do you expect to be in the bag?
This Week’s Extra Credit
You move on to the next house in your neighborhood, which is even more mysterious.
The owner of this house presents you with a similarly large bag, which they say has exactly N peanut butter cups, where N ≥ 3. The remainder of the bag is filled with some unknown quantity of candy corn kernels, with any amount of them again being equally likely.
You reach into the bag k times, with 3 ≤ k ≤ N, and pull out a candy at random. Each time, it’s a peanut butter cup!
How many candy kernels do you expect to be in the bag?
Making the Rounds
There’s so much more puzzling goodness out there, I’d be remiss if I didn’t share some of it here. This week, I’m sharing a physics puzzle that Anders Sandberg posed to OpenAI’s o1-preview. It was restated by Greg Egan as follows:
At what angle should you throw a projectile—subject to uniform gravity, and ignoring air resistance—in order to maximize the length of its trajectory?
Note that this isn’t asking you to maximize the horizontal distance traveled, for which the answer is commonly known to be 45 degrees. (That’s apparently the trap prior GPTs fell into.) Instead, the goal here is to maximize the length of the parabolic arc the projectile follows.
Want to Submit a Puzzle Idea?
Then do it! Your puzzle could be the highlight of everyone’s weekend. If you have a puzzle idea, shoot me an email. I love it when ideas also come with solutions, but that’s not a requirement.
Last Week’s Fiddler
Congratulations to the (randomly selected) winner from last week: 🎻 Thomas Draganski 🎻 from Evanston, Illinois. I received 54 timely submissions, of which 46 were correct—good for an 85 percent solve rate.
Last week, I had a large, hemispherical piece of bread with a radius of 1 foot. I wanted to make a bread bowl by boring out a cylindrical hole with radius r, centered at the top of the hemisphere and extending all the way to the flat bottom crust.
What should the radius of my borehole have been to maximize the volume of soup my bread bowl could hold?
Solver Tom Singer created a nice diagram for what was happening here:
The dashed rectangle enclosed the region you bored out. There was a “cap” that was no longer attached to the remainder of the bowl, and the green region represented the volume of your soup, which was indeed a cylinder.
If the hemispherical bread had radius R and the borehole (and thus, the cylinder of soup) had radius r, then the height h of the soup cylinder was √(R2−r2), by the Pythagorean theorem. The problem stated that R was 1 foot, so h was √(1−r2).
The volume of a cylinder with radius r and height h is 𝜋r2h. Plugging in your expression for h meant the volume V was 𝜋r2√(1−r2). Here’s a graph showing how V varied with r:
When r was close to 0, you had a very narrow cylinder that couldn’t hold much soup. And when r was close to 1, you had a very shallow cylinder that again couldn’t hold much soup. The volume was maximized somewhere in between, and favored a larger radius r, since the volume was proportional to the square of r (but only the first power of h).
To maximize V(r) = 𝜋r2√(1−r2), you could inspect the graph (for an approximation) or set the derivative of V with respect to r equal to zero (for an exact solution). By the product and chain rules, thid derivative was:
Setting this equal to zero meant the two terms inside the parentheses had to be equal, which resulted in the equation 2(1−r2) = r2. Solving this gave you r = √(2/3), or about 0.8165 feet. (If you rationalized the denominator and gave an answer of √(6)/3, you were still marked correct, of course. But I may have judged you a little when reading your answer.)
Plugging this radius back into the formula for the cylinder’s volume meant the optimal bread bowl held approximately 1.21 cubic feet of soup, whereas the original piece of bread had a volume of 2/3·𝜋, or 2.09 cubic feet. In other words, your soup occupied more than half the space taken up by the original hemisphere of bread. This bowl of soup was fairly efficient, and therefore fairly delicious!
Last Week’s Extra Credit
Congratulations to the (randomly selected) winner from last week: 🎻 Leonardo Pedroso 🎻 from Lousã, Portugal. I received 38 timely submissions, of which 20 were correct—good for a 53 percent solve rate. (I don’t think the below-average solve rate was indicative of any conceptual complexity this time around, but rather the challenge imposed by some inevitably messy calculus. But I’m getting ahead of myself!)
Instead of a hemisphere, now suppose my bread was a sphere with a radius of 1 foot.
Again, I made a bowl by boring out a cylindrical shape with radius r, extending all the way to (but not through) the curved bottom crust of the bread. The central axis of the hole had to pass through the center of the sphere.
What should the radius of my borehole have been to maximize the volume of soup my bread bowl could hold?
Keep reading with a 7-day free trial
Subscribe to Fiddler on the Proof to keep reading this post and get 7 days of free access to the full post archives.