Next time you fight for the biggest pie of the birthday cake, remember this. Scientists have evolved a method that will help share cake between two people in equal pieces and in such a way that no one feels robbed.
Mathematician Julius Barbanel of Union College and political scientist Steven Brams of New York University have devised an algorithm for a perfect cake-cutting experience.
This is how it works.
You first need a referee like your mother to monitor the process.
The potential cake eaters first tell the referee which parts of the delicacy they value most.
In mathematical terms, these are called someone's probability density functions (pdfs).
The referee then marks out the cake at all points where the pdfs of the disgruntled would-be cake eaters cross, and assigns portions.
If at this point, the two parties receive the same size of cake, the task is over. If not, the giveback process starts.
The party who received the larger part of the cake during the first round must give a part of it back to the other person, starting with those parts in which the ratio of their pdfs is the smallest.
This goes on until the parties value their portions equally, and have the same volume of cake to eat.
This method only works with a finite number of cuts if the players' pdfs are straight-lined.
The method can be used to share cake and other divisible goods such as land.
"This allocation is not only equitable but also envy-free and efficient - that is, perfect," Barbanel concluded in Springer's journal The Mathematical Intelligencer.