One loss in sixteen
Assumes: Before the theorem there was the mirror · The step nobody took for thirty-four years
Kayles was solved by a symmetry long before it was solved by a theory. Knock down the middle skittle of a row, or the middle two, and copy every move the opponent makes in the other half. Measured on every position to twenty-four skittles, that copying sees 271 of the 1,194 losses. Reading “equal” as “equal in value” — pairing a row of four with a row of one because both are worth ∗ — raises it to 754, and the exclusive-or of 1901 does the rest.
The census left one question with a definite answer and no way of reaching it by listing. As the positions grow, what share of the losses does pairing by value still see? If the share tends to a fixed fraction, a player with nothing but a table of which rows cancel would hold a permanent piece of the game. If it tends to nought, then the exclusive-or carries the game more and more completely, and the theorem of 1935 is mostly Bouton’s arithmetic with a substitution in front of it.
Listing stops near thirty skittles. At three hundred there are 9,253,082,936,723,602 positions, which no census will ever walk through. Counting them is another matter, and the count turns out to give a clean answer: the share falls all the way from three in four to one in sixteen, and it stops there. A sixteenth is not an accident of Kayles. It is the arithmetic of a game whose rows take eight different values and whose values fit in four binary digits.
Only the parities matter
The three tests the earlier census used look at a position in different ways. A mirror asks whether every row length appears an even number of times. Pairing by value asks whether every Grundy value does. A loss asks whether the values exclusive-or to nought. The second and third have something in common that makes them countable: neither needs to know how many rows of a given value there are, only whether that number is odd or even. Two rows worth ∗4 cancel each other in the exclusive-or exactly as no rows worth ∗4 do.
Every Kayles row is worth one of ∗, ∗2, and so on up to ∗8. No row of positive length is worth nought, which is the first thing the Kayles sequence shows. So for every question about losing, a position is fully described by eight bits: for each of the eight values, whether the position holds an odd number of rows worth it. There are 256 such descriptions. A position pairs off by value exactly when all eight bits are nought. It is a loss exactly when the values whose bits are set exclusive-or to nothing.
How many of the 256 cancel is a piece of linear algebra over the two-element field. Each value is a vector of four bits, and the eight values include ∗, ∗2, ∗4 and ∗8, which between them reach every one of the sixteen four-bit patterns. So the map from eight parity bits to four bits of exclusive-or is onto, and its kernel, the sets that cancel, has 2⁸ ÷ 2⁴ = 16 members. One of them is the empty set. That single member is the whole of pairing by value, and the other fifteen are the losses that need the arithmetic.
The figure says what this looked like at twenty-four skittles. Two of the sixteen sets held 97 per cent of the losses: nothing held oddly, which is pairing, at 62 per cent, and ∗ + ∗2 + ∗3, the smallest cancelling triple, at 35. Twelve held no loss at all. The census was not seeing the shape of the theory. It was seeing the two cheapest ways to cancel, because at twenty-four skittles there is no room for the others. The set of all seven values from ∗ to ∗7 needs a row worth ∗5, and the only such row is twenty-eight skittles long. It first appears among the losses at sixty-five skittles.
Counting to three hundred
The parities make the count a matter of bookkeeping. Build the positions one row length at a time. Each copy of a row of length r adds r skittles and flips the bit belonging to its value, so the number of positions with t skittles and parity description s, once rows of every length up to r have been allowed, satisfies
where is the bit for the value of a row of length r. That is the ordinary count of partitions with a flipped label carried along, 256 labels at every total. The mirrors need nothing new: a mirror with 2m skittles is a partition of m with every row doubled, so the number of mirrors is the number of partitions of m.
Run in exact integer arithmetic to three hundred skittles, the count reproduces the census exactly where the two overlap — 1,194 losses, 754 paired by value and 271 mirrors between two and twenty-four skittles — and then keeps going.
The curve has two parts that need separating. The losses themselves, as a share of all positions, settle quickly: 15.6 per cent at twenty-four skittles, 11.9 at a hundred, 9.5 at three hundred. Pairing by value does not settle. It reads 61.6 per cent at twenty-four, 29.8 at a hundred, 19.0 at two hundred and 15.0 at three hundred, falling at every fourth total in the range with no sign of levelling. On the evidence of this figure alone, the honest reading would be that it is headed for nought, which is the answer the earlier essay half expected.
It is not headed for nought. The figure shows a curve still falling at its right edge, and a falling curve on a finite range cannot say where it ends. That has to come from the reason the curve falls, which the next figure shows directly.
The losses spread out
The sixteen cancelling sets are sixteen ways a position can be lost, and the census at twenty-four skittles had nearly all its losses in two of them. As the totals grow, the other fourteen fill.
This is the mechanism, and it is visible. Pairing by value is not being squeezed out by some property of large positions that makes pairing hard. It is one of sixteen equal-status ways to be lost, and it started out with an unfair advantage: in a small position, holding nothing oddly is easy and holding ∗5 oddly is impossible, because there is no room for a row of twenty-eight. As the positions grow, the advantage wears off. At a hundred skittles, the four largest sets hold between 9 and 30 per cent each, and at three hundred, eight sets hold more than five per cent and none holds less than one.
The ordering at three hundred is informative too. The sets at the top — nothing odd, ∗ + ∗2 + ∗3, ∗ + ∗2 + ∗4 + ∗7, ∗3 + ∗4 + ∗7 — are those built from values with many short rows. The sets at the bottom all contain ∗5. Every cancelling set that needs ∗5 sits between 1.0 and 2.1 per cent, and every set without it sits above seven. The value with one row is the drag on the whole spread.
Why the limit is a sixteenth
If the drift continues to an even split, pairing by value ends at a sixteenth of the losses, and there is a good argument that it does.
Pick a position with t skittles at random, every multiset of row lengths equally likely. The number of rows of any one fixed length — rows of five, say — is a random count, and as t grows its typical size grows without limit, roughly like the square root of t. A count spread over a widening range is as likely to be odd as even, in the limit. Fristedt’s work on random partitions in the 1990s made the stronger statement that the counts of different row lengths behave, for large totals, like independent geometric variables. So each of the eight parity bits becomes a fair coin, independent of the others, and all 256 parity descriptions become equally likely.
From there the arithmetic is the linear algebra above. Losses are 16 of the 256 descriptions, so a sixteenth of all positions are lost. Pairing by value is one of the 256, so it is a two-hundred-and-fifty-sixth of all positions, and a sixteenth of the losses.
The answer to the question is therefore a fixed fraction, and a small one. A player who knows only which Kayles rows cancel, with no exclusive-or, holds a sixteenth of the lost positions for ever. The exclusive-or holds the other fifteen sixteenths, which is about as decisive as such a split can be while still leaving the middle layer alive.
The number has a reading that does not mention Kayles. It is 2⁴ ÷ 2⁸: the number of patterns the values span, over the number of values. A game with k distinct non-zero row values spanning d binary digits would, by the same argument, leave pairing by value a share of of its losses. Nim is the other extreme: every heap size is its own value, there are infinitely many values, and pairing by value is just copying, which goes to nothing. Kayles keeps a share because it has finitely many values. The share is small because eight values in four digits leave four digits of redundancy, and each digit of redundancy halves it.
A row of twenty-eight sets the pace
The argument gives the limit and says nothing about how quickly it arrives. The exact count says something unwelcome about that: at three hundred skittles, pairing by value is still at 15 per cent, more than twice its limit.
The Kayles values turn periodic at seventy-one skittles, with period twelve, and the periodic part takes only ∗, ∗2, ∗4, ∗7 and ∗8. So three values have a finite list of rows for ever. ∗3 has four rows, ∗6 has four, and ∗5 has exactly one length, twenty-eight.
That matters because the fair-coin argument works row length by row length. A parity bit for a value with dozens of row lengths is the exclusive-or of dozens of nearly fair coins, which is fair very quickly. The bit for ∗5 is a single coin: whether the position holds an odd number of rows of exactly twenty-eight skittles. A row of twenty-eight is a long row, and in a random position of a few hundred skittles there is usually none of it at all. At three hundred skittles only 12 per cent of positions hold an odd number of them, against the half the limit needs.
Every cancelling set either contains ∗5 or does not, so this single coin splits the sixteen into two groups of eight. While the coin is biased towards even, the eight sets without ∗5 — pairing by value among them — are over-represented, and the eight with it are starved. That is exactly the division in the spread above, where every set holding ∗5 sat under 2.1 per cent at three hundred skittles. Pairing by value’s slow descent is mostly the slow arrival of rows of twenty-eight.
How far off a sixteenth is
Exact integers cost more as the totals grow, but only ratios are needed, and the same count run in floating point goes much further. It agrees with the exact count to six decimal places at three hundred skittles, and it reaches eight thousand in a few seconds.
At eight thousand skittles, pairing by value sees 7.49 per cent of the losses, still more than a percentage point above a sixteenth. Meanwhile the losses as a share of all positions have been a sixteenth to five decimal places since about two thousand skittles. That difference in speed is the same row-of-twenty-eight effect seen from another side. For the exclusive-or to be uniform, it is enough that four values spanning the four binary digits are fair coins, and ∗, ∗2, ∗4 and ∗8 each have dozens of row lengths. For pairing by value to reach its limit, every one of the eight bits must be fair, including the slowest.
The slowness can be estimated rather than just observed. Treat each row length’s count as an independent geometric variable with the mean the theory of random partitions gives it, and multiply out the chance that every value’s count is even. That approximation agrees with the exact share to about a hundredth of a percentage point at eight thousand skittles. Run forward, it puts pairing by value within one percentage point of a sixteenth at about twelve and a half thousand skittles, and within a tenth of a point only past a million.
So the limit is genuine but remote. Kayles positions of the size anybody plays sit at the start of the curve, where pairing by value is a large part of the story. A table of cancelling rows covers most losses at twenty skittles, three in ten at a hundred, about one in seven at three hundred. The fifteen sixteenths that belong to the exclusive-or arrive gradually, and they arrive at the pace of the rarest row.
The puzzle’s copying goes to nothing
The other layer, the copying of the puzzle books, has no such floor.
A mirror of 2m skittles is a partition of m doubled, so the mirrors grow like the partitions of half the total, while the losses grow like a sixteenth of the partitions of the whole of it. Partitions grow roughly like the exponential of a constant times the square root of the total, and halving the total divides that root by , so the ratio of the two falls away exponentially in the square root. At three hundred skittles there are 40,853,235,313 mirrors among 874,703,855,768,450 losses: about one in twenty-one thousand.
That gives the 1935 theorem a quantitative shape it did not have before. The step Bouton’s paper did not take — replacing each heap by its value — is the step that turns a vanishing share into a fixed one. Copying move for move needs the rows to be identical, and the chance of that dies. Copying value for value needs only the parities to vanish, and the chance of that settles at a sixteenth for as long as the game has eight values. The exclusive-or is still most of the theory. But the substitution is what makes the cancelling part permanent rather than a feature of small positions.
The strategy that is a symmetry in Cram has the same weakness as the puzzle’s copying, a strategy keyed to the exact shape of a position, and nothing in this count suggests a shape-keyed strategy can keep a share of the losses in a game whose positions keep growing.
Counting positions, not games played
Every share here weighs the positions with a given number of skittles equally. Each multiset of row lengths counts once, so a position of three hundred single skittles counts the same as one row of three hundred. That is the natural convention for a census and the one the earlier count used. It is not the distribution of positions that arise in play. A game started from one long row produces many medium rows and few single skittles in its early middle, and the shares among positions a game actually visits could be quite different.
The game is normal-play Kayles: knock down one skittle or two adjacent ones, and the player who cannot move loses. A misère game has no negatives, so the exclusive-or of values means nothing there and none of this applies. The Grundy values are the standard sequence, and the counts use values up to the length of the longest row allowed, computed from the empty row up.
What eight thousand skittles cannot prove
The limit itself. Nothing counted reaches a sixteenth. The exact share to three hundred and the floating share to eight thousand both lie above it and fall towards it. The value of the limit comes from the argument about fair coins, which rests on a theorem about random partitions rather than on anything measured here. The agreement of the coin approximation with the count at eight thousand, to about a hundredth of a point, is evidence that the argument describes the right mechanism, not a proof that it does.
Anything about strategy. A share of losses that pair by value says how often a player who only knows the cancelling table will recognise a lost position. It does not say how often such a player can move to one. In the earlier census, a move to a mirror existed in fewer than half the wins at twenty-four skittles. The corresponding count for moves to a position that pairs off by value is a different calculation, needing the moves out of every position and not just the parities, and it is not made here.
Whether other games behave the same. The reading follows from the same argument for any game whose rows take finitely many non-zero values. Games whose rows can be worth nought, as some rows of Dawson’s Kayles are, need the zero-valued rows treated separately, since they cancel nothing and are cancelled by nothing. The exponent then counts only the non-zero values. That is a short calculation, but it has not been made for any game except Kayles.
Still open: what a player in a real game would see
The count weighs every position of a size equally, and a player never meets positions that way. Each Kayles game starts from one row or a few rows and visits a thin trail of positions on the way to the end. The question this leaves is whether, along that trail, the share of lost positions that pair off by value looks like the census or like something else: plausibly larger, since games break long rows into a few medium ones rather than into the scatter a random partition produces, and the medium rows of Kayles are the ones whose values repeat most. The measurement is a census of the positions reached in optimal play from a single row, weighted by how often play passes through them — which needs a choice of how the winner chooses among winning moves, since there are often several. Sprague–Grundy says what each of those positions is worth, and the theorem that needed none of the theory is where Bouton’s arithmetic, the fifteen sixteenths, came from in the first place.
Part 6 of 7
One argument about Sprague–Grundy. The parts either side of it:
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.
CountingEventual periodicityGrundy valueKaylesNim-sumPairing strategyParityPartitionSprague–Grundy
- A code that climbs by three eventual periodicity, grundy value, nim-sum
- A list of shapes is an endgame table grundy value, nim-sum, sprague–grundy
- A period with a constant added eventual periodicity, grundy value, nim-sum
- A rare class exclusive-or respects eventual periodicity, nim-sum, parity
- A row of coins is already a sum grundy value, nim-sum, sprague–grundy
- A split matters at four heaps or at all of them grundy value, kayles, sprague–grundy