# Muffins and Integers

*A novel cake-cutting puzzle reveals curiosities about numbers*

Alan Frank introduced the “Muffins Problem” nine years ago. Erich Friedman and Veit Elser found some early general results. Now Bill Gasarch along with John Dickerson of the University of Maryland have led a team of undergraduates and high-schoolers (Guangqi Cui, Naveen Durvasula, Erik Metz, Jacob Prinz, Naveen Raman, Daniel Smolyak, and Sung Hyun Yoo) in writing two new papers that develop a full theory.

Today we discuss the problem and how it plays a new game with integers.

The puzzle was popularized five years ago in the New York Times Online. That spoke of *cupcakes* not *muffins*, but Frank’s original term from 2009 has stuck to the pan since muffins are bigger and firmer hence easier to cut. The original question was:

How can one divide muffins among students while maximizing the size of the smallest piece?

Everyone will get of a muffin. If we cut a piece out of the first muffin and give someone else the piece left over then that person will also have a piece of size at most . That’s no better than the trivial solution of cutting each muffin into fifths. Can we do better?

## A Kinder Cut

In fact, we can. Quarter the first muffin—that at least is easy with a knife. With more care we divide the other two muffins into pieces of size , , and . Four people get a quarter and a piece giving . The fifth student gets the two pieces. So .

Is this optimal? If we divide any muffin into or more pieces, some piece must have size at most . On the other hand, if we divide each muffin into at most pieces, we have at most pieces total, so some student gets just piece. That must be a piece, leaving a piece which implies the need for an at-most piece either from halving it or from supplementing it. So we have proved .

Other cake-cutting problems involve protocols for “fair division” where one person cuts and another chooses. Here the division is constrained to be fair. The depth comes from the problem’s *minimax*—or *maximin*—nature. It is not a simple linear programming problem. It is not a two-player game but has game-like aspects. It does have an important *duality* property.

## Duality

The flipped problem is to divide muffins among students. The trivial solution guarantees . We must have at least pieces so some student will get pieces, at least one of size no more than . We can achieve that by breaking four muffins into pieces of size and and the other in half. The other two students each get a piece and two pieces. This is a full proof of .

The dual nature of this argument may not be apparent at first but Friedman proved:

Theorem 1For all , .

*Proof:* Picture Sweeney Todd luring the students into his barbershop with muffins each proffered by a customer of Mrs. Lovett’s Meat Pies. So we have hungry muffin providers who will be served pieces of student pie. If a muffin was shared among students then its owner will get pieces of pie in return. The piece-maximization objective is the same as when the students ate the muffins. The only change is that the piece size is reckoned in proportion to the students rather than the muffins, hence the conversion factor .

The paper shows something more: how to convert a proof of optimality of a division in the primal to a proof for the corresponding division in the dual. Above we not only have but also the fifth student with the two pieces corresponds to the muffin divided into halves, the others with a and piece showing the division out of .

To illustrate another case, strikes me as easier to reason about than : Splitting each of muffins and giving one student four pieces, the others two and a , achieves . Conversely, each student gets an total share, so if someone gets a whole muffin then the remaining share causes a piece somewhere. If not, then there are total muffin pieces, so someone gets four pieces, and the smallest of those has size at most . So and hence .

One aspect of duality that seems missing, however, is the correspondence between a feasible solution on one side and a *constraint* on the other. For linear programming this placed it into long before Leonid Khachiyan placed it into . As was shown by Elser, the muffin problem yields a mixed linear and integer program. This is enough to show that is computable and always a rational number but so far not to place problems about and into let alone . Trying instead will show the issues.

## Discovering, Charting, and Theory-Building

The duality allows us to limit attention to . Since cases where divides are trivial, we have and not an integer. Then any solution achieving optimal minimum piece size must satisfy:

- Every student gets a share of at least two muffins.
- Every muffin is cut into at least two pieces.

The latter implies . Note that if divides then we get by halving each muffin, and vice-versa. So we also consider this a trivial case.

Not so easy to prove, apparently, is (given ). It appears as “Appendix E” of the group’s second paper. That and Bill’s talk slides for the 2018 Joint AMS-MAA Meeting have some updates over the ArXiv paper, even though the latter stretches to 199 pages.

Why is the paper so long? There are 103 pages of appendices and tables. These supplement an original effort to build a theory. It starts by defining , so that nontrivial cases have , and giving the following basic upper bounds:

*Proof:* In an optimal solution, every muffin must be cut into exactly two pieces, else we have . It follows that some students get shares from muffins and others partake in only muffins. The former receive some piece of size at most their total divided by , hence the first inequality. The latter similarly receive some piece of size at least , but then the other piece of the muffin it came from has size at most .

The ‘FC’ bounds are tight for , , , and , so one might expect it to continue for the whole Fibonacci sequence. But it *fails* for : instead of , this note posted by Bill using methods found by Metz gives an upper bound of Efforts to bound other progressions lead to theorems like this one:

Theorem 3If and then putting gives

They have been continually charting more individual solutions and also finding more arguments by which to generate upper and lower bound theorem cases. The efforts have been joined by other students. As we go to post the following bounds—ordered by and stated with common denominators—have yet to be closed:

