Ever worried you're getting the rough end of the stick when it comes to sharing pizza? Mathematicians have worked out the answer to one of life's cheesiest queries, *New Scientists*'s Stephen Ornes writes.

Lunch with a colleague from work should be a time to unwind - the most taxing task being to decide what to eat, drink and choose for dessert.

For Rick Mabry and Paul Deiermann it has never been that simple. They can't think about sharing a pizza, for example, without falling headlong into the mathematics of how to slice it up. "We went to lunch together at least once a week," says Mabry, recalling the early 1990s when they were both at Louisiana State University, Shreveport. "One of us would bring a notebook, and we'd draw pictures while our food was getting cold."

The problem that bothered them was this. Suppose the harried waiter cuts the pizza off-centre, but with all the edge-to-edge cuts crossing at a single point, and with the same angle between adjacent cuts. The off-centre cuts mean the slices will not all be the same size, so if two people take turns to take neighbouring slices, will they get equal shares by the time they have gone right round the pizza - and if not, who will get more?

Of course you could estimate the area of each slice, tot them all up and work out each person's total from that. But these guys are mathematicians, and so that wouldn't quite do. They wanted to be able to distil the problem down to a few general, provable rules that avoid exact calculations, and that work every time for any circular pizza.

**Cutting through the centre**

As with many mathematical conundrums, the answer has arrived in stages - each looking at different possible cases of the problem. The easiest example to consider is when at least one cut passes plumb through the centre of the pizza. A quick sketch shows that the pieces then pair up on either side of the cut through the centre, and so can be divided evenly between the two diners, no matter how many cuts there are.

So far so good, but what if none of the cuts passes through the centre? For a pizza cut once, the answer is obvious by inspection: whoever eats the centre eats more. The case of a pizza cut twice, yielding four slices, shows the same result: the person who eats the slice that contains the centre gets the bigger portion. That turns out to be an anomaly to the three general rules that deal with greater numbers of cuts, which would emerge over subsequent years to form the complete pizza theorem.

The first proposes that if you cut a pizza through the chosen point with an even number of cuts more than 2, the pizza will be divided evenly between two diners who each take alternate slices. This side of the problem was first explored in 1967 by one L. J. Upton in Mathematics Magazine (vol 40, p 163). Upton didn't bother with two cuts: he asked readers to prove that in the case of four cuts (making eight slices) the diners can share the pizza equally.

**Slice dilemma**

Next came the general solution for an even number of cuts greater than 4, which first turned up as an answer to Upton's challenge in 1968, with elementary algebraic calculations of the exact area of the different slices revealing that, again, the pizza is always divided equally between the two diners.

With an odd number of cuts, things start to get more complicated. Here the pizza theorem says that if you cut the pizza with 3, 7, 11, 15... cuts, and no cut goes through the centre, then the person who gets the slice that includes the centre of the pizza eats more in total. If you use 5, 9, 13, 17... cuts, the person who gets the centre ends up with less.

Rigorously proving this to be true, however, has been a tough nut to crack. So difficult, in fact, that Mabry and Deiermann have only just finalised a proof that covers all possible cases.

Their quest started in 1994, when Deiermann showed Mabry a revised version of the pizza problem, again published in Mathematics Magazine (vol 67, p 304). Readers were invited to prove two specific cases of the pizza theorem. First, that if a pizza is cut three times (into six slices), the person who eats the slice containing the pizza's centre eats more. Second, that if the pizza is cut five times (making 10 slices), the opposite is true and the person who eats the centre eats less.

**Asterisk spells trouble**

The first statement was posed as a teaser: it had already been proved by the authors. The second statement, however, was preceded by an asterisk - a tiny symbol which, in Mathematics Magazine, can mean big trouble. It indicates that the proposers haven't yet proved the proposition themselves. "Perhaps most mathematicians would have thought, 'If those guys can't solve it, I'm not going to look at it.'" Mabry says. "We were stupid enough to look at it."

