Particular games

Cut small unless you are behind

The rung below found the greedy rule — cut at the largest prime — wrong on 104 of 552 Maundy Cakes and asked for a description of them. On all 104 the best cut is at the smallest prime, the exact opposite. A middle divisor is never needed on any cake in a sixty by sixty grid, and which of the two extremes wins is decided by Ω alone: cut small when Ω(m) + 1 ≥ Ω(n), large otherwise, and that is exact on all 3,540.

Assumes: The size of a cake · Maundy Cake

The size of a cake solved the one-row Maundy Cake exactly — write the prime factors of the row largest first and add up their running products — and found the greedy rule behind it, cut at the largest prime, right on only four cakes in five once both sides are composite. It closed on the exceptions:

The rung above is the two-sided formula, and this page has narrowed it usefully. The recursion is cheap, the sign is known, and the greedy rule is right four times in five — so what is missing is a description of the 104 cakes where it is wrong. They all have both sides composite and they are what any formula would have to get right.

The description is one word long, and it turns into a complete rule.

Cut small unless you are behind. The complete rule for the best cut in a Maundy Cake, in three cases decided by the two sides' counts of prime factors. It is exact on every cake in a sixty by sixty grid.
Fig. 1 The rule the failures produce. Which end of the factorisation to cut at is decided by the two sides’ counts of prime factors, and by nothing else.

The failures all want the other end

The failures all want the other end. Cakes where cutting at the largest prime is not the best a mover can do, with what the best cut actually is. On every one of them it is the smallest prime — the opposite of the rule that fails.
Fig. 2 Cakes where cutting at the largest prime is not the best available, with what the best cut actually is. On every one of the hundred and four it is the smallest prime.

On all 104 cakes the greedy rule gets wrong, the best cut is at the smallest prime. Not some middle divisor, not the whole side: the exact opposite of the rule that fails. A 4 × 6 cake cut into two is worth 2-2 to the mover and cut into three is worth 3-3; a 4 × 22 cut into two is worth 2-2 and cut into eleven is worth 11-11.

That already changes the shape of the problem. The 104 were being read as a remainder — cases where a rule of thumb runs out — and they are not a remainder at all. They are a second rule, with a region of its own, and the question is not what patches the greedy rule but where the boundary between the two lies.

No middle divisor is ever needed

A middle divisor is never needed. How often one of the two extreme primes is a best cut, over every cake in a sixty by sixty grid. It is every time, which turns a search over all divisors into a choice between two of them.
Fig. 3 How often one of the two extreme primes achieves the best a mover can do, over every cake in a sixty by sixty grid. It is every time.

Before the boundary, a fact that makes the whole question tractable. Sweeping every cake up to 60 × 60 and scoring every divisor of the side being cut, at least one of the smallest prime and the largest prime achieves the best score on all 3,540 of them.

A cut of a Maundy Cake may be into any number of equal pieces the side divides into, so a 24 × 24 cake offers seven cuts on each side. What this says is that five of the seven never need to be considered: the search over divisors is a choice between two, whatever the cake. That is not obvious and it is not proved here, but it is uniform over a grid large enough to have made it fail if it were going to.

One cake, every cut it has. A four by six Maundy Cake with each of its cuts scored. Cutting into two — the smallest prime — is the best available, and cutting into three, which is what the greedy rule says, is a whole move worse.
Fig. 4 A four by six cake with each of its three cuts scored. Into two is worth minus two, into three is worth minus three, and into six is worth minus eighteen — so the two extremes bracket the answer and the middle is nowhere.

The 4 × 6 cake makes the shape visible in three lines. Cutting all the way — into six single columns — is a disaster at 18-18, because the mover hands over a cake with nothing left in it to defend and the opponent collects every remaining move. Cutting into three is 3-3 and cutting into two is 2-2. The two useful cuts are at the ends of the factorisation and the ordering between them is what the rest of this page is about.

Which end, and what decides it

