Simon Mackenzie and Haris Aziz from UNSW and CSIRO's Data61 claim to have solved a longstanding maths problem. Credit:Louise Kennerley Haris Azizand Simon Mackenzie published their paper on the Cornell University Library archive site, arXiv.org in April. Their solution has been described as a "major breakthrough" by Professor Steven Brams at New York University, who has worked on such problems for more than 20 years. And it all comes down to cake. Imagine a rowdy kid's birthday party and a cake to cut. Simple right? Nine children, cut nine equal slices.

The algorithm by Simon Mackenzie and Haris Aziz for multiple cake-cutting agents is complex. Credit:arXiv.org "My piece didn't get any chocolate curls!" wails some over-entitled brat. It's not just size but the value you place on a slice that counts. Cake is a metaphor for any kind of divisible good, be it time, property settlement, or computing resources. And "envy-free"? By this, mathematicians mean no one prefers another person's share ahead of their own. Solving this problem for two people is simple and is at least as old as the Bible, where Lot and Abraham divided the lands of Canaan (Genesis 13).

One person cuts the cake into what they perceive as two equal slices. The other person chooses their preferred piece and the cutter takes the other. Simple. But add more people and it gets much trickier. In the 1960s, John Selfridge and John Conway independently developed a solution for envy-free cake cutting for three people. By this Selfridge-Conway protocol, if the envy-free allocation is not solved by an initial three-way division, then it takes just three more cuts to solve the problem. You can read about it here. And there it sat for years. However, in 2015 Dr Aziz and Mr Mackenzie at CSIRO's Data61 and UNSW published a solution for envy-free allocation among four agents. That can take between three and 203 cuts of the cake.

Not to rest on their laurels, Dr Aziz and PhD student Mr Mackenzie have published an algorithm for any number of agents. The paper is yet to be peer reviewed, however, Professor Brams told the Herald the "results look solid". In an associated field Professor Brams has developed an "adjusted winner" system of division that he has applied to problems as diverse as Donald Trump's divorce to his former wife Ivana and the Camp David Accords between Israel and Egypt. "There could even be applications in your part of the world," the NYU professor said. "It could be applied to the Spratlys Island dispute in the South China Sea." Professor Brams said that while the Aziz-Mackenzie protocol is too complex for practical application, it is an important theoretical step forward.

Another researcher in this field is Ariel Procaccia at Carnegie Mellon University in Pittsburgh. He told the Herald: "I was convinced that a bounded, envy-free cake-cutting algorithm [did] not exist. So the breakthrough result of Aziz and Mackenzie is nothing short of amazing. It is a beautiful piece of mathematics." Professor Procaccia hopes the research will inspire new solutions to solving fair-division problems in the real world. Dr Aziz said: "We hope that our new algorithm opens the door for simpler and faster methods of allocation. One day, problems such as allocating access to a telescope among astronomers or the fair distribution of scarce water resources could be made very easy." The UNSW mathematicians accept their protocol is complex and at this stage impracticable. For instance, in the case of five people, the maximum number of cuts to the cake would be five to the power of five to the power of five to the power of five to the power of five to the power of five. That gives you a number greater than all the atoms in the universe. Not even the crumbliest of cakes can break down that far.