Skip to main content

Algorithm solves cake-cutting problem that has haunted mathematicians

We’ve all been there before: moving into a new apartment with housemates and trying to figure out who owes what each month. It’s easy enough if everyone gets the same identical room, but inevitably there is one person who gets the slightly larger bed, or the nice view with no road noise, or the ceiling that doesn’t leak, or the en-suite bathroom.

The same is true of a variety of other division tasks: from dividing up leftover pizza — does one slice of meat feast equal two slices of cheese? — to more serious examples like divorce settlements.

Recommended Videos

It is this type of problem that mathematicians have long investigated with the so-called ‘cake-cutting problem.’ Cake cutting is based around a scenario in which a varying amount of siblings or friends divide up a cake with multiple toppings, where everyone wants to be treated equally, but has different requirements and preferences.

“Fair division is something a lot of real world problems rely on,” Simon Mackenzie, a postdoctoral researcher at Carnegie Mellon University, told Digital Trends. “Cake cutting is a good metaphor to think about these fairness problems. It’s also an incredibly elegant problem from a mathematical perspective.”

As Quanta Magazine notes, in the 1960s an algorithm was created that could divide up a cake between three players, without sparking any envy. But for more than three players, people have been relying on a 1995 algorithm which could conceivably run for a virtually unlimited number of steps to come up with an answer.

In a new paper, due to be shown off at next week’s 57th annual IEEE Symposium on Foundations of Computer Science, Mackenzie and colleague Haris Aziz describe a more efficient, envy-free cake cutting algorithm, capable of solving the problem in a finite number of steps. This can be anywhere between three and 203 cuts of the cake. They have previously come up with solutions to both the tree and four-person variants of the puzzle.

“Even before I started my Ph.D. and got interested in fair division, this is a problem I’d been interested in out of pure curiosity,” Mackenzie said. “What got me working on it seriously was my co-author on the paper coming to me and saying we should collaborate. He thought there were some interesting communication complexity problems in cake cutting that we could look at. That’s what got us started.”

The algorithm the pair have come up with shows a drastically reduced running time is possible — and they have plans to make it even simpler and faster. It is already being hailed by computer scientists as an impressive breakthrough, partially on the complexity of the solution alone.

“This is a problem a lot of people are surprised is doable,” Mackenzie noted. “A lot of people thought it would be totally impossible.”

While part of this is certainly most exciting from a theoretical perspective — showing that a puzzle people once thought couldn’t be done, actually can be — it also has some promising implications for future solutions to real-world fair division problems and making these systems more efficient.

And who can really get upset about making the world a fairer and more efficient place?

Luke Dormehl
I'm a UK-based tech writer covering Cool Tech at Digital Trends. I've also written for Fast Company, Wired, the Guardian…
This TP-Link Wi-Fi 6 router is 45% off in early Prime Day deal
The TP-Link AX1800 Archer AX21 Wi-FI 6 Router on a white background.

If you're planning to buy a new router to improve your home's Wi-Fi network, the good news is that you don't have to wait for Prime Day 2025 to take advantage of huge discounts on router deals from Amazon. Here's an excellent offer — the TP-Link Archer AX21 with an eye-catching 45% discount, which drops its price from $100 to just $55. The $45 in savings will only be available for a limited time though, so you better act fast and proceed with your purchase immediately as this early Prime Day deal may disappear at any moment.

Buy Now

Read more
Watch these AI humanoid robots play soccer like Mbappé … sort of
Humanoid robots playing soccer.

Watching these humanoid robots battle it out on the soccer field, you quickly realize that Kylian Mbappé and his fellow professionals really have little to worry about. At least, for now.

The footage (top) was captured last week in Beijing at the RoBoLeague World Robot Soccer League, China's first-ever three-on-three humanoid robot soccer league.

Read more
The robot takeover comes another step closer — at Amazon
An Amazon robot working inside one of the company's warehouses.

Amazon is close to having more robots operating inside its warehouses than humans after the e-commerce giant announced this week that it now has more than a million robots working at its facilities around the world.

Over the years, Amazon has spent billions of dollars on the development and deployment of warehouse-based robots, which handle an array of tasks once performed by human workers.

Read more