The choice is a function of two counts. Every cake whose two extreme primes differ, grouped by how many prime factors each side has. No group is mixed: the two counts settle which extreme to cut at, and the primes themselves never enter.
Fig. 5 Every cake whose two extreme primes differ, grouped by how many prime factors each side has. Not one group is mixed.

Write Ω(n)\Omega(n) for the number of prime factors of nn counted with multiplicity — so Ω(24)=4\Omega(24) = 4 because 24=222324 = 2 \cdot 2 \cdot 2 \cdot 3. This is the same quantity the rung below uses for the sign of a cake: a Maundy Cake is worth nought exactly when the two sides have equally many prime factors, and it favours whoever’s side has more.

Group the 2,040 cakes whose two extreme primes differ by the pair (Ω(m),Ω(n))(\Omega(m), \Omega(n)), and not one group is mixed. Given the two counts, which extreme is the best cut is settled — the primes themselves never enter, so a 4 × 22 and a 9 × 15 behave identically because Ω\Omega is 22 and 22 for both.

The pattern in the table is a diagonal band:

  • Ω(m)Ω(n)\Omega(m) \ge \Omega(n)the smallest prime, and only the smallest;
  • Ω(n)=Ω(m)+1\Omega(n) = \Omega(m) + 1either, both achieve the best;
  • Ω(n)Ω(m)+2\Omega(n) \ge \Omega(m) + 2the largest prime, and only the largest.

Which collapses into one line. Cut at the smallest prime when Ω(m)+1Ω(n)\Omega(m) + 1 \ge \Omega(n) and at the largest otherwise, where mm is the side the mover is not cutting.

Four rules on the same grid. The greedy largest-prime cut, its opposite, the two-case rule, and a control, each scored on every cake in a sixty by sixty grid. The two-case rule is exact and the others are not.
Fig. 6 Four rules on the same grid: the greedy cut, its opposite, the two-case rule, and a control that cuts the whole side away. The two-case rule is exact and the others are not.

It is right on all 3,540 cakes, against the greedy rule’s 72 per cent and the smallest-prime rule’s 86, and it costs two prime factorisations. The control — cut the whole side away — is right 29 per cent of the time, which is what a rule with no content scores on this grid and is the number the other three should be read against.

Why cutting small is usually right

The rule has a reading, and it is the same reading the sign has.

Ω(n)\Omega(n) is how many cuts a side can absorb before it is reduced to a single column: a side of 2424 can be cut four times and a side of 77 once. So the pair (Ω(m),Ω(n))(\Omega(m), \Omega(n)) is a count of the moves left to each player, and a Maundy Cake is a race in which each player is spending their own side’s factors while handing the opponent more room in theirs.

Cutting at the smallest prime is the slowest move available: it divides the side by as little as possible, keeping the rest of its factors in hand for later. Cutting at the largest prime is the fastest: it spends most of the side at once and gives the opponent the largest number of pieces immediately.

So the rule says: a mover keeps their moves back unless they are already losing the race, and spends them when they are. A player with as many factors as the opponent, or one fewer, is not behind and can afford to draw the game out — every extra move is one the opponent has to answer. A player two or more behind cannot win a race and their only chance is a large immediate gain, which is what a big cut produces: cutting into qq pieces multiplies what one piece is worth by qq.

That is a genuinely game-theoretic reading and not a numerological one, and it explains why the boundary sits at a difference of one rather than at zero. A difference of exactly one is the tipping point where the two considerations are balanced, and the table says the two cuts are worth the same amount there — 289, 210, 72 and 7 cakes in the four either cells, and no cake in any of them where one extreme beats the other.

What the rung below got right, and what it missed

Two things are worth separating, because the rung below did a great deal of work and the correction is narrower than it looks.

