Impartial games

A split matters at four heaps or at all of them

Put a free split in front of a two-digit octal code and ask, heap by heap, whether the split decides the value. In 22 of the 64 codes it decides at two heaps at most, none larger than four, and never again. In the other 42 it decides at a fixed share of every heap there is — a quarter, a third, a half, all of them. Nothing in between, at a thousand heaps or at two thousand. 4.72 is one of the 42: the split into one and two that made it new at heap three is needed again at every third heap.

Assumes: Sixty-four codes, eleven sequences · One split is enough

Sixty-four codes, eleven sequences put a free split — break a heap in two, taking nothing — in front of every two-digit octal code, and matched the sixty-four resulting games against the 4,096 ordinary codes with up to four digits. Most turned out to be ordinary games in disguise. Two sequences were new, and for one of them the reason fitted in a single heap: in 4.72 a heap of three can be split into one and two, worth 1⊕2=31 \oplus 2 = 3, a value no move that removes counters reaches.

That left a question with two possible answers, and the essay named both. If the free split only ever matters at small heaps, then a code with the split allowed only below some size would give the same sequence, and the rules with a split digit would be the ordinary family plus a finite amount of extra structure at the start. If the split matters at every size, the column is a genuinely larger family.

The answer is both, sorted cleanly by code, and nothing in between.

Where the free split decides, code by code. An eight-by-eight grid of the take-and-break codes 4.d₁d₂. Each cell says where the free split decides a heap's value: nowhere for 11 codes, at one or two heaps no larger than four for 11, and at a fixed share of all heaps, from a quarter to all of them, for 42.
Fig. 1 Each code 4.d₁d₂ in an eight-by-eight grid, with where its free split decides a heap’s value. Eleven codes never need the split. Eleven need it at one or two heaps, all of them four or smaller. The other forty-two need it at a fixed share of every heap up to a thousand, from a quarter to all of them.

A local test for a global question

Capping the split and watching the sequence is the test the earlier essay proposed, and it is run below. But it answers a slightly different question from the one asked — it says where a capped sequence first goes wrong, and once one heap goes wrong every heap after it is computed from a wrong past. A cleaner test asks about each heap on its own.

At a heap of n, the Grundy value is the mex of the values of all its options. Some options remove counters and some, the free splits, do not. Take the game’s own true sequence below n, and compute the mex twice: once over all the options, once over the removals alone. If the two differ, the split is decisive at n: without it, that heap would be worth something else. If they agree, everything the split reaches at n is reached by a removal too, or by nothing the mex cares about.

The test is exact, local and cheap. It needs the sequence and nothing else, and it reports a set of heaps for each code. The question “does the split only matter at small heaps” becomes “is that set finite”.

Twenty-two codes are finished by heap four

The rules whose split is finished by heap four. The 22 codes 4.d₁d₂ whose free split decides the value at no heap, or only at heaps 2, 3 or 4 — 11 never and 11 at one or two small heaps.
Fig. 2 The twenty-two codes whose free split never decides past heap four. Eleven never need it at all; the other eleven need it at heap two, three or four — once or twice — and never again in a thousand heaps.

Eleven codes never need their split. In every one, whatever a split reaches, a removal reaches too: 4.05, 4.20 and 4.21, 4.24 to 4.27, 4.51, 4.55, 4.57 and 4.75. In each of them, at every heap, any value a split reaches is reached by some removal as well, so the split adds nothing the mex can use.

Eleven more need the split once or twice, at small heaps, and never again. 4.04, 4.50, 4.54, 4.56 and 4.74 need it at heap two, where splitting into one and one reaches nought and nothing else does. 4.15 needs it at heap three; 4.35 and 4.37 at heap four; 4.14 at heaps two and three; 4.34 and 4.36 at two and four.

For these twenty-two the earlier picture is exactly right. A code with the split allowed only at heaps of four or fewer is the same game, heap for heap, through the whole window; past heap four, the split could be deleted from the rulebook and nobody would notice. 4.74 is among them — take one counter, leave one heap or none, take two leaving two heaps, and a free split — and its split matters only at heap two.

Why heap two is the usual exception

Five of the eleven finished codes need their split at heap two and nowhere else, and the reason is the same in all five. A heap of two has exactly one split, into two heaps of one, and two equal heaps are worth nought whatever a heap of one is worth — the exclusive-or of a value with itself. So at heap two the split always reaches nought, and it decides the value exactly when no removal from a heap of two reaches nought too.

In 4.04 nothing else is possible at heap two at all: the first digit allows no removal of a single counter, and the second only a removal of two that leaves two heaps, which a heap of two cannot do. The split is the only move, it reaches nought, and the heap is worth 1 instead of the 0 a heap with no moves would be. In 4.50, 4.54, 4.56 and 4.74 the story is the same with different digits: whatever removals the rule allows from a heap of two, none of them reaches nought, so the split’s nought is needed. Past heap two, in those five codes, the removals always cover what the splits reach.

