żěè¶ĚĘÓƵ

How maths can help you create the perfect Christmas Day

Present-buying, turkey-carving, how to pull a cracker… this year Jacob Aron decided to see if mathematics could help him calculate the perfect Christmas

How maths can help you create the perfect Christmas Day

No matter how well you plan Christmas, something always seems to go wrong. Even if you start gearing up for the big day in the middle of September, one mistimed stint in the oven or even a sudden mince pie shortage is enough to take the shine off your Yuletide.

That’s why this year I’ve decided to see if mathematics can help me pull off the perfect Christmas. After all, if maths can explain the mysteries of the universe, helping out with a little winter fun should be no problem.

The guests

Before anything else, I have to figure out who to invite. I decided my Christmas should be pretty low-key – a total of six people – but with a bigger crowd you might be worried about how guests will get along. Ideally you want a core of people who know each other to get conversation flowing, but for a great party you should also invite a few mutual strangers you hope will hit it off.

According to Ramsey’s theorem, named after British mathematician Frank Ramsey, any party with six or more guests will always feature at least three who know each other, or at least three who don’t. My Christmas nearly fulfils both conditions at once: my wife Lottie, her sister Martha and Martha’s boyfriend Nick all know each other, but Nick hasn’t met our friends Josephine and Chris. Unfortunately for mathematical neatness, the two of them aren’t strangers: they’re a couple.

But what if you want to guarantee a larger number of friends or strangers? Over the years mathematicians have tried to calculate the , R(m,n), which tell you the number of people, R, needed to ensure m friends or n strangers, but it’s tricky. The number of possibilities grows so rapidly as the size of your party increases that while R(4,4) is known to be 18, mathematicians have only pinned R(5,5) down to between 43 and 49. Hungarian mathematician Paul Erdős once said that if aliens demanded an accurate calculation of R(5,5) within a year to deter an invasion, we could probably just about do it – but if they demanded R(6,6), we would be better off launching a pre-emptive attack.

Thankfully no aliens are invited to my Christmas, so with the guests lined up I had better start thinking about food.

The food

How maths can help you create the perfect Christmas Day

Whipping up a traditional Christmas dinner of turkey and all the trimmings requires some basic arithmetic to ensure everything finishes cooking at the same time, but is there anything that more advanced maths can do to make my meal really zing?

Browsing through some maths papers, I come across the spicy chicken theorem, by at New York University and his colleagues. Not your traditional Christmas fare, perhaps, but let’s run with it. Suppose you have a bunch of chicken breasts that you’re planning to chop up and marinate in a spicy sauce before frying, to give it a crisp outer coating. Is it possible to cut the breasts so that everyone gets an equal amount of succulent chicken and spicy skin?

The team also proposes a vegetarian version of the problem that swaps spicy chicken out for roast potato – an essential part of Christmas dinner. I study the proof in detail, trying to figure out some cooking instructions to ensure all my guests get a fair share, but it’s just too advanced. I get in touch with Aronov for help; bad news, he says, as the proof is non-constructive. That means they have proved it is definitely possible to cook my potatoes fairly, but they have no idea how to actually go about it. Guess I’ll stick to the real recipe books then.

The crackers

How maths can help you create the perfect Christmas Day

If there’s one thing that makes a meal truly Christmassy, it’s pulling crackers. But don’t you hate that slightly awkward moment after the bang goes off, when you have to redistribute paper hats and bad jokes to the less successful guests? In a traditional cracker pulling, where everyone crosses arms and pulls at the same time, you’ve got a 25 per cent chance of ending up with nothing. Can maths help make everyone a winner?

If we set aside all those who won in the first round of pulling – some of whom may have lucked out with a double cracker win – and keep going until everyone has won, in the worst-case scenario of a double cracker win each time I’ll need to buy at most two crackers per person to make sure there are enough.

But I don’t want to blow my whole party budget on crackers, so I by David Clifford of CSIRO, Australia’s national science agency, and his colleagues. They have simulated all the possible outcomes, and found that on average you will need eight crackers to ensure a party of six all go home happy, although to be 95 per cent certain you are better off with nine.

Sure enough, on the first round Josephine and Nick win two crackers each, leaving Chris and Lottie with none. When they pull again, Chris gets two, meaning Lottie has to pull one by herself – which means we’ve used nine crackers, just as predicted.

As the team points out, this method does still waste crackers, so it’s possible to get more frugal. Instead of pulling in a circle, pair people up and have them pull an individual cracker, then move on to a new round featuring only the losers. The loser at the end has to pull a cracker by themselves, as Lottie had to. It will take a bit longer, but you will only need as many crackers as there are people. It’s hardly very festive though, which is why Clifford and colleagues dub it the Scrooge system.

The dessert

Paper hats jauntily in place, we tuck in. Fortunately no one grumbles about uneven potatoes, and before long it’s time for dessert: yule log and two other cakes. Mathematicians have devoted a surprising amount of time to studying ways of dividing cakes, often because a mathematical cake can stand in for a variety of other resources – but I’m interested in the real thing.

