Sunday, February 26, 2023

The Egg Sandwich Problem, Part II: The Proof

So, we've got an egg sandwich that we're trying to split up into four equal pieces, and the pesky yolk is off-center. We've already figured out how to make the first cut, right along the line that connects the centers of the circles, and the third cut, which is just going to be the same as the second cut - assuming we can find one. The sandwich is definitely cold by now, but let's forge ahead and figure out the second cut. 

My intuition says that there's a way to make one straight diagonal cut through the semicircle of sandwich that will divide both the sandwich and the yolk in two. My reasoning is a bit involved, but let's walk through it in three steps.

Step 1: Forget the yolk, and imagine some ways we could cut the half sandwich in half. We could cut it straight down the middle, and make two quarter-circles. We could cut it lengthwise - that's a bit trickier, because it's hard to tell where exactly to cut it without doing some measuring, but it is possible to get two equal pieces that way. Or, we could cut it at any random angle.




Side Note: It's not super obvious, but it is actually possible to cut any two-dimensional shape in half... at any given angle. I best visualize this when thinking of waving a knife over a piece of cake. Close your eyes and keep your hand steady and maintain the same angle as you pass over the cake. When you've just started, there's more cake on one side of the knife than the other. When you're almost done, it's reversed - the other side has more cake on it. So, at some point during that wave, the amount of cake on both sides of the knife were equal. It's not always easy to find where to stop and cut, but this thought experiment proves that there always is a place to stop.

This key mathematical concept definitely has a name, but I'm going to call it "The Fair Halves Principle". I reserve the right to change that name to something more catchy / appropriate if I think of something better. Okay, so ignoring the yolk, we can divide the sandwich in half in many ways with many angles of cutting!

Now, Step 2: Add the yolk back in, and apply the Fair Halves Principle on the turning knife.

Here's an animation illustrating this. Each of these cuts divides the sandwich in half, and the angle's changing smoothly. (They all hit the centroid of the semicircle, but that's a story for another time.) 




Looking closely, you can see that at the beginning of the animation, there's more yolk on the right/bottom side of the line. At the end, there's more yolk on the left/top side. Because it's a continuous change, we know that at some point, the side that has the most yolk changes from right to left... and exactly at that point, the yolk on both sides must be equal. So, we've proven that there is some cut we can make that will divide both the sandwich and the yolk equally.

But wait a minute, you might be saying. That rotating line only applies when we throw out the yolk! Step 1 relies on the simplicity of the semicircle without having to worry about the yolk. And that's true, so the rotating line above isn't valid for the sandwich + yolk. But here's where Step 3 comes in!

Step 3: at that point we determined in Step 2, where there must exist a line where the yolk is evenly divided, we know two things about that split. One, the yolk on both sides is the same - this is the result of the Fair Halves Principle and Step 2. Two, the halves of the semicircle on both sides is the same - this is the result of the Fair Halves Principle and Step 1. Put them together, and we see that the purple areas (with sandwich and no egg yolk) also must be the same! If the "total sandwich area" and the "yolk area" is the same on both sides of the line, then "the total sandwich area minus the yolk area" must also be the same!

Therefore, we've proven that there exists a line that will work - a cut that will equally divide the yolk and the sandwich. The interesting theoretical work is done; now, we have to actually do the calculations and find the answer so we can eat breakfast!