Heaps three and four play the same role in the other six. 4.15 needs its split at heap three, where the split into one and two reaches a value no removal does; 4.35 and 4.37 need it at heap four. These are the small-heap accidents the earlier essay’s single heap suggested might be the whole story, and for twenty-two codes they are.

Forty-two codes are never finished with it

The other forty-two are the opposite. Their decisive heaps do not thin out; they repeat. Over a thousand heaps each code’s split is decisive at a steady share of all of them, and the share is a simple fraction.

4.72: the split decides every third heap. The Grundy values of the game 4.72 at heaps 1 to 36, repeating 1, 2, 4, with the heaps where the free split decides the value marked: heaps 2, 3 and 4, then every multiple of three.
Fig. 3 The game 4.72 over its first thirty-six heaps, its values running 1, 2, 4 for ever, with every heap where the free split decides the value marked. The split decides at heaps two, three and four, and then at every multiple of three.

4.72 shows the shape. Its values run 1, 2, 4, 1, 2, 4 from the first heap and never take the value 3 — the sequence the earlier essay found new. The split into one and two at heap three is decisive, as that essay showed. It is not the last time. The split is decisive at every multiple of three, at heaps 6, 9, 12 and on through 999.

The reason is the same one-line arithmetic, repeated, and it is the kind of residue argument Grundy sequences are usually proved periodic by. A heap that is a multiple of three is worth 4. Its removals reach 2 and 1, the values of the heaps one and two below, and taking a counter and leaving two heaps reaches 0 and 6 — two parts whose sizes add to two more than a multiple of three are either both one more than a multiple of three, worth 1⊕1=01 \oplus 1 = 0, or a multiple of three and two more than one, worth 4⊕2=64 \oplus 2 = 6. Nothing a removal reaches is worth 3. A free split of a multiple of three can make parts one more and two more than multiples of three, worth 1⊕2=31 \oplus 2 = 3, and that is what pushes the heap’s value to 4. Take the split away at any one of those heaps and it is worth 3 instead, and the pattern breaks from there.

So the heap-three move the earlier essay found was not a boundary effect. It was the first instance of a move the game needs at a third of all heaps.

The shares are simple fractions

The share of heaps a free split decides. The 42 codes whose free split decides at a fixed share of all heaps, grouped by that share — a quarter, a third, five twelfths, a half, seven twelfths, three quarters or every heap — with eight codes whose decisive heaps show no short repeat.
Fig. 4 The forty-two codes whose split decides everywhere, grouped by the share of heaps where it does: a half and a quarter for eight codes each, all of them for four, a third, five twelfths and seven twelfths for four each, three quarters for two — and two groups of four with no short repeat at all.

Thirty-four of the forty-two have a decisive set that repeats exactly, with a short period, over the second half of the window. Their shares are a quarter, a third, five twelfths, a half, seven twelfths, three quarters, and all. 4.10 to 4.13 need their split at almost every heap — 997 to 999 of the first thousand. Their first digit lets a single counter be taken only when it is the last one, so a heap’s removals are few, and the split is what lifts nearly every value. 4.02 and 4.03 need it at three heaps in four.

The eight codes without an exact share are worth a sentence, because they connect to something unsettled. The two genuine disguises in the earlier essay were sixteen codes whose sequences are ordinary games shifted by a counter: eight equal to Kayles one heap over and eight equal to ·777 one heap over. The Kayles eight have exact shares, five twelfths and seven twelfths, as Kayles’s own period of twelve suggests. The ·777 eight show no repeat in their decisive heaps shorter than 120, and decide at about 63 and 47 per cent of heaps. ·777 is one of the octal games nobody has settled, and the split’s decisive set inherits that: where the sequence has no known period, neither does the set of heaps where the split matters.

Both new sequences are new everywhere

The earlier essay found two sequences in the column that no ordinary code with up to four digits produces. One was 4.72’s, with its heap-three argument. The other was shared by 4.12 and 4.13, and for that one the essay had no argument at all — only the absence of a match.

The census supplies one. 4.12 and 4.13 are among the four codes whose split decides at nearly every heap, 998 and 997 of the first thousand. A sequence produced by a rule that leans on a move of a kind no ordinary code has, at almost every heap, is the sequence one would expect to find nowhere in the ordinary family; and 4.72 and its three partners lean on it at a third of all heaps. Both new sequences come from codes whose split is never finished with, and none of the twenty-two finished codes produces a new one. That is not a proof that a sequence is new — an ordinary code with more digits could still reach the same values by other routes — but it puts the two exceptions on the right side of the line for a reason rather than by coincidence.

The converse does not hold, and it is worth saying so plainly: most of the forty-two codes that use their split everywhere still produce sequences the ordinary family has. Needing a move at every heap is necessary for novelty here and nowhere near sufficient.

Capping the split, as the earlier essay proposed

The global test — allow the split only up to a size, and watch the sequence — gives the same division and shows how sharp it is.