The one-row formula stands. A 1×n1 \times n cake is worth the sum of the running products of its prime factors taken largest first, and the greedy rule is exact on every one-row cake to two hundred. That is not weakened by anything here: a one-row cake has Ω(m)=0\Omega(m) = 0, which is in the cut large region of the table, so the rule this page arrives at agrees with the greedy rule everywhere the greedy rule was checked.

What was missed is that the region was the whole of what had been tested. The greedy rule was established on cakes with Ω(m)=0\Omega(m) = 0 and inherited unexamined into a grid where Ω(m)\Omega(m) runs to five. The failures were then read as noise around a rule rather than as the rule’s boundary, which is the same shape of mistake the entry fee was the cap records on a different ladder: a quantity measured at the edge of a sweep and reported as a property of the thing being swept.

The rung below did name the boundary, and named it correctly — they all have both sides composite — and it is worth noticing why that description was not quite enough. Both sides composite means Ω(m)2\Omega(m) \ge 2 and Ω(n)2\Omega(n) \ge 2, which is necessary for the greedy rule to fail and not sufficient: a 4 × 24 cake has both sides composite and the greedy rule is right on it, because Ω(24)\Omega(24) is two more than Ω(4)\Omega(4). The condition needed the two counts and not merely the fact that both exceed one.

What this does not say

It says which cut, not what the cake is worth. The rung below’s question was the magnitude, and the magnitude is still open on two-sided cakes: knowing the best cut turns the recursion into a walk of depth Ω(m)+Ω(n)\Omega(m) + \Omega(n) rather than a search, but the walk still has to be taken. What a closed form would need is the value of the position each cut leaves, and the rule gives only the direction to walk in.

It is a grid, not a theorem. Sixty by sixty is 3,540 cakes and 2,040 with a genuine choice, and the two claims — an extreme prime is always enough, and Ω\Omega decides which — are uniform over all of them. Neither is proved. The second is the kind of statement an induction on Ω(m)+Ω(n)\Omega(m) + \Omega(n) ought to reach, since the rule refers to nothing else.

Nor does it say the two extremes are the only useful cuts in general. What was checked is that one of them achieves the best score; several middle divisors tie with them on particular cakes, and the figure that scores every cut on a 4 × 6 shows the middle one strictly worse rather than absent. A rule that named a middle divisor would not be wrong on those ties, merely unnecessary.

And the largest side is sixty. Ω\Omega reaches five in that grid, on 3232, 4848 and their neighbours, so the either band is checked at four widths and the largest prime region at four. A cake with Ω=8\Omega = 8 on one side is a 256-column cake and is outside what has been looked at.

The rule is about a mover’s best cut and not about the outcome. On many of these cakes the mover is losing whatever they do, and best means the largest score available rather than a winning move. Numbers avoid numbers is why that distinction matters here more than usual: every Maundy Cake is a number, so neither player ever wants to move, and the whole game is about being the one who does not have to.

Why the two extremes and never the middle

The finding that a middle divisor is never needed is the part a reader is least likely to have expected, and it has a reason that makes the rule memorable rather than merely verified.

A cut at a divisor dd of one side produces dd pieces of size n/dn/d. Two things move in opposite directions as dd grows: the pieces get more numerous, which is more moves for the player who cut, and each gets smaller, which is fewer moves in each of them. A player choosing dd is trading count against size.

A trade between two monotone quantities has its best value at an end. If the count matters more, take the largest divisor and get the most pieces; if the size matters more, take the smallest and keep them big. There is no configuration in which an interior divisor beats both ends, because neither quantity turns around in the middle.

Which of the two matters is exactly what Omega\\Omega measures. Omega(n)\\Omega(n) is how many cuts remain in a side before it is single cells, so comparing Omega(m)+1\\Omega(m)+1 with Omega(n)\\Omega(n) is comparing the two players’ remaining supplies of moves — and the player with fewer wants to preserve them, which is the small cut, while the player with more wants to spend them, which is the large one.

So the rule and the absence of middle divisors are one fact. The game is an accounting of two supplies, the cut chooses how fast one of them is spent, and a quantity being spent fastest or slowest is always spent at an extreme.