The `?’ marks a computer run that timed out. The Muffin Team may soon solve some of these, but there are always more to do—unless and until a full characterization is found. This all shows scope for involvement by amateur mathematicians both for finding more-effective duality arguments and for computational experiments.

## Higher-Level Questions and Subtleties

The following questions spring to mind—with and the same nontriviality assumptions as above:

- If in lowest terms, then is always a multiple of ?
- Is there always an optimal solution in which some student gets all equal-size pieces?
- If then does —i.e., do things reduce to identical sub-problems?
- Is given by a simple function of —or and by simple integer functions of and ?

A mark of subtlety is that the first two answers are *no* while the other two remain open problems despite all the work. The first holds whenever either bound in Theorem 2 is tight, or when equals an alternative bound called in the long paper. It fails, however, for . Although it and other known exceptions have , even that hasn’t been proved.

My thought with question 2 had been to force some relation between and . But Metz refuted it by showing that and that no solution gives someone shares of equal size. Here but is not a multiple of . I have posted his note here with their permission.

If an FC or INT bound is tight for then it is tight for for all integers . These bounds are defined in terms of alone and are polynomial-time computable. The team have formalized several other bounds with the same or similar properties. But next we discuss a sense in which the original FC bounds are the ultimate answers.

## Touches of Hilbert?

For any ideal generated by homogeneous polynomials of some degree in variables over some field , we can set to be the dimension of the quotient space of homogeneous polynomials of degree modulo the ideal . David Hilbert proved that there is always a polynomial such that for all but finitely many . Well, the minimum integer such that holds for all may be huge in terms of and , but Hilbert first proved it exists and later gave bounds which have since been refined. It is called the *Hilbert regularity*. The Muffin crew have proved a theorem that strikes me as somehow analogous:

Theorem 4For all there exists such that for all , equals one of the bounds in Theorem 2.

They also give a bound of roughly on . For they have computed exactly. One consequence of the regularity is that computing , while not known to be in or even in in any sense, belongs to the class of *fixed-parameter tractable* problems.

Their last main topic also bridges between Hilbert’s famous “Program” of automating mathematical deduction—the one supposedly destroyed by Kurt Gödel—and PolyMath projects. They have created a “Muffin Theorem Generator” for exceptional cases, and it is the subject of their second paper. They document its use to solve a sizable initial segment of exceptional cases having , and they have now resolved all for up through .

## Open Problems

The high-level problem is to find a criterion that expresses the solution as a simple direct function of and . Or might there be irreducible complexity “underneath” the regularity bound as varies?

Short of a full characterization, what divisibility properties of integers are being used, in particular regarding and ? Their “Muffin Theorem Generator” also gives food for thought on computational experiments—and student research initiatives. Kudos to the students—note the newer bounds in the talk slides in particular.

BTW, there is some rationale behind the jumble of and and style ratios: The first is just for the rational value while the second intends to emphasize and individually.

Here is another worked-out example from an earlier draft of the post:

“Both the FC and INT bounds are expressible as functions of alone. Hence if either is tight for then it is tight for for all integers . However, , is a case where neither bound is tight. We have , so we get upper bounds of and . The latter is redundant but is not tight: the true answer is .

We can achieve by noting that and enumerating ways to partition into pieces no smaller than and no bigger than . A five-way partition must be while four-way partitions can be or or or . We have 48 total pieces so we need four five-way partitions, so we need 16 muffins to be cut and 4 cut . To use up sixteen pieces we need 4 students to receive and 2 to receive , so we cut the other 4 muffins . Recalling the 4 students with five pieces we have just 1 student left over who gets the . We’ve not only shown an optimal solution but also proved it must give some student all equal-sized pieces.

The fact of needing four 5-way partitions and seven 4-way partitions does not depend on the denominator being but on the fact of having total pieces to give to students. If the minimum size is to be then the remainders of the 20 muffins involved in the 5-way partitions will be pieces of size at most . Of the seven students getting a 4-way partition, at least four must get three of size at most , which must be paired with four pieces of size at least from the other 4 of the 24 muffins. Those last 4 muffins in turn have other pieces of size at most . The finisher is that we cannot make a 4-way partition from muffins of size and . Hence is optimal.

This treatment of the latter argument is rough but the Muffin Team make it more formal and define a new kind of bound from it…”

Nice work! This takes me about 4 years, to when I spent somewhere between a summer and a year thinking about this problem obsessively in my spare time. I filled out tables of values of f (actually, I defined theta(m,n) = n f(m,n), because I wanted theta(m,n) = theta(n,m)), but I never found a good algorithm to compute the values. It sounds like you do have good algorithms in many cases, and much larger tables.

I found a write-up where I gave a proof that (i) f(m,n) is rational, and (ii) “if f(m,n) = p/q, then there exists a procedure to assign the muffins to students where each piece’s size is rational with denominator q.” I assume fact (ii) is known to you? Thanks for reading, I probably would have loved to be a part of your group.

A more basic question: where f(m,n) = p/q, is there a known integer expression which q must divide? This, together with fact (ii) from my previous comment, would give a simple algorithm to calculate f (though probably not so efficient).

Half each muffin. Give each student a half. Discard the remaining half. Now the min any student gets is 1/2.

Just took a quick look at the first four unclosed bounds mentioned above. (67, 21), (67,25),(69, 32) are all similar cases and your lower bound applies in each case. (61, 27) is slightly more complicated but works out nicely: your upper bound applies. A couple of difficult cases are (181, 104) and (1079, 621)!

Actually, those other two cases aren’t so hard! f(181, 104) = 75 / 182 and f(1079, 162) = 3413 / 8280.