Initially we try a fairly basic method, in which one person sweeps a knife across the cake from left to right. The first of the others to shout out when they think the piece to the left of the knife is fair gets that slice, and the game continues until all the cake is gone. You might think this would work well on the elongated yule log, but Chris panics, calling it far too early and ending up with a pitiful slice, while a nail-biting finish leaves Lottie with a massive piece.

This scenario nicely describes why mathematicians say the moving-knife procedure isn’t “envy-free” – because the size of another player’s piece can make you feel hard done by. But designing an envy-free method that works in all situations is taxing. For two people, the old “I cut, you choose” method works just fine. For three – let’s call them Alice, Bob, and Carol – things get more complicated.

There are a few three-person techniques to choose from, but I’ve gone for the Selfridge–Conway procedure. Alice cuts the cake into three pieces she believes are equal. Bob takes what he thinks are the two largest, and trims them to be the same size, putting aside the trimmings. Carol picks what she thinks is the largest of the three to be her slice, followed by Bob, who must pick the trimmed piece if Carol hasn’t already. Alice gets what’s left. Finally, Carol divides the trimmings into three, and Bob, Alice and Carol take their pick in order – unless Carol took the trimmed piece to begin with, in which case her role is swapped with Bob.

Confused? Essentially it’s extending the principle of “I cut, you choose” – the less choice you have over the division of the cake, the more choice you get over which piece to take. Three of us attempted this method with a salted caramel cake, and found we were all terrible at dividing into threes, but for the most part everyone was happy with their share.

But with six people at the party, sharing a cake between three isn’t very sociable. For the final cake, a white chocolate and strawberry number, we turned to the Robertson-Webb protocol, an envy-free method that works for any number of people. It involves repeated rounds of splitting the group into those satisfied and disappointed with the size of all of the slices, and continuing to divide until everyone is happy. The theory is sound, but after repeated cuttings and selections we ended up with a cake that was so finely sliced and mucked about with that it was basically inedible. That’s certainly one way of minimising envy.

The presents

How maths can help you create the perfect Christmas Day

With the food over, our minds turned to presents. We had decided to do a Secret Santa, picking names out of a hat to choose who we would buy gifts for. Anyone who’s done Secret Santa knows that frequently someone picks their own name and you have to start the whole process again again. But what are the odds of that happening? Calculating this involves a couple of lovely sets of numbers, known as factorials and derangements.

The former is simply the number of ways of arranging n different objects, and is calculated by multiplying n and all the numbers below it together. It’s written as n!, so for example four different objects can be arranged in 4! ways, which is equal to 4×3×2×1 = 24. Derangements, written !n, are similar, but exclude any configurations where an object appears in its original position – which is exactly what we want to avoid for a successful Secret Santa. The odds of everyone picking somebody else’s name is therefore the derangement divided by the factorial, the rather satisfying-looking !n/n!.

The good news is that you don’t actually need to calculate any of this. It turns out that for five or more people, !n/n! is always roughly one divided by e, a mathematical constant called Euler’s number, which comes to around 0.37 That means for any decent-sized Secret Santa pool, there’s a roughly two-thirds chance you will need to start over.

As an extra complication, we prohibited any of our guests from choosing their partner. This added complication reduces the odds of success to around 1/e^2, or roughly 0.14. It took us six increasingly mind-numbing rounds to hit a secret Santa arrangement that worked – so my advice is to dump the hat and get an impartial friend to do the picking.

The wrapping

How maths can help you create the perfect Christmas Day

Eventually, I drew Chris and decided to get him a suitably festive chocolate orange. I’m truly awful at wrapping presents, so I was keen to get mathematical help from of the Massachusetts Institute of Technology and colleagues, who wrote a paper detailing the . If you have ever attempted to wrap something curved, you will know that the end result is never very pretty. That’s because the flat paper can’t take on the curvature of whatever you’re wrapping – the same reason cartographers have to distort Earth’s geography to fit a flat map.

Demaine’s solution is to split the surface of the sphere into “petals”, symmetrical segments that meet at a central point. If you imagine cutting an orange into slices, then eating the fruit and flattening out the peel, you’ll have a rough idea of the shape of each petal.

The team helpfully provide templates for their petal wrappings, so I cut one out and traced it on to wrapping paper. It’s only when I take the chocolate orange out of its box that I discover it isn’t exactly spherical, as it has a flattened top and bottom. As such, my present wears its wrapping like a loose-fitting shirt, and is visible through the gaps in the paper. Oh well, at least I saved on Sellotape – just one piece on top is enough to hold all the petals together. “It’s pretty good,” says Chris, but I think he’s just humouring me.

So, has mathematical rigour translated into festive perfection? My efforts were a mixed bag, but as we all lounge on the sofa, stuffed full of precisely cut cake, everyone seems to have enjoyed a mathsy little Christmas. Maybe next year I’ll try quantum physics.

All images: Jeff J Mitchell/Getty

Topics: Festive science / Food and drink