Capping the free split. Five codes with the free split allowed only up to heap 0, 3, 10 and 100, and the first heap where the sequence then departs from the full code's. Codes whose split decides at a share of all heaps depart just past every cap; codes whose split decides only at small heaps never depart once the cap passes four.
Fig. 5 Five codes with the free split allowed only up to a cap, and the first heap where the capped sequence departs from the full one. For 4.72, 4.12 and 4.00 the sequence departs within two heaps of any cap, however large; for 4.34 and 4.74 any cap of four or more changes nothing.

For a code whose split is decisive everywhere, any cap breaks the sequence almost at once. 4.72 capped at three departs at heap four; capped at ten, at heap twelve; capped at a hundred, at heap 102 — the next multiple of three past the cap. 4.12 and 4.00 behave the same way. There is no cap large enough, because the split is needed at heaps of every size.

For a code whose split is finished by heap four, a cap of four or more changes nothing anywhere in the window. 4.34 capped at four is 4.34; 4.74 capped at three is 4.74. The cap-and-watch test and the heap-by-heap test agree code by code, which is reassuring and also expected: a heap where the split is decisive is exactly a place where removing it changes a value.

Twice the window, the same answer

A finite window can mistake a slow change for no change, and the obvious worry is a code whose split stops mattering late — at heap 1,500, say — or starts mattering late.

The classification at 1,000 and 2,000 heaps. The split codes classified over 1,000 and 2,000 heaps: 11 never decisive, 11 decisive only at heaps up to four, 42 decisive at a share of all heaps, identical at both windows.
Fig. 6 The classification over 1,000 and over 2,000 heaps. Every code keeps its class, every code finished by heap four keeps the same decisive heaps, and every exact share is the same share.

Over 2,000 heaps nothing moves. The eleven codes that never need the split still never need it; the eleven that need it at small heaps need it at the same heaps and nowhere else; the forty-two keep their shares, the exact ones exactly. That is evidence and not a proof — a code could in principle change its behaviour past any window — but for the thirty-four codes with an exact share there is more than evidence available. Their sequences are periodic, settled by the earlier sweeps, and once a sequence has settled into its period the sets of values its removals and its splits reach settle into a period too — the standard argument that lets a finite window prove an octal game periodic — so the decisive set repeats from some point on. For those codes the share is very probably the share for ever, though the bound on where the repeat begins is not computed here.

The convention, and what decisive means

Codes are written d0.d1d2d_0.d_1d_2: the digit d0=4d_0 = 4 allows splitting a heap into two non-empty heaps without removing anything, and each later digit dkd_k says what may be left after removing k counters — bit 1 for nothing, bit 2 for one heap, bit 4 for two non-empty heaps. Normal play throughout, values by the mex rule. A heap n is decisive for the split when the mex of all its options differs from the mex of its removal options alone, both computed from the game’s own full sequence below n. A cap allows the split only at heaps up to a stated size, and the capped sequence is computed from its own past. A share is exact when the decisive heaps repeat with a period of at most 120 over the second half of the window.

What the census cannot show

That the dichotomy holds for longer codes. Sixty-four codes with two digits after the point is a small family. A code with three or four digits has more removals, so its split is more often covered, and it might also have decisive sets that are finite but large — decisive at a dozen heaps up to fifty, say, and then never. Nothing here rules that out; it simply never happens among the sixty-four.

Why the two classes are so far apart. The finished codes stop by heap four and the others decide at a quarter or more of all heaps. A short reason exists for each code separately — the 4.72 arithmetic above is one — but no general argument is given here for why a split that matters at a fifth heap must matter at a positive share of all heaps.

And what the shares measure. A share is a count of heaps where one kind of move is needed. It says how often the split is indispensable, not how much it changes the values when it is, and two codes with the same share can differ a great deal in what the split does to them.

A family that splits in two

The formula is a limit found Lasker’s Nim as the limit of codes with the split digit and a growing cap on the take; one split is enough found that Lasker’s Nim needs only the smallest splits. Both were about which splits a code needs. This census is about where, and the answer divides the column in two. Twenty-two codes are ordinary codes with a finite preamble — a few small heaps where a split happens to be needed, and then an ordinary game. Forty-two are not ordinary codes in any cheap sense: their split is a working part of the rule at every scale, as much as a removal is.

The disguises the earlier essay found fall on the second side. Kayles one heap over and ·777 one heap over are sequences the ordinary family already has, and still the rules that produce them use their split at five to seven heaps in twelve. A code can be an ordinary game in its values and a splitting game in its moves at the same time, which is the distinction the heap is not the position draws between a description and the game it describes, now with a count attached.

Still open: whether a decisive set can be finite and long

The sixty-four codes leave a gap between “at most two heaps, all below five” and “a quarter of everything”. The family where that gap could close is the three-digit codes 4.d₁d₂d₃, 512 of them, with more removals to cover the split and more room for an intermediate case: a split decisive at heaps up to some size well past four and then never. A single such code would turn the dichotomy into a spectrum and make the cap a real parameter — the size at which a splitting game turns into an ordinary one — and octal games is where the ordinary half of that comparison is already written down.

Part 6 of 8

One argument about Lasker. 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.

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.

Exhaustive searchGrundy valueKaylesMexOctal gamePeriodicitySprague–GrundyTake-and-break