Deiermann quickly sketched a solution to the three-cut problem - "one of the most clever things I've ever seen," as Mabry recalls. The pair went on to prove the statement for five cuts - even though new tangles emerged in the process - and then proved that if you cut the pizza seven times, you get the same result as for three cuts: the person who eats the centre of the pizza ends up with more.

Boosted by their success, they thought they might have stumbled across a technique that could prove the entire pizza theorem once and for all. For an odd number of cuts, opposing slices inevitably go to different diners, so an intuitive solution is to simply compare the sizes of opposing slices and figure out who gets more, and by how much, before moving on to the next pair. Working your way around the pizza pan, you tot up the differences and there's your answer.

**Geometrical trick**

Simple enough in principle, but it turned out to be horribly difficult in practice to come up with a solution that covered all the possible numbers of odd cuts. Mabry and Deiermann hoped they might be able to deploy a deft geometrical trick to simplify the problem.

The key was the area of the rectangular strips lying between each cut and a parallel line passing through the centre of the pizza (see diagram). That's because the difference in area between two opposing slices can be easily expressed in terms of the areas of the rectangular strips defined by the cuts. "The formula for [the area of] strips is easier than for slices," Mabry says. "And the strips give some very nice visual proofs of certain aspects of the problem."

Unfortunately, the solution still included a complicated set of sums of algebraic series involving tricky powers of trigonometric functions. The expression was ugly, and even though Mabry and Deiermann didn't have to calculate the total exactly, they still had to prove it was positive or negative to find out who gets the bigger portion. It turned out to be a massive hurdle. "It ultimately took 11 years to figure that out," says Mabry.

Over the following years, the pair returned occasionally to the pizza problem, but with only limited success. The breakthrough came in 2006, when Mabry was on a vacation in Kempten im Allgäu in the far south of Germany. "I had a nice hotel room, a nice cool environment, and no computer," he says. "I started thinking about it again, and that's when it all started working."

**Programmes help solve problem**

Mabry and Deiermann - who by now was at Southeast Missouri State University in Cape Girardeau - had been using computer programs to test their results, but it wasn't until Mabry put the technology aside that he saw the problem clearly. He managed to refashion the algebra into a manageable, more elegant form.

Back home, he put computer technology to work again. He suspected that someone, somewhere must already have worked out the simple-looking sums at the heart of the new expression, so he trawled the online world for theorems in the vast field of combinatorics - an area of pure mathematics concerned with listing, counting and rearranging - that might provide the key result he was looking for.

Eventually he found what he was after: a 1999 paper that referenced a mathematical statement from 1979. There, Mabry found the tools he and Deiermann needed to show whether the complex algebra of the rectangular strips came out positive or negative. The rest of the proof then fell into place.

So, with the pizza theorem proved, will all kinds of important practical problems now be easier to deal with? In fact there don't seem to be any such applications - not that Mabry is unduly upset. "It's a funny thing about some mathematicians," he says.

**Additional questions**

"We often don't care if the results have applications because the results are themselves so pretty." Sometimes these solutions to abstract mathematical problems do show their face in unexpected places. For example, a 19th-century mathematical curiosity called the "space-filling curve" - a sort of early fractal curve - recently resurfaced as a model for the shape of the human genome.

Mabry and Deiermann have gone on to examine a host of other pizza-related problems. Who gets more crust, for example, and who will eat the most cheese? And what happens if the pizza is square? Equally appetising to the mathematical mind is the question of what happens if you add extra dimensions to the pizza. A three-dimensional pizza, one might argue, is a calzone - a bread pocket filled with pizza toppings - suggesting a whole host of calzone conjectures, many of which Mabry and Deiermann have already proved.

It's a passion that has become increasingly theoretical over the years. So if on your next trip to a pizza joint you see someone scribbling formulae on a napkin, it's probably not Mabry. "This may ruin any pizza endorsements I ever hoped to get," he says, "but I don't eat much American pizza these days."