# Indistinguishability quotient

In combinatorial game theory, and particularly in the theory of impartial games in misère play, an indistinguishability quotient is a commutative monoid that generalizes and localizes the Sprague-Grundy theorem for a specific game's rule set.

In the specific case of misere-play impartial games, such commutative monoids have become known as misere quotients.

## Example: The misere quotient of Nim played with heaps of size 1 and 2 only

Suppose the game of Nim is played as usual with heaps of objects, but that at the start of play, every heap is restricted to have either one or two objects in it. In the normal-play convention, the last player to take an object from a heap declared the winner of the game; in Misere play, that player is the loser of the game. Then regardless of whether the normal or misere play convention is in effect, the outcome of such a position is necessarily of one of two types:

N : The Next player to move has a forced win in best play; or

P : The Previous player to move has a forced win.

We can write down a commutative monoid presentation for the misere quotient of this 1- and 2-pile Nim game by first recasting its conventional nimber-based solution into a multiplicative form, and then modifying that slightly for misere play.

### Normal-play analysis

The nimbers that occur in the normal play of such positions are *0, *1, *2, and *3.

Nimber Outcome Positions with that nimber
${\displaystyle \ast 0}$ P Even number of heaps of size 1 and even number of heaps of size 2
${\displaystyle \ast 1}$ N Odd number of heaps of size 1 and even number of heaps of size 2
${\displaystyle \ast 2}$ N Even number of heaps of size 1 and odd number of heaps of size 2
${\displaystyle \ast 3}$ N Odd number of heaps of size 1 and odd number of heaps of size 2

These four nim values combine according to the Klein four-group:

+ ${\displaystyle \ast 0}$ ${\displaystyle \ast 1}$ ${\displaystyle \ast 2}$ ${\displaystyle \ast 3}$
${\displaystyle \ast 0}$ ${\displaystyle \ast 0}$ ${\displaystyle \ast 1}$ ${\displaystyle \ast 2}$ ${\displaystyle \ast 3}$
${\displaystyle \ast 1}$ ${\displaystyle \ast 1}$ ${\displaystyle \ast 0}$ ${\displaystyle \ast 3}$ ${\displaystyle \ast 2}$
${\displaystyle \ast 2}$ ${\displaystyle \ast 2}$ ${\displaystyle \ast 3}$ ${\displaystyle \ast 0}$ ${\displaystyle \ast 1}$
${\displaystyle \ast 3}$ ${\displaystyle \ast 3}$ ${\displaystyle \ast 2}$ ${\displaystyle \ast 1}$ ${\displaystyle \ast 0}$

The Klein four-group is also defined by the commutative group presentation

${\displaystyle \mathrm {V} =\langle a,b\mid a^{2}=b^{2}=1\rangle }$.

The elements of ${\displaystyle \mathrm {V} =\{1,a,b,ab\}}$ can be thought of as in one-to-correspondence with the nim values ${\displaystyle \{\ast 0,\ast 1,\ast 2,\ast 3\}}$ that occur in the play of this simplified Nim game; they combine exactly in the same way.

So far, this formal introduction of the Klein four-group has added nothing new to the conventional analysis of 1- and 2-pile Nim using nimbers and nim-addition. Instead, we have merely recast the theory into a multiplicative form.

### Misere-play analysis

The advantage of the multiplicative form is that it allows us to write down a similar solution for the misere quotient of Nim played with heaps of size one and two only.

We introduce the commutative monoid presentation

${\displaystyle \mathrm {M} =\langle a,b\mid a^{2}=1,\ b^{3}=b\rangle .}$

whose six elements are ${\displaystyle \{1,a,b,ab,b^{2},ab^{2}\}.}$

Misere quotient value Outcome Positions in that class
${\displaystyle 1}$ N Even number of heaps of size 1 and no heaps of size 2
${\displaystyle a}$ P Odd number of heaps of size 1 and no heaps of size 2
${\displaystyle b}$ N Even number of heaps of size 1 and odd number of heaps of size 2
${\displaystyle ab}$ N Odd number of heaps of size 1 and odd number of heaps of size 2
${\displaystyle b^{2}}$ P Even number of heaps of size 1 and even number (greater than zero) of heaps of size 2
${\displaystyle ab^{2}}$ N Odd number of heaps of size 1 and even number (greater than zero) of heaps of size 2

### Comparison with the conventional misere Nim strategy

The solution to the correct play of misere Nim was already fully described by Bouton in 1902.[1] In the final sentence of that paper, Bouton writes that in misere Nim, "the safe combinations are the same as before, except that an odd number of piles, each containing one, is now safe [ie, is an P-position], while an even number of ones is not safe [ie, is an N-position]." The misere quotient formulation above is easily seen to be equivalent in the case of Nim played with heaps of size one and two only.

## Formal Definition

Suppose ${\displaystyle A}$ is a set of impartial combinatorial games that is finitely-generated with respect to disjunctive sums and closed in both of the following senses:

(1) Additive closure: If ${\displaystyle G}$ and ${\displaystyle H}$ are games in ${\displaystyle A}$, then their disjunctive sum ${\displaystyle G+H}$ is also in ${\displaystyle A}$.

(2) Hereditary closure: If ${\displaystyle G}$ is a game in ${\displaystyle A}$ and ${\displaystyle H}$ is an option of ${\displaystyle G}$, then ${\displaystyle H}$ is also in ${\displaystyle A}$.

Next, define on ${\displaystyle A}$ the indistinguishability congruence ≈ that relates two games ${\displaystyle G}$ and ${\displaystyle H}$ if for every choice of a game ${\displaystyle X}$ in ${\displaystyle A}$, the two positions ${\displaystyle G+X}$ and ${\displaystyle H+X}$ have the same outcome (i.e., are either both first-player wins in best play of ${\displaystyle A}$, or alternatively are both second-player wins).

One easily checks that ≈ is indeed a congruence on the set of all disjunctive position sums in ${\displaystyle A}$, and that this is true regardless of whether the game is played in normal or misere play. The totality of all the congruence classes form the indistinguishability quotient.

If ${\displaystyle A}$ is played as a normal-play (last-playing winning) impartial game, then the congruence classes of ${\displaystyle A}$ are in one-to-one correspondence with the nim values that occur in the play of the game (themselves determined by the Sprague-Grundy theorem).

In misere play, the congruence classes form a Commutative monoid, instead, and it has become known as a misere quotient.

## Algorithms for computing misere quotients

Many more complicated and intricate misere quotients have been calculated for various impartial games, and particularly for octal games. A general-purpose algorithm for computing the misere quotient monoid presentation of a given a finite set of misere impartial game positions has been devised by Aaron N. Siegel and is described[2] in its Appendix C.