[ 527 ]
DISJUNCTIVE GAMES WITH THE LAST PLAYER LOSING
BY P. M. GRUNDY AND C. A. B. SMITH
Received 8 June 1955
1. Introduction. Various authors have discussed the 'disjunctive compound' of
games with the last player winning (Grundy(2); Guy and Smith (3); Smith (4)). We
attempt here to analyse the disjunctive compound with the last player losing, though
unfortunately with less complete success. The problem was explored tentatively by
the first named author, but the rigorous development is due to the second.
The notation used is that of Smith (4). Briefly, V (with or without a suffix) denotes
a position in a game F (Vr in F r ). A follower Vi of F is a position such that there is a legal
move from F to V1. A position with no follower is terminal. The two players A and B
move alternately, A from F to Vi, B from Vi to Vij, and so on; the sequence of moves is
a (complete) play, which we suppose always ends with a terminal position. For any
given position F we suppose that there is a maximum number of moves in any play;
this is D(V), the terminal distance of F. We consider here only the cases in which the
last player loses. Each position Fthen belongs to just one outcome class 0(V) = ^V OT0*,
the intuitive meaning of which is that if VejV the Next player can force a win, and
if F € SP the Previous player can. The rule is that all terminal positions belong to JV,
all positions with any follower in 0* belong to ^V, while positions with all followers
in JV belong to 8P.
Consider a set of k games F r (1 ^ r =% k), no two having any positions in common, and
let Vr denote a typical position in F r . The disjunctive compound F has as positions V all
classes (Vr) including just one Vr from each F r ; and W = (Wr) is denned to be a follower
of F = (F,) in F when there is an s such that Ws is a follower of Vs in Fs, and Vr = Wr for
r=)=s. A well-known example is Nim (Bouton(i)), in which F r is the game played on
a single heap of counters.
2. Preliminary classification of positions. Any positive integer x has a unique binary
expansion x = E2w with no two yi equal. We write ^(x) = the set of all yit and
&r(Q) = 0, the empty set. Conversely, given any set SP of non-negative integers, there
is a unique x such that tF(x) = Sf:
(1)
* = S2w ( y ( e ^ ) .
c
Let C(r) be defined by O(0) = 0,O(r + l) = 2 w. If C(r)Hx<C(r+l), write Z>{a;} = r.
Then D{x] is defined for all x ^ 0, is a non-decreasing function of x, and satisfies
(2)
D{x) = 1 +max [D{y}:ye^(x)]
for x>0. We now define a function E( V) of the position V by
^(E{ V)) = the set of values of all E{ V1),
(3)
so that if V is terminal, E(V) = 0; otherwise the process is inductive, since it defines
E{ V) in terms of E( Ff), where the F* have smaller terminal distance than F. Also, by
induction over D( F)
(4)
D( V) = D{E{ V)}.
34-2
Downloaded from https:/www.cambridge.org/core. IP address: 88.99.165.207, on 12 Jul 2017 at 15:25:36, subject to the Cambridge Core terms of use, available
at https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S0305004100031510
528
P. M. GRTWDY AND C. A. B. SMITH
The U-values themselves may be regarded as positions in a game, with the rule that
y is a follower of x if y e !F(x).
If \Jr( V) is a function on any game, with the property that it has the same value for
all terminal positions, and such that ^(F)for non-terminal V is uniquely determined by
the set of values of ^jr{Vi), then ^ ( F ) is a one-valued function of E(V), and we write
^•(F) = f{E{V)}. Examples are the functions D(F), 0(F), defined above and J(V),
K( F) considered later in this paper; also G( V) used by Grundy (2) [called by him Q( F)]
and by Guy and Smith (3) for the solution of the disjunctive compound with the last
player winning. The values are shown in Table 1 for E( V) ^ 16, including all positions
of terminal distance not exceeding 3. It seems convenient to include in this table
some other functions -R(F), SP(V), SN(V) of the general type ifr(V); their properties
and applications are discussed by Smith (4) in relation to the general theory. They
take the values i?( F) = SN(V) = l,SP(V) = 0 for terminal positions F, while for other
positions they are defined inductively by
(i) R(V) — 1 is equal to the least even R(Vi), if it exists, and to maxjR(F*) if all
are odd,
(ii) SP(V) = l + max-VF*),
(iii) SN(V) = l + min/Sfp(F*).
It can readily be shown that R( V) is even or odd according as (9( V) = 0> or JV.
Table 1. Functions of E(V)
E(V)
D(V)
SP(V)
SN{V)
G(V)
R(V)
0(V)
K(V)
J(V)
0
0
0
1
0
1
JV
0
1
1
2
1
1
2
&
1
1
2
2
2
3
0
3
JV
0
0
3
2
2
1
2
3
./T
3
1
4
5
6
7
3
3
4
1
1
4
0>
1
3
4
3
3
4
1
2
3
2
3
Jf
3
Jf
4
3
1
4
0>
1
2
0
0
8
3
2
3
0
3
2
2
9
4
0>
8
3
2
1
1
4
0>
1
0
0
10
3
2
3
0
3
11
3
2
1
3
3
JV
0
11
1
3
12
3
4
3
1
4
g>
l
0
13
3
4
1
1
4
0>
1
0
14
3
4
3
3
3
JV
11
3
15
16
3
4
1
3
3
jr
11
3
4
4
5
0
5
0
1
The inductive argument also shows that E(V) for a disjunctive compound F = (Vr)
is uniquely determined by the E(Vr). It may be noted that this method of combination
leads to inversions of order; e.g. if E(Vj} = i/(F2) = 3, and E(V2) = 2, then
z) = 16392<£(F1, V'2) = 16404.
3. Further classification of positions. In principle the above combination of .©-values
provides a solution to the disjunctive combination. However, as will be seen below,
a more efficient classification is provided by a function K( V) of the positions F in
agame F, defined as follows. Suppose that K(W) is defined for all WwithD(W) < D(V).
We then say that an integer x ^ 0 is K-related to V if
(5a) for all y € ^(x), 3F* with K^) = y;
(5 b) for all F% y = K{ Ff) satisfies either y € ^(x) or x e ^"(y) (necessarily as i/ < x
ov x<y respectively);
Downloaded from https:/www.cambridge.org/core. IP address: 88.99.165.207, on 12 Jul 2017 at 15:25:36, subject to the Cambridge Core terms of use, available
at https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S0305004100031510
Disjunctive games with the last player losing
529
HK*(V) is defined by
&(K*( V)) = the set of values of aU K( V1),
then K*(V) is certainly if-related to F; and by (5a) all x which are i£-related to V
satisfy x < K*( V). We can accordingly define K( V) as the smallest non-negative integer
if-related to F. In particular, K(V) = 0 for a terminal position F. This definition
extends to all F by induction over D(V), and
(6)
We call aposition V primary if there is only one x ^-related to F, i.e. if K (F) = K *( F),
and secondarytfK(V) < K*(V). Accordingly, F is primary if all K{ V1) e J^-K^ F)), and
secondary if ^ ( F ) e J sr (Z(F i )) for some F \ In the latter case, by (5a), there exists
a V*i such that ZfF*') = K(V), while Z>(Ff') < D(F); if also F« is secondary, we can
similarly find a Viilm with K(Viilm) = K(Vij) = K(V). This process must terminate,
since D(Vij—) cannot become negative; thus if F is secondary there exists a primary
V such that K( V) = K( V), D{ V) < D{ V).
We now show that
<9{V) = Q{K{Vj\
(7)
(where the right-hand side denotes the outcome class of the position K( V) in the game
of-B-values). The relation is true for terminal F; suppose it true for all W for which
D{W)<D(V). Then if x = K{V) satisfies (9{x) = &>, it follows from (56) that all
(9{K( V*)} = G{ Ff) = JV, SO that G{ V) = 0>. If 0{x} = JT, we may have x = 0, whence
<P(V) =Jf by (5c); otherwise, Kye^ix) with 0{y} = 0>, so that by (5a) lKVi€^>,
whence V ZJV. In either case 6(V) = (9{K(V)}, so the inductive proof is complete.
The same argument now shows that for any x iiT-related to F,
(8)
This in turn implies (5c), so that the conditions (5o-c) for if-relationship can be
replaced by the equivalent set (5a), (56) and (8).
Now (P( V) is uniquely determined by the set of values of (9{ V*) = @{K(Vi)}; so conditions (5a), (56) and (8) determine K{V) in terms of the set of all KiV1). Hence K{V)
is a one-valued function K{E{V)} of E(V), and by (6)
K{e) < e for all e.
The conditions for an x ^ 0 to be ^-related to F then become, in terms of e = E( F):
(9a) y€^(x) implies y = K{z} for some ze^F(e),
(96) y = K{z) and ze,F(e) imply either ye&(x)
orxe^iy),
(9c) (9{x) = 0{e}.
The least such x is if{e}. This enables one to calculate K{x] inductively, with the
results shown in Table 1.
LEMMA 10. LetE(W) = K(V) for two positions W and V (possibly in different games).
ThenK(W) = K{V).
Proof. The lemma is true for terminal F or W. Suppose if possible that it is untrue
for some pair of positions F, W; choose such a pair with the least value of D( V) + D( W),
Downloaded from https:/www.cambridge.org/core. IP address: 88.99.165.207, on 12 Jul 2017 at 15:25:36, subject to the Cambridge Core terms of use, available
at https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S0305004100031510
530
P . M. GRTTNDY AND C. A. B. SMITH
which necessitates F being primary. Let E( W) = K( V) = z. For all Wr then
mtm x
' - "*'-), and so 3F* with JT(Ff) = E{W) = K(W), since
Thus the set of values of all K^V1) and the set of all K(Wr) both coincide with ^(z);
hence K(V) = K(W), which gives the required contradiction.
For any F, a W satisfying the condition of the Lemma can be found in the game of
^-values. Thus
= K{V);
(11)
K^V)}
that is, for any non-negative integer e = E(V),
K{K{e}} = K{e}.
Equation (11) shows that the possible values of K(V) are hmited to solutions of the
equation K{x) = x. Conversely, if K{x} = x, a position F (available in a suitable game)
with E( V) = x satisfies K( V) = x. These solutions are readily found by using the
relations (9o-c). In particular, (9a) shows that if K{x] = x then, for all y in ^(x), we
have K{y] = K{K{z}} — K{z) = y, which limits the search. It is convenient to number
the solutions successively as K0 = 0, K1 = 1, K2 = 3, etc.; the values up to K21 are given
in Table 2. This includes all Kr with D{KT} «S 4, and hence all K{ V) with Z>( F) < 4.
Table 2. Properties of the KT with terminal distance up to 4
Kr
Kg=0
£
K%
=
1
o
/c3=8
/c4 = 11
K6 = 256
/c6 = 257
K, = 258
*r8 = 264
/<•„ = 2 6 5
K10= 266
D{KT)
0{Kr}
0
1
2
3
3
4
4
4
4
4
4
JV
0>
JT
0>
K,
0
Kg, Kx
K2
Ko, Klt
K2
JT
K
3
Kg,
K3
JT
JV
Jf
= 267
AT12 = 2048
K13 = 2056
KU = 2059
KU = 2304
AT16 = 2305
KX1 = 2306
KW = 2312
KW = 2313
/cao=2314
/c 2 1 = 2315
KU
Kg
K%, K3
Kg,
Ki,
K2,
K3
K2,
K3
D{Kr)
0{Kr}
4
4
4
4
4
4
4
4
4
4
4
Jf
^KT)
Kg, K^, K2,
K3
K
(ffl
l
Kt
K2,
Kg, Klt ACa,
Kg,
jr
Klt
Kt
K3,
Kt
K3
K
l
K3
K
l
K
^2* 3 l
K2, K3 Kt
JV
Ko,
jr
Kg, K^, K%, K3
K
i,
K 2,
K3
K
l
Kl
LEMMA 12. Let x =# K{ V) be K-related to V. Then there is no position W in any game
with the property that K( W) = x.
Proof. It suffices to show that there is no such primary position W. Suppose, if
possible, that such a W exists, Then ^(x) is the set of values of K(WT). Also, by (5a)
and (56), 2F(x) is the subset of all y = K^) which satisfy y<x. Similarly, ^(K{V))
is the subset of all y satisfying y < K{ V). But x > K( V) by the definition of K( V), so by
the preceding remarks ^{K( V)) £ SF{x); hence, putting K{ V) = k, wefindthat for all
ye^(k), 3 Wr such that K( Wr) = y. Again, since the set of all K(Wr) has been seen to
be included in the set of all^T(Fi), we have from (5 6) that for all Wr,y = K( W) satisfies
either ye^(k) or keS*(y). Finally, by (8), @{W) = (9{x) = <9{V) = 0{k}.
These are just the conditions for k = K(F) to be iT-related to W, so that
and this gives a contradiction.
Downloaded from https:/www.cambridge.org/core. IP address: 88.99.165.207, on 12 Jul 2017 at 15:25:36, subject to the Cambridge Core terms of use, available
at https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S0305004100031510
Disjunctive games with the last player losing
531
4. Application to disjunctive compounds. Now consider a disjunctive compound
Z of positions V and W. The followers of Z consist of all compounds of the form
X* = (V\ W) and XT = (V, Wr). We assert
13. K{X) is uniquely determined by the pair of values K{V), K(W).
Proof. Suppose, if possible, that this is not so: let K{VX) = K(V2) and K{WX) = K(W2),
but K(X1)^K(X2), where Xt - (F^, Wt). We do not necessarily suppose that Vx and V2
belong to the same game, nor Wx and W2. Choose such a pair X1} Z 2 with the smallest
THEOREM
possible D(XX) + D(X2) = D(VX) + D(WX) + D{V2) + D(W2).
We first show that F1; Wx, V2, W2 cannot all be primary. If they were, then to every
V{ there would correspond a V{ such that K(V\) = K(V{), and vice versa. Since
i)(Fl)<D(F 1 ) and D(V}2)<D(V2), we should therefore have K(V\, Wt) = K{V{, Tf2).
Similarly for the W{, JFf; so the sets of values of the K{X%) and K{X\) would coincide,
whence K(XX) = K(X2), contrary to hypothesis.
Suppose therefore that Vx (say) is secondary, and possibly also V2 or Wx or W2. Then
there exist primary positions Vx, V2, Wv W2 with K{V1) = K{V1), D{VX)<D{V1),
K{V2) = K(V2), D(V2)^D(V2), and so on. By choice of X± and X2, therefore (with the
obvious notation), K(X2) = KlXj) = K(X2) = k, say. We now show that k is if-related
to Xv First, as regards condition (5a), if y e £F(k) there certainly is a follower X\ of Xx
with K{X{) = y. If X{ is of the form (V{, Wx), then since
we can find corresponding positions, say V\, V\, such that K(V\) = K(V\) = K(V\).
ConsequentlyK(X\) = K(X\) = K{X\) =_y,whereX{ = (ViW&Xi = (F|, W2),which
verifies (5a). Similar reasoning holds if X\ is of the form (Vv W\).
As regards (56), consider any follower X\ of Xx; and suppose (without loss of
generality) that X{ is of the form (V{, Wx). Let y = K{X{), z = iT(Fi)._Then either
z e ^(KiVj)) or -K^Fj) e tF(z). In the first case, we can find corresponding V\ (a follower
of Tj) and F|_such that ^as before) y = K(X{) = K{X\\) = K{X\); but since X\ is
a follower of Xlt and KiXJ = /fc, either ye^(k) or k€^(y). If on the other hand
Z(F1)€tT(z) = jF(iT(Fj)), by (5a) there exists F? such that ir(F^) = Jrc^) = Z(F a ),
and it foUows that k = K{X2) = JC(Z?), where Z ^ = (F?, H^). Since Z ^ is a follower
of Zj, either y = K(X{) e &(k) or ifc e ^(j/).
We have to show finally that X1eJ/~ whenever k = 0. In that case certainly Xt c^V.
If Xx is not terminal, there exists an X{ in 0>, and since A"(Zj) = K(X{) we have ZJ e 0>,
whence X-^ejV. If on the other hand Xx is terminal, so also are Vx and Wv so that
iT(T^) = K(WX) = 0. In that case the next player at Z x has a winning strategy by
moving either to (F|, Wx), where Fje^*, -K^(Wi) = 0, or to a similar position with F,
W interchanged. Either the second player then terminates the game and loses, or the
first player can return to such a position, and so on until the second player loses. But
this means that the next player can force a win, i.e. XX€JV.
Thus all the conditions are satisfied, and k = K(X2) is 2iT-related to Z x . By Lemma 12,
k = K(XX); but this contradicts the assumption that K(X1) + K(X2). Hence the
theorem is established.
Downloaded from https:/www.cambridge.org/core. IP address: 88.99.165.207, on 12 Jul 2017 at 15:25:36, subject to the Cambridge Core terms of use, available
at https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S0305004100031510
532
P . M. GRTTNDY AND C. A. B . S M I T H
We can accordingly define an operation of K-addition by
For
K
example
K
Z+K 2
we find K0 +KKr = Kr, K1+KK1
= "l3>
e t c
= K0, KZ+KK1
= K4, KS+KK1
= K1S,
-
Since the disjunctive compound is commutative and associative, so also is the
operation +K, so that
K(V, W, X) =
and so
K(V)+KK(W)+KK(X)
<9(V, W, X) = &{K(V)+KK(W)+KK(X)}.
(14)
Table 3. Values of J(V, W) for K(V) = Kr and K{W) = KS
\r
0
1
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16 17 18 19 20 21
1
0
2
0
3
1
2
1
1
3
0
1
3
1
2
0
3
0
0
2
2
3
0
2
1
3
0
4
3
1
0
1
2
0
3
1
1
2
1
3
3
2
1
3
0
2
1
5
2
0
1
0
3
1
2
0
0
3
0
0
2
3
0
1
1
0
0
0
2
4
1
0
4
2
5
3
0
1
3
0
1
0
3
1
2
0
2
3
0
0
3
2
1
3
0
0
4
0
0
0
1
0
4
3
5
2
2
1
2
0
s\
0
1
2
3
4
5
6
7
8
9
3
2
1
3
0
2
4
5
2
0
0
1
2
0
3
1
2
2
1
1
0
1
2
0
3
1
2
2
1
3
4
5
6
4
7
5
5
2
5
5
1
0
3
1
2
0
0
3
0
2
2
3
0
1
1
0
0
0
3
4
1
0
4
2
5
3
0
1
3
5
1
0
3
1
2
0
2
3
0
2
4
5
3
1
2
0
3
0
0
2
1
0
4
5
5
4
2
1
6
6
4
5
6
4
7
5
5
3
5
5
Since the best play in a game is determined by the function &(V), this provides in
principle a complete solution for the disjunctive compound in terms of the values of
K
r+KKs a n d °f ®{Kr}> which could be tabulated. Unfortunately the necessary tables
would be of astronomical size even for small terminal distances, and so could not be
used in practice. (There are 4171780 values of Kr with D{KT} < 5.)
The question arises whether the solution in terms of K is the 'best possible'. Two
positions V, V may be called equivalent if Q(V, W) = @{V, W) for all W. The essential
feature of K is that K(V) = K(V') implies the equivalence of F and F', and if the
converse is true the use of K(V) may be considered to give a best possible solution.
Unfortunately we do not know whether this is so, but we can show that, for the
values in Table 2, K( V) < K( V) ^ K21 certainly implies that V and V are inequivalent.
This makes it unlikely that even a best possible solution could be simple enough for
practical use in the general case, which is surprising considering the simplicity of
the particular case of Nim (Bouton(i)). The simplest way of demonstrating the inequivalence seems to be as follows.
We define a function J{xr} inductively as the smallest non-negative integer not in
J{^(Kr)}, for r > 0, and by J{K0} = J{0} = 1. By induction, J{KT) = 0 if and only if
<9{Kr} = 0>.We then define J(V) = J{K(V)}. For terminal V, J{V) = 1, and for nonterminal F conditions (9a-c) show that
J(V) = the least non-negative integer different from all «/(F*);
(15)
Downloaded from https:/www.cambridge.org/core. IP address: 88.99.165.207, on 12 Jul 2017 at 15:25:36, subject to the Cambridge Core terms of use, available
at https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S0305004100031510
Disjunctive games with the last player losing
533
also, J(V) = 0 when and only when Ve0>. (Compare the G-function (Grundy(2);
Smith(4)) for last player winning games. We can show that G(V) is a one-valued
function of K{ V), but we do not need this.) Also, if Lm denotes a pile ofTOcounters in
(last player losing) Nim, it is readily shown that the disjunctive compound (V, Lm) is
in & or Jf according as J(V) is or is not equal to TO. It follows that V and V are
certainly inequivalent if there is a W such that J(V, W)3=J(V, W). But the values of
J(V, W) for positions of terminal distance not exceeding 4 are readily calculated
directly from (15) for various values of K(V) and K(W); a selection of these values is
shown in Table 3. Since no two columns of this table are equal, it follows that no two
positions V with distinct values of K( V) in this range are equivalent.
REFERENCES
(1) BOUTON, C. L. Nim, a game with a complete mathematical theory. Ann. Math., Princeton,
(2) 3 (1902), 35-9.
(2) GRUNDY, P. M. Mathematics and games. Eureka, 2 (1939), 6-8.
(3) GTTY, R. K. and SMITH, C. A. B. The Cr-values of various games. Proc. Carrib. phil. Soc.
52 (1956), 514-26.
(4) SMITH, C. A. B. Compound two-person deterministic games (unpublished).
NATIONAL FOUNDATION FOR EDUCATIONAL RESEARCH
LONDON
UNIVERSITY COLLEGE
LONDON
Downloaded from https:/www.cambridge.org/core. IP address: 88.99.165.207, on 12 Jul 2017 at 15:25:36, subject to the Cambridge Core terms of use, available
at https:/www.cambridge.org/core/terms. https://doi.org/10.1017/S0305004100031510
© Copyright 2026 Paperzz