Saturday, January 14, 2023

The Egg Sandwich Problem, I

Sometimes, a problem is so interesting that I can’t help but drop everything to think about it. That was what happened at breakfast a few days ago, when my family and I were trying to making egg sandwiches, consisting of a fried over easy egg, a piece of cheese, and a Panera bagel. There’s four of us, and due to a kind Panera employee, there was an extra bagel. (Yes, I in particular made the judgement call that a Panera bagel was worth it, but it was better to make the sandwich part at home rather than paying the premium.)

So, we made the extra sandwich, and went to divide it equally. It’s pretty easy to split a round sandwich – just cut it in half along a diameter, and then in half again with the perpendicular diameter.

But there was a problem: the yolk on the fried egg was off-center, like yolks always are. Splitting the sandwich in the usual way would result in an unfair split of the yolk.

And it was at this point that I abandoned the idea of eating breakfast and went to find some paper.

So, here’s the problem. Given an egg sandwich, with the yolk off-center, is it possible to divide the sandwich into four equal pieces so that everyone gets the same amount of sandwich and the same amount of yolk?

Let’s start with some assumptions.

Bagels are round, so we can approximate the sandwich itself as a perfect circle. The bagel we were working with didn’t have a hole in the center (thank Panera’s Asiago bagel design for that simplification), so we don’t have to worry about that, either. 

Fried eggs aren’t usually round, but the pan we used to fry them in is tiny and made specifically for frying a single egg at a time, so we can approximate the egg as a perfect circle. 

The fried egg is about the same size as the bagel, so we can assume that they are perfectly aligned and the same shape and size. 

The yolk of an egg is more or less a perfect sphere, and in a fried over easy egg, we can disregard the dome shape of the cooked yolk and approximate it as a circle. Notably, this circle is smaller than the circle of cooked egg white, and it’s also fully contained within the circle. 

There’s a subtler assumption here about the size of the yolk compared to the egg, but I don’t know how to formalize it yet. 

The yolk of a fried egg is not necessarily in the center of the egg. If it were, this problem would be trivial. 

The cheese we used was a square of sharp cheddar, and I’m going to disregard it completely – we’re only optimizing for equal amounts of egg, bagel, and yolk.

 

Now, we move to intuition. My intuition says that to divide this into four pieces, the case with which I found this presented, it’ll be easier to divide the sandwich into two equal pieces and subdivide the equal pieces. We can exploit the symmetry of the diagram for this – if a circle is contained inside another circle, and they’re not necessarily concentric, you can draw a line between their centers to find an axis of symmetry for the combined shape. In this way, if we’re cutting this up for four people, we get a “free” first cut – no matter where the yolk is, we’re guaranteed to be able to make this cut.

And now that we have two identical pieces, and one cut already made, you can see that the third cut is also made for us. If we find a way to divide one of the pieces equally, we can just repeat that cut on the other piece, and we’ll have four equal pieces!

Now, the second cut is the hard part. How can we make a cut that divides both the sandwich and yolk equally? Is such a cut possible for any possible position that the yolk can be in? We’ll have to delve into that next time, because there’s a fancy animation I’m trying to make that is taking forever. Hopefully it ends up working and you can see it next time!

No comments:

Post a Comment