What a rule with no exceptions is worth

It is worth pausing on how unusual this result is for the site, because most of what these ladders find is a rule with a residue.

The margin a count needs is a rule that bounds a direction and not a value, with a threshold that turns out to depend on the board. Half the difference in odd runs is a reading that is never out by more than a move and is out by something on more than half the regions it speaks about. A bound instead of an answer is a heuristic priced by a bound it satisfies. Every one of them is an approximation with its error measured, which is what this site usually gets when it asks a rule of thumb to become a statement.

This one has no error to measure. That is worth attributing rather than celebrating: Maundy Cake is a game whose every value is an integer, whose recursion runs on integers, and whose structure is arithmetic all the way down — so it is the kind of game where a rule can be exact. Domineering regions have shapes, and a shape carries information no count captures. Maundy Cakes have factorisations, and a factorisation is already a list of numbers.

The lesson generalises in one direction only. Where a game’s positions are already numerical objects, a complete rule is worth looking for; where they are geometric, the ladders on this site keep finding that the honest destination is a bound.

The convention, named

Normal play throughout: a player who cannot cut loses.

Maundy Cake is played on a rectangle of m×nm \times n squares. Left cuts along one axis and Right along the other, and a cut must divide the cake into equal pieces — so a side of nn may be cut into jj pieces for any divisor j>1j > 1 of nn, and all jj pieces stay in play. It is Cutcake with the equal-pieces clause added, and the clause changes the answer completely.

Every Maundy Cake is a whole number, which is what lets the whole game run on integers with the simplicity rule in place of the construction. That is the rung below’s machinery and it is what makes a 60 × 60 sweep cost milliseconds.

Ω(n)\Omega(n) counts the prime factors of nn with multiplicity: Ω(12)=3\Omega(12) = 3, not 22. The distinction is the whole rule — Ω(4)=2\Omega(4) = 2 and Ω(6)=2\Omega(6) = 2 put a 4 × 6 cake in the cut small region, while Ω(4)=2\Omega(4) = 2 against Ω(24)=4\Omega(24) = 4 puts a 4 × 24 in the cut large one.

The best cut is the one maximising the mover’s score, where a cut into jj pieces of a cake worth vv scores jvj \cdot v — the mover keeps a whole cake’s worth from each piece. Ties are counted as successes for both rules involved, which is what the either band records.

Where the ladder goes next

The cutcake anchor has four rungs to here, and this one has settled which cut to make on every cake in the grid. The rung above uses that to settle what the cake is worth.

The short side only says how many takes the recursion with the cut decided and finds it stops being a recursion. It becomes a walk, the walk unrolls, and what it unrolls into is the running products of the long side’s prime factors taken largest first. The short side contributes nothing to those products at all — it decides how many of them there are and nothing else, which is why sixty-two different short sides give one value.

That is a stronger result than a two-variable formula would have been, and it is worth saying why. A formula in mm and nn would answer the question and leave the two sides looking symmetric; this says they were never symmetric, and the asymmetry is the move rule showing through. The cut is made along one side and the pieces are stacked along the other, so one side supplies the choices and the other supplies only a count of how many choices get made.

Read back to this page, that is also why Ω\Omega decides the cut. The count of prime factors with multiplicity is exactly how many cuts are left in this side, and a rule comparing Ω(m)+1\Omega(m)+1 against Ω(n)\Omega(n) is comparing two supplies of moves. The whole family turns out to be an accounting of two counts, and every appearance of a prime in it is a place where a count is decremented.

Part 4 of 7

One argument about Cutcake. The parts either side of it:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down.

What this makes readable

Essays that declare this one a prerequisite.

The objects named here

The third axis, after the field and the series: the games, values and theorems themselves, and every essay that touches each one.

CounterexampleCutcakeEnumerationHeuristicIntegerInvariantMaundy cakeNumberPartizanSimplicity ruleStrategyValue