Playing Nim on a simplicial complex

Richard Ehrenborg Department of Mathematics

White Hall Cornell University

Ithaca, NY 14853-7901

USA

 jrge@math.cornell.edu

Einar Steingrímsson^{∗} Matematiska institutionen Chalmers Tekniska Högskola & Göteborgs universitet S-412 96 Göteborg Sweden

                           einar@math.chalmers.se

(Received December 12, 1995 — Accepted March 6, 1996)

Abstract

We introduce a generalization of the classical game of Nim by placing the piles on the vertices of a simplicial complex and allowing a move to affect the piles on any set of vertices that forms a face of the complex. Under certain conditions on the complex we present a winning strategy. These conditions are satisfied, for instance, when the simplicial complex consists of the independent sets of a binary matroid. Moreover, we study four operations on a simplicial complex under which games on the complex behave nicely. We also consider particular complexes that correspond to natural generalizations of classical Nim.

Mathematics Subject Classification: 90D05, 90D43, 90D44, 90D46.

∗Partially supported by a grant from the Icelandic Council of Science

1 Introduction

One of the classical games – perhaps the classical game – in mathematics is the game of Nim. It is a two player game, played as follows. A set of piles of chips is given. The players take turns removing chips. In a move, a player removes any positive number of chips from one pile. The winner is the player who takes the last chip. An elegant winning strategy for this game was first described by Bouton [2]. By virtue of the simplicity of this strategy, Nim has since served as a yardstick for all impartial two-player games (see [1, 3]) in the sense that any position in such a game is equivalent to a position in Nim.

In this paper we generalize the game of Nim to a finite simplicial complex Δ. Note that, in accordance with the following definition, a simplicial complex is taken to be finite throughout the paper.

Definition 1.1 A simplicial complex Δ on a finite set V is a collection of subsets of V such that

i) {v} ∈ Δ for all v ∈ V.

ii) if F ∈ Δ and G ⊆ F then G ∈ Δ.

The members of Δ are called simplices or faces, and the elements of V are called vertices.

Consider now the following generalization of the game Nim, which we call simplicial Nim. Let Δ be a simplicial complex. On each vertex of Δ place a pile of chips. As before, the players take turns removing chips, the difference being that a player is allowed to remove chips from any non-empty set of piles if the underlying vertices form a face in Δ. Observe that in a move, a player may freely remove any (or all) chips on each vertex of the face in question, but must remove at least one chip from some vertex. Thus, classical Nim corresponds to the simplicial complex being a set of disjoint vertices. At the other extreme, if a simplicial complex Δ consists of all subsets of V, then any game on Δ is equivalent to a single Nim pile whose size is the sum of the sizes of piles on Δ.

A central role in this paper is played by the circuits, or minimal non-faces, of a simplicial complex. In Section 3 we give a winning strategy for any complex Δ such that each circuit of Δ contains a vertex not in any other circuit. That is, for such a complex we find the zero positions (also called winning positions). These are the positions where the first player to move loses.

In Section 4 we introduce three conditions on a simplicial complex Δ. If these conditions are satisfied then the zero positions of Δ can be explicitly characterized. In Section 5 we show that the simplicial complex consisting of the independent sets of a binary matroid satisfies the three conditions. Hence, on such a complex, there is an explicit strategy for winning a game.

In Section 6 we consider three operations on a simplicial complex under which games on the complex behave nicely. One of these operations consists of taking the join of two simplicial complexes. The other two can be described as “doubling a vertex”, that is, adding a vertex to a complex in such a way that the new vertex is in some sense equivalent to a vertex in the original complex. These operations, or rather their inverses, can be used to simplify complexes before analyzing their structure with respect to the game.

In Section 7 we define the length of a zero position. The length measures the maximum length of an optimally played game. We determine its value for some classes of simplicial complexes.

In Section 8 we study two families of simplicial complexes which correspond to natural generalizations of classical Nim and give partial results on their winning positions. Finally, in Section 9, we mention some open problems.

2 Definitions and Preliminaries

We first introduce some notation for simplicial complexes, or complexes, for short. Let Δ be a simplicial complex with vertex set V. A maximal face of Δ with respect to inclusion is called a facet. Further, if W ⊆ V, then the subcomplex of Δ induced by W is the complex K on vertex set W such that F ⊆ W is a face of K if and only if F is a face of Δ. In other words, K is the restriction of Δ to W. In this case, K is said to be an induced subcomplex of Δ.

A subset C of V is called a circuit of Δ if C is not a face of Δ, but all proper subsets of C are faces of Δ. Hence, a circuit is a minimal non-face of Δ. Topologically a circuit of Δ is the boundary of a simplex σ where σ is minimal with respect to not belonging to Δ. When giving examples, we will frequently identify a simplicial complex with its geometric realization. For a rigorous treatment of this and for more background on simplicial complexes, see [7].

Given a complex Δ with vertex set V, let ℕ^{V} be the set of vectors indexed by V whose entries are non-negative integers. Thus, each vector in ℕ^{V} corresponds to a position in a game on Δ. That is, if n ∈ ℕ^{V}, where n = (n_{v})_{v∈V}, then the vector n corresponds to the position where there are n_{v} chips on vertex v for each v ∈ V. Let e(v) be the v-th unit vector, that is, the vector whose v–th entry is 1 and all other entries are 0. For a subset A of V let

e(A) = ∑_{v∈A} e(v).

Further, for two vectors m, n ∈ ℕ^{V} we write m ≤ n if m_{v} ≤ n_{v} for all v ∈ V. If m ≠ n and m ≤ n then we denote this by m < n. Also, let min(n) be the minimum among the coordinates of n and let max(n) be the maximum.

An impartial two player game (or Nim game) is a game where two players take turns making moves and where, in a given position, the allowed moves do not depend on whose turn it is. This is the case for Nim and for the generalization we will consider here. In an impartial two player game each position is recursively assigned a value. For a finite subset A of ℕ, the minimal excluded value of A, mex(A), is the smallest integer in ℕ − A. That is, mex(A) = min(ℕ − A). We use the notation n → m to indicate that there is a legal move from the position n to the position m. The value of a position is defined recursively by

v(n) = mex ({v(m) : n → m}) ,

and v(0) = 0. The value of a position is also known as the position’s Grundy number or Sprague-Grundy number (see [1, 3, 10]).

A game which is guaranteed to end in a finite number of moves is called short.

The positions with value zero are called winning or zero positions. In principle, knowing the set of zero positions for a short game is equivalent to knowing a winning strategy for the game. This can be seen from the following characterization of zero positions, the proof of which is omitted.

Theorem 2.1 In a short impartial two player game a set W is the set of zero positions if and only if

(a) the final positions (in our case the position 0) belong to W,

(b) there is not a move from a position in W to another position in W, and

(c) for every position not in W there is a move to a position in W.

This characterization is crucial in establishing that a strategy is indeed a winning strategy.

We end this section with two basic results.

Lemma 2.2 If C is a circuit of the simplicial complex Δ then n · e(C) is a zero position for all n ∈ ℕ.

Proof: For n = 0, this is clear. Suppose, then, that n > 0 and let n = n · e(C). Assuming that there is a move n → m, let k = min(m) and let v be a vertex such that m_{v} = k. Observe that since C is not a face of Δ, the move cannot have left all the piles empty. Since C is a circuit, C − {v} is a face, so we can reduce the piles on each vertex of C − {v} to k, and then repeat the strategy until k = 0. □

Let K and H be two simplicial complexes on vertex sets V_{K} and V_{H}, respectively. A map ϕ : V_{K} → V_{H} is simplicial if ϕ(F) is a face of H whenever F is a face of K. A simplicial bijection is an invertible simplicial map whose inverse is also simplicial.

Lemma 2.3 Let Δ be a simplicial complex and suppose there is a simplicial bijection ϕ : Δ → Δ such that

i) ϕ = ϕ^{−1} (that is, ϕ is an involution), and

ii) if F is a facet of Δ then F and ϕ(F) are disjoint.

Then every position n on Δ such that n_{x} = n_{ϕ(x)} is a zero position.

Proof: Given such a position, any move on a facet F can be countered by the corresponding move on ϕ(F), restoring the symmetry. □

Observe that this lemma does not describe all zero positions on a complex that possesses such a simplicial bijection. For instance, in classical Nim with an even number of piles, any pairing of piles (vertices) satisfies the hypotheses of the lemma, but a zero position need not consist of pairs of equal piles.

3 Pointed circuit complexes

As we have seen in Lemma 2.2, the circuits of a simplicial complex Δ are essential in determining the zero positions on Δ. We now introduce a condition on the collection of circuits under which the zero positions of Δ can be characterized.

Definition 3.1 A circuit C in a simplicial complex Δ is pointed if it has a vertex which belongs to no other circuit of Δ. Such a vertex v is called a point of C and C is said to be pointed by v. If every circuit of Δ is pointed, then Δ is said to be a pointed circuit complex.

Observe that if S is a set of vertices in a complex Δ and S is not a face of Δ, then S must contain a circuit of Δ.

Theorem 3.2 Let Δ be a pointed circuit complex, and let C be the collection of circuits of Δ. Then the zero positions of Δ are those of the form

∑_{C∈C} a_{C} · e(C),

where a_{C} is a non-negative integer for each circuit C.

Proof: Let W be the set of positions described in the statement of the theorem. Clearly 0 ∈ W. Let n be a position on Δ. We must show that either n is in the set W or else there is a move n → m where m belongs to W. If n ≠ 0 and the position is not an immediate win, then n must be supported by some circuit, that is, we must have n_{v} > 0 for all vertices v in some circuit C. Pick a non-negative integer a_{C} for each circuit C so that

m = ∑_{C∈C} a_{C} · e(C) ≤ n.

If there is a circuit C such that m_{v} < n_{v} for all vertices v in C, then we may increase a_{C} by 1 and the above inequality will still hold. Hence we may assume that for each circuit C there is a vertex u(C) such that m_{u(C)} = n_{u(C)}. Consider the set

F = {v ∈ V : m_{v} < n_{v}}.

Observe that F contains no circuit C of Δ since u(C) ∉ F. Thus F is face of Δ. If F is empty then n = m ∈ W. If F is non-empty we can make the move n → m ∈ W. Thus, for every position n ∉ W there is a move n → m where m ∈ W. Note that so far we have not used the assumption that Δ is a pointed circuit complex.

1 2 3 4 5

Figure 1: The pointed circuit complex of Example 3.3.

We now show that there is no move from a position in W to another position in W. Assume, on the contrary, that there is a move n → m, where n, m ∈ W. We may then write

n = ∑_{C∈C} a_{C} · e(C) and m = ∑_{C∈C} b_{C} · e(C).

Now, each circuit C has a vertex p(C) which belongs to no other circuit. Thus we have that b_{C} = m_{p(C)} ≤ n_{p(C)} = a_{C} for each circuit C. Since there is a move n → m, there must be at least one circuit C such that b_{C} < a_{C}. But then n → m is not a legal move since it would entail decreasing the piles on all the vertices in the circuit C. Hence, there is no move from a position in W to another position in W. □

Example 3.3 Let Δ be the simplicial complex with facets {1, 2, 3}, {2, 3, 4}, {3, 4, 5}, and {1, 5} (see Figure 1). Then the circuits of Δ, namely {1, 3, 5}, {1, 4}, and {2, 5}, are all pointed, with points 3, 4 and 2, respectively. Hence the zero positions of Δ are given by

a · e({1, 3, 5}) + b · e({1, 4}) + c · e({2, 5}) = (a + b, c, a, b, a + c).

Example 3.4 Let Δ be the simplicial complex with facets {1, 2, 3, 4}, {2, 3, 4, 5}, {1, 2, 5}, and {1, 4, 5}. Then the circuits of Δ are {1, 2, 4, 5} and {1, 3, 5}. Clearly these are pointed by 2 and 3, respectively. Hence the zero positions of Δ are given by

a · e({1, 2, 4, 5}) + b · e({1, 3, 5}) = (a + b, a, b, a, a + b).

4 Nim-regular complexes

Any vector n ∈ ℕ^{V} has a unique binary expansion, that is, we may write

n = ∑_{i≥0} 2^{i} · e(A_{i}),

where A_{0}, A_{1}, … are subsets of V and where, for i large enough, each A_{i} is empty. For such a position n, we say that 2^{i} is carried by A_{i}.

If X, Y, Z are three sets then by Z = X ∪· Y we mean that Z is the disjoint union of X and Y, that is to say, that X ∩ Y = ∅ and Z = X ∪ Y. We will frequently write X ∪· Y to emphasize that X and Y are disjoint. Note that in what follows, the use of S − T, where S and T are sets, does not imply that S contains T.

Let Δ be a simplicial complex with vertex set V and let B be a collection of subsets of V. We will now describe three conditions on Δ and B which together imply that the zero positions of Δ have nice binary expansions with respect to B.

Definition 4.1

Condition (A) The empty set belongs to B.

Condition (B) Suppose that F is a face of Δ, that B, B′ ∈ B and that B′ = F ∪· B. Then F is the empty face.

Condition (C) Let F be a face of Δ and let S be a subset of V. Then there exist faces K and G of Δ, with K ⊆ F ⊆ G, such that G − F ⊆ S and (S − G) ∪· K ∈ B.

These three conditions play an important role in the proofs in this section. Observe that in these proofs the conditions (A), (B), and (C) correspond, respectively, to statements (a), (b), and (c) in Theorem 2.1.

Definition 4.2 Let Δ be a simplicial complex and B a collection of subsets of Δ such that Conditions (A), (B), and (C) are satisfied. Then B is said to be a Nim-basis for Δ. A simplicial complex which has a Nim-basis is said to be Nim-regular.

The reason for the above definitions is that the zero positions of a Nim-regular complex Δ can be completely characterized in terms of B. Moreover, we will see in Section 5 that in the case of binary matroids the collection B will emerge as a naturally defined object.

a  b  c

Figure 2: A simplicial complex with no Nim-basis.

It follows from Condition (B) that no non-empty face F of Δ can belong to a Nimbasis of Δ. For otherwise, letting B = F and B′ = ∅ ∈ B, we obtain B = F ∪· B′, contradicting Condition (B).

It is easy to verify that for a complex Δ consisting of a single simplex (that is, of all subsets of the vertex set V), the collection containing the empty set as its only element is a Nim-basis for Δ.

A complex Δ with no Nim-basis is shown in Figure 2. Letting S = {a} and F = {c} we get from Condition (C) that either {a} ∈ B or {a, c} ∈ B. By Condition (B) we cannot have {a} ∈ B, so {a, c} ∈ B. Similarly, with S = {a, b} and F = {c} we get that {a, b, c} ∈ B. But {a, b, c} = {b} ∪·{a, c}, which contradicts Condition (B), so Δ has no Nim-basis. Observe also that any complex containing Δ as an induced subcomplex lacks a Nim-basis.

As a further example, consider classical Nim, corresponding to a complex consisting of n isolated vertices, one for each pile. Then it is easily checked that the collection of all subsets of vertices of even cardinality is a Nim-basis. We will now generalize this situation to arbitrary Nim-regular complexes and give an explicit description of the zero positions on such complexes.

Proposition 4.3 Suppose there exists a collection B of subsets of V such that the zero positions of Δ are precisely those that have the form

∑_{i≥0} 2^{i} · e(A_{i}),

with A_{i} in B for all i ≥ 0. Then Δ is Nim-regular and B is a Nim-basis for Δ.

Proof: We verify that B satisfies the conditions (A), (B) and (C).

(A) Since 0 is a zero position, it is clear that the empty set must belong to B.

(B) Assume that F is a non-empty face of Δ, that B, B′ ∈ B, and that B′ = F ∪· B. Then e(B′) = e(F ∪· B) → e(B) is a legal move, but that contradicts the assumption that both e(B) and e(B′) are zero positions.

(C) Recall that no non-empty face of Δ belongs to B. Consider the position 2·e(F)+ e(S), where F is a non-empty face of Δ. This is a non-zero position because F, which carries 2^{1}, does not belong to B. Thus we can make a move to a zero position. This zero position must have the form e(T) because leaving any piles of size 2 or 3 would necessarily mean that 2^{1} was carried by a non-empty face H ⊆ F, but H ∉ B. Let K = T ∩ F and let G = F ∪ (S − T). Observe that G is the set on which the move was made. Thus G is a face. Moreover, it can be verified that (S − G) ∪· K = T, which belongs to the collection B. □

The converse of this proposition is more interesting.

Theorem 4.4 Assume that Δ is a Nim-regular simplicial complex with Nim-basis B. Then a position n is a zero position on Δ if and only if

n = ∑_{i≥0} 2^{i} · e(A_{i}),

where A_{i} belongs to B for all i ≥ 0.

Proof: Let W be the set of positions described in the statement of the theorem. We verify that W satisfies the conditions in Theorem 2.1.

(a) Observe that 0 ∈ W, since ∅ ∈ B.

(b) We now show that it is impossible to move from a position in W to another position in W. Assume, on the contrary, that n and m are two positions belonging to W such that n → m. Suppose the binary expansions of these positions are given by

n = ∑_{i≥0} 2^{i} · e(A_{i}), m = ∑_{i≥0} 2^{i} · e(B_{i}).

Let k be the largest index where A_{i} and B_{i} differ. We then have that B_{k} ⊆ A_{k} and B_{k} ≠ A_{k}, so A_{k} − B_{k} is a non-empty face. But this contradicts Condition (B), since both A_{k} and B_{k} belong to B.

(c) It remains to be shown that for any position n not in W there is a move n → m ∈ W. Let n be a position which does not belong to W. As before, let n have the binary expansion

n = ∑_{i≥0} 2^{i} · e(A_{i}).

Let N be the largest index such that A_{N} ≠ ∅. Let F_{N} and G_{N+1} both be the empty set, which is a face. For i = N, N − 1, …, 0 use Condition (C) with F = F_{i} and S = A_{i} to find faces K_{i} and G_{i} such that K_{i} ⊆ F_{i} ⊆ G_{i}, G_{i} − F_{i} ⊆ A_{i}, and B_{i} ∈ B, where B_{i} = (A_{i} − G_{i}) ∪· K_{i}. Moreover, let F_{i−1} = G_{i}, which implies that G_{i} ⊆ G_{i−1}.

Let m be the position given by

m = ∑_{i=0}^{N} 2^{i} · e(B_{i}).

Clearly m belongs to W. We need to show that the move n → m is legal.

Since B_{i} = (A_{i} − G_{i}) ∪· K_{i} and K_{i} ⊆ G_{i}, we have that B_{i} − G_{i} = A_{i} − G_{i}. Recall that G_{N} ⊆ G_{N−1} ⊆ ⋯ ⊆ G_{0}. Thus G_{i} ⊆ G_{0}, so B_{i} − G_{0} = A_{i} − G_{0}. Hence for all v ∉ G_{0} we have that n_{v} = m_{v}.

Now consider v ∈ G_{0}. Let k be the largest index such that v ∈ G_{k}. Hence v ∉ G_{k+1} = F_{k}. Since G_{k} − F_{k} ⊆ A_{k}, we have that v ∈ A_{k}. Also v ∉ F_{k} implies that v ∉ K_{k}, so v ∉ (A_{k} − G_{k}) ∪· K_{k} = B_{k}. Moreover, for i ≥ k + 1 we have G_{i} ⊆ G_{k}. Since B_{i} − G_{i} = A_{i} − G_{i} we have that B_{i} − G_{k} = A_{i} − G_{k}. This implies that χ(v ∈ B_{i}) = χ(v ∈ A_{i}) for all i ≥ k + 1, where χ is the function which, for any statement S, has the value 1 if S is true and 0 otherwise. Now we have that

m_{v} = ∑_{i=0}^{N} 2^{i} · χ(v ∈ B_{i})

= ∑_{i=0}^{k−1} 2^{i} · χ(v ∈ B_{i}) + ∑_{i=k+1}^{N} 2^{i} · χ(v ∈ B_{i})

≤ ∑_{i=0}^{k−1} 2^{i} + ∑_{i=k+1}^{N} 2^{i} · χ(v ∈ B_{i})

< 2^{k} + ∑_{i=k+1}^{N} 2^{i} · χ(v ∈ B_{i})

= 2^{k} + ∑_{i=k+1}^{N} 2^{i} · χ(v ∈ A_{i})

≤ ∑_{i=0}^{k−1} 2^{i} · χ(v ∈ A_{i}) + 2^{k} + ∑_{i=k+1}^{N} 2^{i} · χ(v ∈ A_{i})

= ∑_{i=0}^{N} 2^{i} · χ(v ∈ A_{i}) = n_{v}.

Hence we have that m_{v} < n_{v} for v ∈ G_{0}. Recall that G_{0} is a face of Δ. Moreover, G_{0} is non-empty, since G_{0} = ∅ implies A_{i} = B_{i} for all i and that would contradict that n is not in W. Therefore, the move n → m is a legal move. □

2  1  3  4

Figure 3: The Nim-regular complex of Example 4.6.

Observe that the preceding theorem implies that a Nim-basis is unique. In the sequel, we can therefore talk about the Nim-basis of a complex when such a basis exists.

Theorem 4.4, together with Lemma 2.2, now leads to the following corollary.

Corollary 4.5 Suppose Δ is a Nim-regular complex and that B is the Nim-basis of Δ. Then every circuit of Δ belongs to B. □

Example 4.6 Consider the simplicial complex Δ on the set V = {1, 2, 3, 4} with facets {1, 2}, {1, 3}, {1, 4}, and {2, 3, 4} (see Figure 3). Let B = {∅, {1, 2, 3}, {1, 2, 4}, {1, 3, 4}}. Then Δ is Nim-regular and B is the Nim-basis for Δ. Hence the zero positions of Δ are those of form ∑_{i≥0} 2^{i} · e(A_{i}), where A_{i} ∈ B. As an example, the position

(7, 3, 5, 6) = e({1, 2, 3}) + 2 · e({1, 2, 4}) + 4 · e({1, 3, 4})

is a zero position on Δ. Note that the non-empty sets of B are precisely the circuits of Δ.

Let Δ_{k}(V) be the simplicial complex whose facets are all the (k − 1)-subsets of V. That is, a subset of V is a face if and only if its cardinality is less than k. Thus, Δ_{k}(V) is the (k − 1)–skeleton of the simplex with vertex set V. Playing on Δ_{k}(V) is equivalent to playing Nim on |V | piles with a move allowed to affect at most k − 1 piles.

The following proposition first appeared in [6], though Moore did not give a proof in his short paper. It is also discussed in [1, chapter 15, page 498], [8, section 122, page 151], and [9].

Proposition 4.7 (E. H. Moore) The zero positions of Δ_{k}(V) are those of the form ∑_{i≥0} 2^{i} · e(A_{i}), where |A_{i}| ≡ 0 mod k.

Proof: Let B = {B ⊆ V : |B| ≡ 0 mod k}. We show that Δ_{k}(V) is Nim-regular with Nim-basis B.

(A) Clearly the empty set is in B, so that Condition (A) is satisfied.

(B) If F ∪· B = B′, with F a face and B, B′ ∈ B, then |F | ≡ 0 mod k. Since F is a face we have that |F | ≤ k − 1. Hence we conclude that |F | = 0, so F is the empty set. This proves that Δ_{k}(V) and B satisfy Condition (B).

(C) To check Condition (C), let F be a face of Δ_{k}(V) and S a subset of V. Let m be the unique integer m such that 1 ≤ m ≤ k and |S − F | ≡ m mod k.

• If k − |F | ≤ m then choose K to be a subset of F of cardinality k − m, and let G = F. Thus the cardinality of (S − G) ∪· K is divisible by k and hence (S − G) ∪· K belongs to B.

• If m < k − |F |, choose a subset H of S − F of cardinality m. Let K = ∅ and G = F ∪ H. Observe that G − F ⊆ S and |G| = |F | + m ≤ k − 1. Moreover, |(S − G) ∪· K| = |S − G| = |(S − F) − H| = |(S − F)| − m ≡ 0 mod k, so that (S − G) ∪· K ∈ B.

Hence the three conditions are satisfied, and the proposition follows from Theorem 4.4. □

Note that the sets in B in Proposition 4.7 are the disjoint unions of circuits of Δ_{k}(V). This proposition implies the strategy for classical Nim by setting k = 2. For k > 2, the game is still easy to play since the winning strategy (once deciphered from the proof!) is easy to remember.

5 Binary matroids

A (finite) matroid M (without loops) is a simplicial complex I (whose elements are called independent sets) such that for all U, V ∈ I with |U| > |V |, there exists an x ∈ U − V such that (V ∪· x) ∈ I.

If M is a binary matroid (to be defined in the next paragraph) then there is a collection B of subsets of V such that B is the Nim-basis for I. Hence there is an explicit winning strategy for binary matroids. To show this, we will avoid presenting the general theory of matroids. Instead we will define directly a binary matroid. For background on matroid theory, see the book by Neil White [11]. Let 𝔽_{2} = {0, 1} be the finite field of order two.

Definition 5.1 A binary matroid M on a finite set V is a triple (V, ϕ, W) where W is vector space over the field 𝔽_{2}, and ϕ is a function from the set V to the vector space W. A subset I = {v_{1}, …, v_{k}} of V is called independent if the vectors ϕ(v_{1}), …, ϕ(v_{k}) are linearly independent in W. The empty set is considered to be independent. A subset of V that is not independent is called dependent. A minimal dependent set is called a circuit.

From linear algebra it follows that the maximal independent sets all have the same cardinality. This cardinality is called the rank of the matroid.

The symmetric difference A△B of two sets A and B is A△B = (A−B) ∪·(B −A). The power set of a set V, denoted 2^{V}, forms an abelian group under symmetric difference. With W and ϕ as in Definition 5.1, let Φ : 2^{V} → W be the group homomorphism defined by Φ(A) = ∑_{x∈A} ϕ(x) and let K be the kernel of Φ. Hence K is given by

K = {A ⊆ V : ∑_{x∈A} ϕ(x) = 0} ,

and K is a subgroup of 2^{V}, so K is closed under symmetric difference. We will show that K is the Nim-basis for the Nim-regular complex I of independent sets of M.

Observe that the empty set is the only independent set that belongs to K.

Lemma 5.2 Given M a binary matroid, let I be an independent set of M and let Q, Q′ ∈ K. If Q′ = I ∪· Q then I is the empty set.

Proof: Since Q′ = I ∪· Q, we have I = Q△Q′. Hence I is a member of K. But I is also independent, and the only independent set A with Φ(A) = 0 is the empty set, so we conclude that I is empty. □

The following proposition describes precisely the sets in the collection K.

Proposition 5.3 The collection K consists of all subsets of V that can be written as a disjoint union of circuits.

Proof: Let C = {v_{1}, …, v_{k}} be a circuit of the binary matroid M. Since C is a dependent set, there exist scalars α_{1}, …, α_{k} ∈ 𝔽_{2} such that ∑_{i=1}^{k} α_{i} · ϕ(v_{i}) = 0. Since C is a minimal dependent set, we know that α_{i} ≠ 0 for all i. Since α_{i} ∈ 𝔽_{2}−{0} = {1} we have that α_{i} = 1 for all i. Hence ∑_{i=1}^{k} ϕ(v_{i}) = 0, and C ∈ K.

Assume now that A is a disjoint union of circuits, where the union may be empty. Then we can write A = ∪_{i=1}^{k}C_{i}. But, since the union is disjoint, we have A = △_{i=1}^{k}C_{i}. Since K is closed under symmetric difference, we conclude that A ∈ K. Hence every disjoint union of circuits is a member of the collection K.

Conversely, assume that A ∈ K. By induction on the cardinality of A, we will prove that A is a disjoint union of circuits. If A is empty, this is trivially true. If A has a proper non-empty subset B such that Φ(B) = 0 then, by induction, we know that both B and A − B are disjoint unions of circuits, and hence also A. Suppose, then, that A does not have a proper non-empty subset B such that Φ(B) = 0. This implies that every proper subset B of A is independent. But since A is dependent, A is a circuit. This completes the proof. □

On general matroids there is an operation called contraction. Here it will be enough to consider contraction on binary matroids.

Definition 5.4 Let M = (V, ϕ, W) be a binary matroid, and let v ∈ V be an element such that {v} is independent. Observe that {0, ϕ(v)} is a one-dimensional subspace of W. The contraction M/v is the binary matroid (V′, ϕ′, W′), where V′ = V − {v}, W′ = W/{0, ϕ(v)}, and where, for x ∈ V′, we have ϕ′(x) = ϕ(x) + {0, ϕ(v)}.

From this definition an important fact follows. First, let I′ be a subset of V′. Then I′ is an independent set of M/v if and only if I′ ∪ {v} is an independent set of M. Moreover, let K′ be the collection

K′ = {A ⊆ V′ : ∑_{x∈A} ϕ′(x) = 0_{W′}} .

Lemma 5.5 Let Q′ belong to K′. Then either Q′ or Q′ ∪·{v} belongs to K.

Proof: The statement Q′ ∈ K′ is equivalent to ∑_{x∈Q′} ϕ(x) ∈ {0, ϕ(v)}, from which the lemma follows. □

This lemma may be considered as a generalization (for binary matroids) of the statement: Suppose M is a binary matroid and that v is a vertex of M, so M/v is also a binary matroid. Then, if C′ is a circuit of M/v then either C′ or C′ ∪ {v} is a circuit of M.

The next result shows that M, together with K, satisfies Condition (C).

Proposition 5.6 In a binary matroid M, let I be an independent set and let S be a subset of V. Then there exist independent sets K and J, with K ⊆ I ⊆ J, such that J − I ⊆ S and (S − J) ∪· K is a disjoint union of circuits, that is, (S − J) ∪· K ∈ K.

Proof: The proof is by induction on the size of I. First assume that |I| = 0, so I = ∅. We claim that any set S may be written as a disjoint union of one independent set and a disjoint union of circuits. (The proof of this claim is by induction on the size of S. If S is an independent set, then it has the desired form. If S is dependent then S contains a minimal dependent set, that is, a circuit C. By induction we know that S − C may be written as a disjoint union of one independent set and a disjoint union of circuits. But now S = (S − C) ∪· C has the desired form, and the claim is proved.) So, when I (and thus also K) is empty, we can decompose S into the disjoint union of one independent set, which serves as J, and a collection of disjoint circuits. It is then easy to check that the statement of the theorem holds.

For the induction step, consider the case when I is non-empty. Choose v ∈ I. Then {v} is independent. Let us consider the matroid M/v on the set V′ = V − {v}. Let I′ = I − {v} and S′ = S − {v}. Observe that I′ is independent in the matroid M/v. By induction we can find J′ and K′ such that J′ is independent in M/v, J′ − I′ ⊆ S′, K′ ⊆ I′, and (S′ − J′) ∪· K′ belongs to K′. Let T′ = (S′ − J′) ∪· K′. Let E ⊆ {v} be the set such that T′ ∪· E ∈ K (see Lemma 5.5). Let K = K′ ∪· E and J = J′ ∪·{v}. Observe that J is an independent set in the matroid M. Also, J − I = J′ − I′ ⊆ S′ ⊆ S. Now,

(S − J) ∪· K = (S′ − J′) ∪· K′ ∪· E
= T′ ∪· E ∈ K.

That is, (S − J) ∪· K is a disjoint union of circuits. This completes the induction and thus the proof. □

It is clear that the empty set belongs to K, so Condition (A) holds. By Lemma 5.2 and Proposition 5.6 we know that M, together with K, satisfies Conditions (B) and (C). Hence, if every singleton is an independent set of M then K is the Nimbasis for the Nim-regular complex of independent sets of M. Thus by Theorem 4.4 we have:

Theorem 5.7 Let M be a binary matroid such that the singleton {v} is an independent set for all v ∈ V. Then the zero positions on M are precisely those positions that have binary expansions

∑_{i≥0} 2^{i} · e(A_{i}),

where A_{i} ∈ K. In other words, the zero positions on M are those positions where 2^{i} is carried by a disjoint union of circuits for each i. □

It should be noted that not all Nim-regular matroids are binary. Consider, for example, the simplicial complex Δ_{k}(V), which was defined before Proposition 4.7. It is a Nim-regular complex. Moreover, the faces of Δ_{k}(V) form the independent sets of a matroid on V. This is the uniform matroid of rank k − 1 on the set V. But when k > 2, this matroid is not binary.

Observe that classical Nim corresponds to playing simplicial Nim on the binary matroid (V, ϕ, W), where ϕ is a non-zero constant vector. That is, there is an x ∈ W, x ≠ 0, such that ϕ(v) = x for all v ∈ V. We note that classical Nim also is a special case of the game considered in Proposition 4.7.

An important class of binary matroids is the class of graphical matroids. Let G be a graph with multiple edges allowed. Let V denote the set of edges of G. Moreover, let W be the vector space over 𝔽_{2} spanned by the vertices of G. Define ϕ : V ⟶ W by ϕ(v) = x + y, where v is the edge {x, y}. Observe that a subset I of V is independent in the binary matroid (V, ϕ, W) if and only if the graph induced by the set I is a forest, that is, there is no closed cycle of edges in I. Thus, given a graph G, we may play the following game. Place piles of chips on each edge of the graph. A player is allowed to remove chips from a set of edges if those edges form a forest. We leave it to the reader to formulate the winning strategy for this game.

6 New games from old

In this section we consider three operations on simplicial complexes under which games on the complexes behave nicely.

Let Δ_{1} and Δ_{2} be simplicial complexes on V_{1} and V_{2}, respectively, where V_{1} and V_{2} are disjoint. The join Δ_{1} ∗ Δ_{2} of the two complexes Δ_{1} and Δ_{2} is the simplicial complex on V_{1} ∪· V_{2}, such that F is a face of the join Δ_{1} ∗ Δ_{2} if the restriction F _{V_{i}} of F to V_{i} is a face of Δ_{i} for i = 1, 2. In other words, a face of Δ_{1} ∗ Δ_{2} is any union F_{1} ∪· F_{2} where F_{1} ∈ Δ_{1} and F_{2} ∈ Δ_{2}. In this case, Δ_{1} and Δ_{2} are called factors of Δ.

The operation of taking the join of two complexes is associative, so Δ_{1} ∗ Δ_{2} ∗ ⋯ ∗ Δ_{k} is unambiguous.

A simplicial complex Δ is called a cone if one can write Δ = Δ_{1} ∗ v where v is a single vertex. Let T be the simplicial complex consisting of two distinct isolated vertices v_{1} and v_{2}. The suspension of a simplicial complex Δ by T is the complex Δ ∗ T.

Theorem 6.1 Suppose Δ is the join of Δ_{1} and Δ_{2}. Then the vector n is a zero position on Δ = Δ_{1} ∗ Δ_{2} if and only if the restriction n_{V_{i}} = (n_{v})_{v∈V_{i}} of n to V_{i} is a zero position on Δ_{i} for i = 1, 2.

Proof: Suppose the restriction of n is a zero position for each of the factors. Notice that the join of one face in each factor is a face of Δ. Thus we can play on each factor separately, since a legal move on each factor constitutes a legal move on Δ.

Conversely, suppose n is a zero position on Δ. If n_{V_{i}} is not a zero position on Δ_{i} for i = 1 or i = 2 then there is a move on Δ_{i} to a zero position on Δ_{i}. Thus, there is a move n → m such that m is a zero position when restricted to each factor. But then m is a zero position on Δ and hence n cannot be a zero position on Δ, a contradiction, so n_{V_{i}} is indeed a zero position on Δ_{i} for i = 1, 2. □

For the complex consisting of a single vertex, the only zero position is the one with an empty pile on that vertex. For a complex consisting of two disjoint vertices, corresponding to two piles in classical Nim, the zero positions are those of the form (n, n), that is, those having the same number of chips on each vertex. Thus we have the following two corollaries, where, for a complex on vertex set V = W ∪·{v}, we write n = (m, n_{v}) to indicate that n is the position with n_{v} chips on vertex v and such that m = n|_{W}.

Corollary 6.2 Let Δ be a cone, that is, Δ = Δ′ ∗ v where v is a single vertex. The position n = (m, n_{v}) is a zero position on Δ if and only if m is a zero position on Δ′ and n_{v} = 0.

Corollary 6.3 Let Δ = Δ′ ∗ T be the suspension of the complex Δ′ by T = {v_{1}, v_{2}}. The position n = (m, n_{v_{1}}, n_{v_{2}}) is a zero position on Δ if and only if m is a zero position on Δ′ and n_{v_{1}} = n_{v_{2}}.

The n–dimensional hyperoctahedron (or cross polytope) is the convex hull in n–dimensional real space of {±e_{i} : e_{i} a standard unit vector}. Its boundary is the geometric realization of the simplicial complex defined, for n ≥ 2, by O_{n} = O_{n−1} ∗O_{1}, with O_{1} being the complex consisting of two disjoint vertices. Hence Corollary 6.3 implies the following corollary.

Corollary 6.4 The zero positions of O_{n}, the boundary complex of the hyperoctahedron, are precisely those positions that have the same entries for antipodal vertices.

Corollary 6.4 can also be derived from Theorem 3.2, since O_{n} is a pointed circuit complex whose circuits are the sets containing two antipodal vertices. In fact, Corollary 6.4 even follows from Theorem 5.7, for O_{n} is isomorphic to the complex of independent sets of the graphical matroid whose underlying graph has the 2n vertices x_{1}, …, x_{n}, y_{1}, …, y_{n} and the n double edges (x_{i}, y_{i}) (and thus a total of 2n edges).

As it turns out, the (almost) converse of Theorem 6.1 also holds.

Theorem 6.5 Let Δ be a simplicial complex with vertex set V. Let V = V_{1} ∪· V_{2} be a partition of V and let Δ_{i} be the subcomplex induced by V_{i}. Suppose that for every zero position n on Δ, such that max(n) = 1, the restriction of n to V_{1} is a zero position on Δ_{1}. Then Δ is the join of Δ_{1} and Δ_{2}.

Proof: Let F be a face in Δ_{1} and G a face in Δ_{2}. Consider the position where there is a pile of size one on each vertex of F and on each vertex of G and a zero on all other vertices of Δ. This is not a zero position on Δ because it is not a zero position on F and therefore not a zero position on Δ_{1}. Thus we can make a move to a zero position. By the hypothesis, such a move must necessarily remove all chips from F, since that is the only way to get a zero position on the simplex F. But then we must clearly also remove all chips from G, for otherwise we would not get a zero position on Δ. Since this is the only way to get a zero position on Δ, and since we know we can make a move to a zero position, the move must be legal. This implies that F ∪· G is a face of Δ, so Δ is the join of Δ_{1} and Δ_{2}. □

We now define two operations, B_{x}^{y,z}(Δ) and P_{x}^{y,z}(Δ), on a simplicial complex Δ. When there is no risk of confusion, we write B_{x}(Δ) and P_{x}(Δ).

Definition 6.6 Let Δ be a simplicial complex on V. Assume that x ∈ V but y, z ∉ V. Define the simplicial complex B_{x}^{y,z}(Δ) on (V − {x}) ∪·{y, z} by the following conditions:

i) If F ⊆ V − {x} is a face of Δ then F is a face of B_{x}^{y,z}(Δ).

ii) If F ⊆ V − {x} and F ∪·{x} is a face of Δ then F ∪·{y, z} is a face of B_{x}^{y,z}(Δ).

Observe that since B_{x}^{y,z}(Δ) is a simplicial complex, the sets F, F ∪·{y}, and F ∪·{z} are all faces of B_{x}^{y,z}(Δ) when the hypotheses in ii) are satisfied.

The next lemma is easy to prove and so it is left to the reader.

Lemma 6.7 Let n be a position on B_{x}^{y,z}(Δ) and define the position p on Δ by

p_{v} = \{ \begin{matrix}n_{y} + n_{z} & if v = x \\ n_{v} & if v ∈ V − \{x\}. \end{matrix}

Then the value of n, v(n), is equal to v(p), the value of p. In particular, n is a zero position on B_{x}^{y,z}(Δ) if and only if p is a zero position on Δ.

Definition 6.8 Let Δ be a simplicial complex on V. Assume that x ∈ V but y, z ∉ V. Define the simplicial complex P_{x}^{y,z}(Δ) on (V − {x}) ∪·{y, z} by

i) If F ⊆ V − {x} is a face of Δ then F ∪·{y} and F ∪·{z} are faces of P_{x}^{y,z}(Δ).

ii) If F ⊆ V − {x} and F ∪·{x} is a face of Δ then F ∪·{y, z} is a face of P_{x}^{y,z}(Δ).

Note that, under the hypotheses in ii), F, F ∪·{y}, and F ∪·{z} are all faces of P_{x}^{y,z}(Δ).

Proposition 6.9 The vector n is a zero position on P_{x}(Δ) if and only if both n_{y} = n_{z} and p is a zero position on Δ, where

p_{v} = \{ \begin{matrix}n_{y} = n_{z} & if v = x \\ n_{v} & if v ∈ V − \{x\}. \end{matrix}

Proof: Let W be the set of positions given in the proposition. Clearly we have 0 ∈ W.

Assume that n and m are both in W. Let p and q be the zero positions on Δ corresponding to n and m. Assume that there is a move from n to m. If m_{y} = n_{y} then such a move will change the piles in a face F such that y, z ∉ F. But F is also a face of Δ, and hence we could make a move from p to q. This contradicts that p and q are both zero positions of Δ.

If m_{y} < n_{y} then a move from n to m has to be on a face F that contains y and z. By the construction of P_{x}^{y,z}(Δ), G = (F − {y, z}) ∪·{x} is a face of Δ. Now we could

u  x w Δ  u  yz w B_{x}^{y,z}(Δ)  u  yz w P_{x}^{y,z}(Δ)

Figure 4: A complex Δ and the two derived complexes B_{x}^{y,z}(Δ) and P_{x}^{y,z}(Δ).

again make a move from p to q on the face G, also leading to a contradiction. Hence there is no move from a position in W to another position in W.

Let n be a position on P_{x}(Δ), such that n ∉ W. Construct a position p on Δ according to the rule

p_{v} = \{ \begin{matrix}min(n_{y}, n_{z}) & if v = x \\ n_{v} & if v ∈ V − \{x\}. \end{matrix}

If p is a zero position on Δ then make the move n → m, where m_{y} = m_{z} = min(n_{y}, n_{z}) and m_{v} = n_{v} for v ∈ V − {x}. Otherwise, there is a move p → q, where q is a zero position on Δ. Assume that this move takes place on the face F of Δ. Let m be the position in W corresponding to the zero position q.

If x ∈ F then we can make the move n → m on the face (F −{x}) ∪·{y, z}. If x ∉ F then we can make the move n → m on one of the sets F, F ∪·{y}, and F ∪·{z}. But these sets are all faces of P_{x}^{y,z}(Δ). Hence, we conclude that the positions described in W are indeed all the zero positions of P_{x}^{y,z}(Δ). □

Let Δ be a Nim-regular simplicial complex with Nim-basis B. Let E be the collection of subsets of (V − {x}) ∪·{y, z}, defined by:

E = {D ∈ B : x ∉ D} ∪ {(D − {x}) ∪·{y, z} : x ∈ D ∈ B}.

Then the complex P_{x}^{y,z}(Δ) is Nim-regular and E is its Nim-basis. To see this, apply Proposition 6.9 and Proposition 4.3.

Consider the simplicial complex Δ in Figure 4. Its zero positions n satisfy n_{u} + n_{x} = n_{w}. Hence the zero positions n of B_{x}^{y,z}(Δ) satisfy n_{u} + n_{y} + n_{z} = n_{w} by Lemma 6.7. Moreover, Proposition 6.9 implies that the zero positions n of P_{x}^{y,z}(Δ) are those positions n for which n_{y} = n_{z} and n_{u} + n_{y} = n_{w}.

We may iterate the two operations B_{x}^{y,z} and P_{x}^{y,z}. For Y = {y_{1}, …, y_{k}} define B_{x}^{Y} (Δ) and P_{x}^{Y} (Δ) by

B_{x}^{Y} (Δ) = B_{z_{k−1}}^{y_{k−1},y_{k}}(⋯ B_{z_{1}}^{y_{2},z_{2}}(B_{x}^{y_{1},z_{1}}(Δ)) ⋯),
P_{x}^{Y} (Δ) = P_{z_{k−1}}^{y_{k−1},y_{k}}(⋯ P_{z_{1}}^{y_{2},z_{2}}(P_{x}^{y_{1},z_{1}}(Δ)) ⋯),

where z_{1}, …, z_{k−1} are dummy variables. Observe that the order of the elements of Y does not matter, hence the operations are well-defined. Another description of these two operations is this: The simplicial complexes B_{x}^{Y} (Δ) and P_{x}^{Y} (Δ) on the set (V − {x}) ∪· Y fulfill the following conditions:

i) If F ⊆ V − {x} is a face of Δ then F is a face of B_{x}^{Y} (Δ).

ii) If F ⊆ V − {x} and F ∪·{x} is a face of Δ then F ∪· Y is a face of B_{x}^{Y} (Δ).

iii) If F ⊆ V − {x} is a face of Δ and Y′ is a subset of Y of cardinality less than |Y | then F ∪· Y′ is a face of P_{x}^{Y} (Δ).

iv) If F ⊆ V − {x} and F ∪·{x} is a face of Δ then F ∪· Y is a face of P_{x}^{Y} (Δ).

As a consequence of Lemma 6.7 and Proposition 6.9 we have the following two corollaries.

Corollary 6.10 Let n be a position on B_{x}^{Y} (Δ) and define the position p on Δ by

p_{v} = \{ \begin{matrix}∑_{y∈Y} n_{y} & if v = x \\ n_{v} & if v ∈ V − \{x\}. \end{matrix}

Then the value of n, v(n), is equal to the value of p, v(p). In particular, n is a zero position on B_{x}^{Y} (Δ) if and only if p is a zero position on Δ.

Corollary 6.11 The vector n is a zero position on P_{x}^{Y} (Δ) if and only if both n_{y_{1}} = ⋯ = n_{y_{k}} and p is a zero position on Δ, where

p_{v} = \{ \begin{matrix}n_{y_{1}} & if v = x \\ n_{v} & if v ∈ V − \{x\}. \end{matrix}

7 The length of a zero position

In this section we will introduce a fourth operation on simplicial complexes and show how this operation preserves zero positions. In order to proceed we need to define the concept of the length of a zero position.

Definition 7.1 Let n be a zero position of the simplicial complex Δ. The length ℓ_{Δ}(n) of n is recursively defined by setting ℓ_{Δ}(0) = 0 and, for n ≠ 0,

ℓ_{Δ}(n) = 1 + max({ℓ_{Δ}(m) : m is a zero position of Δ and m < n}).

That is, ℓ_{Δ}(n) is equal to the length of a longest chain 0 = m_{0} < m_{1} < ⋯ < m_{h} = m, where each m_{i} is a zero position on Δ. In other words, if n is a zero position then ℓ_{Δ}(n) is the maximum number of moves it can take the second player to win the game, assuming that both players try to make the game as long as possible and that the second player always moves to a zero position. We will write ℓ(n) when the simplicial complex Δ is understood.

Lemma 7.2 If C is a circuit of the simplicial complex Δ, then the zero position n · e(C) has length n, that is, ℓ_{Δ}(n · e(C)) = n.

Definition 7.3 Let Δ be a simplicial complex on V. Assume that z ∉ V. Define the simplicial complex C^{z}(Δ) on V ∪ {z} by the following conditions:

i) V is a face of C^{z}(Δ).

ii) If F is a face of Δ then F ∪ {z} is a face of C^{z}(Δ).

Proposition 7.4 Let Δ be a simplicial complex on vertex set V. The vector n is a zero position on C^{z}(Δ) if and only if n_{V} is a zero position on Δ and n_{z} = ℓ_{Δ}(n_{V}).

Proof: For n a position on C^{z}(Δ) we will, as in Corollary 6.2, write n = (p, r) if n_{V} = p and n_{z} = r. Also let W be the set of all positions described in the proposition. Clearly 0 ∈ W, since ℓ(0) = 0.

Assume that there is a move n → m, where both n and m belong to W. Let n = (p, r) and m = (q, s). Since p and q are zero positions on Δ, we know that there is no move from p to q. Hence the only way a move n → m can take place is by making a move on some subset of V that is not a face of Δ. But this implies that r = s. Since q < p, we have that ℓ(q) < ℓ(p). This contradicts ℓ(p) = r = s = ℓ(q).

Given a position n ∉ W we would like to find a position m ∈ W such that there is a move n → m. Let n = (p, r).

First assume that p is a zero position on Δ. Then we either have ℓ(p) < r or ℓ(p) > r. If ℓ(p) < r, then make the move (p, r) → (p, ℓ(p)). If ℓ(p) > r then there exists a zero position q of Δ such that q < p and ℓ(q) = r. In this case make the move (p, r) → (q, r).

Now we consider the case when p is not a zero position of Δ. Let

ℓ = max({ℓ(q) : q is a zero position of Δ and q < p}).

Observe that ℓ is well-defined since 0 is such a zero position. If r ≤ ℓ, we can find a zero position q such that q < p and ℓ(q) = r. In that case, make the move (p, r) → (q, r). Left to consider is the case when r > ℓ. In the game on Δ we can make a move p → q, where q is a zero position on Δ. Since q < p we know that ℓ(q) ≤ ℓ < r. Hence we may now make the move (p, r) → (q, ℓ(q)). This completes the proof. □

It is easy to observe that C^{z_{1}}(C^{z_{2}}(Δ)) = P_{x}^{z_{1},z_{2}}(C^{x}(Δ)). From this it follows that C^{z_{1}}(C^{z_{2}}(Δ)) = C^{z_{2}}(C^{z_{1}}(Δ)). Moreover, this observation can be used to prove the following proposition.

Proposition 7.5 If n is a zero position on Δ then ℓ_{C^{x}(Δ)}((n, ℓ_{Δ}(n))) = ℓ_{Δ}(n). In other words, the length of a zero position on C^{x}(Δ) equals the length of the corresponding zero position on Δ.

Proof: Let h = ℓ_{C^{x}(Δ)}((n, ℓ_{Δ}(n))). Then, by Proposition 7.4, we know that the position (n, ℓ_{Δ}(n), h) is a zero position on C^{z}(C^{x}(Δ)). But this last complex is identical to P_{y}^{x,z}(C^{y}(Δ)). By Proposition 6.9 we know that a zero position on P_{y}^{x,z}(C^{y}(Δ)) must have piles of equal sizes on vertices x and z. Hence

ℓ_{Δ}(n) = h,

which is what we wanted to prove. □

Let Δ be a pointed circuit complex, and denote the set of circuits of Δ by C. Then the set of circuits of C^{z}(Δ) is given by

C′ = {C ∪ {z} : C ∈ C}.

If the vertex v is a point of the circuit C in Δ, then v is also a point of the circuit C ∪ {z} in C^{z}(Δ). Hence C^{z}(Δ) is also a pointed circuit complex. Observe that the vertex z belongs to every circuit of C^{z}(Δ). Now by Theorem 3.2 and Proposition 7.4 we have the following result.

Proposition 7.6 Let Δ be a pointed circuit complex. Then the length of a zero position ∑_{C∈C} a_{C} · e(C) on Δ is given by

ℓ_{Δ} ( ∑_{C∈C} a_{C} · e(C)) = ∑_{C∈C} a_{C}.

For certain classes of Nim-regular complexes we are able to compute the length of a zero position.

Proposition 7.7 Let Δ be a Nim-regular complex on V with Nim-basis B. Suppose there exist real scalars α_{v}, where v ∈ V, such that

ℓ_{Δ}(e(D)) = ∑_{v∈D} α_{v},

for all D in B. Then the length of a zero position n is given by

ℓ_{Δ}(n) = ∑_{v∈V} α_{v} · n_{v}.

Proof: Define g(n) by

g(n) = ∑_{v∈V} α_{v} · n_{v}.

It is easy to see that g(0) = 0 and that g(n) is a non-negative integer. For m < n we have that g(m) < g(n). Thus we have that m < n implies g(m) + 1 ≤ g(n). Hence if we have a chain 0 = m_{0} < m_{1} < ⋯ < m_{ℓ} = n then ℓ ≤ g(n). Hence maximizing over all chains, we have that ℓ_{Δ}(n) ≤ g(n).

To prove the other direction of the inequality, we will show that there is a chain of length g(n). Let n be the zero position ∑_{i≥0} 2^{i} · e(A_{i}). Observe that

g(n) = ∑_{v∈V} n_{v} · α_{v}

= ∑_{v∈V} (∑_{i≥0} 2^{i} · χ(v ∈ A_{i})) · α_{v}
= ∑_{i≥0} 2^{i} · ∑_{v∈A_{i}} α_{v}
= ∑_{i≥0} 2^{i} · ℓ_{Δ}(e(A_{i})).

Between the two positions

∑_{i≥j+1} 2^{i} · e(A_{i}) and ∑_{i≥j} 2^{i} · e(A_{i})

we can construct a chain of length 2^{j} · ℓ_{Δ}(e(A_{j})). Now, concatenating these chains for j ≥ 0, we obtain a chain of the desired length from 0 to n. Hence g(n) ≤ ℓ_{Δ}(n). Thus we have that g(n) = ℓ_{Δ}(n) and the proof is complete. □

This proposition specializes nicely to the complex Δ_{k}(V), that is, the complex where each k-subset of V is a circuit (see Proposition 4.7). Let n be a zero position on Δ_{k}(V). Then we have that

ℓ_{Δ_{k}(V)}(n) = \frac{1}{k} · ∑_{v∈V} n_{v}.

8 Paths and cycles

We now introduce two families of simplicial complexes, namely the path complex P_{n,k} and the cycle complex C_{n,k}, and give partial results on their respective zero positions. Since both correspond to natural generalizations of classical Nim, it would be interesting to find a complete strategy for them.

The path complex P_{n,k} is defined for n ≥ 0 and k ≥ 1. The vertex set is {1, …, n+ k−1}, and it has n facets, namely {i, i+1, …, i+k−1} for i = 1, …, n. Observe that P_{n,2} is a path of length n in the graph theoretic sense (see Figure 5). We may view the game on P_{n,2} as a generalization of the game of Kayles (see [1, chapter 4, page 81] and [3, page 127]). Playing on P_{n,k} is equivalent to playing on piles p_{1}, p_{2}, …, p_{n+k−1} with a move allowed to affect any k consecutive piles.

\begin{matrix}… \\ P_{n,2} \end{matrix}  \begin{matrix}… \\ P_{n,3} \end{matrix}
Figure 5: The path complexes P_{n,2} and P_{n,3}.

When n ≤ k the path complex P_{n,k} is a cone over the complex P_{n,k−1}. Hence, analyzing the complex P_{n,k} when n ≤ k reduces to analyzing the complex P_{n,n−1}. Consider a position m on P_{n,n−1}, such that

m_{b} = ⋯ = m_{b+n−3} = 0 and ∑_{i=1}^{b−1} m_{i} = ∑_{i=b+n−2}^{2n−2} m_{i},

where 2 ≤ b ≤ n. This is a zero position on P_{n,n−1}. Moreover, the converse also holds true; all zero positions of P_{n,n−1} are of this form. What remains is to find the zero positions of P_{n,k} when n ≥ k + 2.

The cycle complex C_{n,k} has vertex set V = {1, 2, …, n} and it has the n facets {i, i + 1, …, i + k − 1}, where i = 1, …, n, and the addition is modulo n. Hence each vertex lies in k facets, and each facet contains k vertices. When k = 2 we have a cycle of length n in the graph theoretic sense. When k ≥ 3 and both n and k are odd we have a (k − 1)-dimensional Möbius strip, consisting of n simplices. Playing on C_{n,k} is equivalent to playing on the cyclic graph with n vertices, with a move allowed to affect the piles on any k consecutive vertices. Observe, however, that reducing a pile to zero does not prevent subsequent moves from affecting piles on both sides of such an empty pile, provided that k > 2. Of course, the same is true for the path complex.

When n is even and n ≥ 2k, the map ϕ(i) = i + n/2(mod n) is a simplicial bijection which satisfies the conditions of Lemma 2.3. Hence, if n is a position with n_{i} = n_{j} whenever i ≡ j (mod n/2) then n is a zero position on C_{n,k}. In particular, 1 = (1, …, 1) is a zero position on C_{n,k}. Moreover, when n is odd it is also easy to see that 1 is a zero position on C_{n,2}. Namely, any move from 1 can be countered by a move that leaves two disjoint, isomorphic (path) complexes with a 1 on each vertex.

Conjecture 8.1 Suppose n is a zero position on the cycle complex C_{n,k}. If 1 = (1, 1, …, 1) is a zero position on C_{n,k}, then n + 1 is also a zero position on C_{n,k}.

Definition 8.2 Let Δ be a simplicial complex on vertex set V and let n ∈ ℕ^{V} be a position on Δ. Then n is a genuine position on Δ if n_{v} > 0 for each v ∈ V.

The converse of Conjecture 8.1 does not hold. For instance, (3, 3, 2, 3, 2, 2, 1) is a zero position on the cycle complex C_{7,2}, but (2, 2, 1, 2, 1, 1, 0) is not. However, one may still ask whether the converse holds for genuine zero positions. In other words, if n is a zero position and m is a genuine zero position with n = m + 1, is then m a zero position?

It is easy to check the conjecture when (n, k) equals (3, 2) and (4, 2), respectively. It also holds in the case when (n, k) equals (5, 2), as we shall soon see.

Given a vector v = (v_{1}, …, v_{m}), the symmetries of v is the set of vectors

{(v_{k}, v_{k+1}, …, v_{m}, v_{1}, …, v_{k−1}) : 1 ≤ k ≤ m}
∪ {(v_{k−1}, …, v_{1}, v_{m}, …, v_{k}) : 1 ≤ k ≤ m}.

We note that the zero positions of the path complex P_{3,2} are given by

{(n_{1}, 0, n_{3}, n_{4}) : n_{1} = n_{3} + n_{4}} ∪ {(n_{1}, n_{2}, 0, n_{4}) : n_{1} + n_{2} = n_{4}}.

Namely, these are clearly zero positions, and it is easy to check that any other position can be reduced to one of these. Hence we know that the zero positions of the cycle complex C_{5,2} containing at least one zero are given by the symmetries of

(b + c, 0, b, c, 0).

Proposition 8.3 The zero positions of the cycle complex C_{5,2} are given by the symmetries of

(a + b + c, a, a + b, a + c, a),

where a, b, and c are any non-negative integers.

Proof: Let W be the set of positions described. Clearly 0 ∈ W.

Let n = (n_{1}, n_{2}, n_{3}, n_{4}, n_{5}) be a position on C_{5,2} and let a = min(n), and consider the position n − a · 1. This position has at least one zero. Hence either n − a · 1 is of the form (b + c, 0, b, c, 0), or we can make a move to such a position. We conclude that either n is of the form (a + b + c, a, a + b, a + c, a), or we can make a move to such a position.

Since 0 ∈ W, it remains only to show that we cannot make a move from a position in W to another position in W. Observe that the positions n in W have the property that one can always find two non-adjacent entries of n which are equal to min(n).

Given two positions n, m ∈ W, assume that there is a move n → m. If min(m) = min(n) = a, we obtain a contradiction since it implies that the move n − a · 1 → m − a · 1 is possible. Hence we have min(m) < min(n). But since we made a move to the position m, we must have removed chips from the piles which had the least number of chips in them. Thus, m either has only one pile with the minimum number of chips or else two adjacent piles with the minimum number. But this contradicts the property in the previous paragraph about positions in W. □

Proposition 8.4 The zero positions of C_{5,3} are given by the symmetries of

(0, a + b, a, b, a + b),

where a and b are any non-negative integers.

Proof: For the complex with facets {1, 2, 3}, {2, 3, 4}, and {1, 4} it follows from Theorem 3.2 that the zero positions are given by (a + b, a, b, a + b), where a and b are non-negative integers.

Let the set of positions in the statement of the proposition be denoted by W. By the previous paragraph, it is easy to see that the positions in W are zero positions of the cycle complex C_{5,3}. It remains to show that they are the only zero positions of C_{5,3}. To do so, it is enough to show that for any position not in W there is a move to a position in W.

Let B = max(n) and a = min(n). Either there are adjacent vertices with B chips and a chips, respectively, or else there are two such vertices separated from each other by just one vertex.

Let n be a position not in W. Assume that there are two adjacent vertices with piles of sizes B and a, respectively. Without loss of generality we may assume that n = (a, B, x, y, z).

• If y − z ≥ a, then n → (a, a + z, 0, a + z, z) ∈ W is a legal move.

• If a ≥ y − z ≥ 0, then n → (y − z, y, 0, y, z) ∈ W is a legal move.

• If 0 ≥ y − z ≥ −x, then n → (0, z, z − y, y, z) ∈ W is a legal move.

• If −x ≥ y − z, then n → (0, x + y, x, y, x + y) ∈ W is a legal move.

This covers all possibilities and thus shows that there is always a move n → m ∈ W.

Assume, then, that there are piles with B and a chips, respectively, that are not adjacent. Without loss of generality we can assume that n = (a, x, B, y, z). Then one of the following gives a legal move to a position in W.

• If x ≥ z − a, then n → (a, z − a, z, 0, z).

• If z ≥ a + x ≥ 0, then n → (a, x, a + x, 0, a + x).

This completes the proof. □

9 Concluding remarks

It seems hard to find any general theorems about the winning strategy in simplicial Nim. However, there are many questions whose answers it would be interesting to find and we list some of these here.

Question 9.1 Assume that n is a zero position on a complex Δ. Is the position 2·n also a zero position on Δ? Is the converse true?

Question 9.2 Assume that 1 = (1, …, 1) is a zero position on a complex Δ. Is then the position n · 1 = (n, …, n) also a zero position of Δ?

Both of these questions have affirmative answers for all the complexes considered in Sections 3 and 4.

Recall that the set of the zero positions of a pointed circuit complex Δ is closed under vector addition. That is, if n and m are both zero positions then so are n+m. This property suggests the following question.

Question 9.3 Is it possible to classify all complexes whose set of zero positions is closed under addition?

For instance, consider the complex Δ on vertex set {a, b, c, d} with facets {a, b} and {c, d}. This complex is not a pointed circuit complex, but its zero positions are closed under addition.

A harder question is what role does the topology of a complex Δ play in a winning strategy on Δ. One may observe that the reduced homology groups of the complexes Δ, B_{x}(Δ), P_{x}(Δ), and C^{z}(Δ) are related by

H̃_{i}(Δ) ≃ H̃_{i}(B_{x}(Δ)) ≃ H̃_{i+1}(P_{x}(Δ)) ≃ H̃_{i+1}(C^{z}(Δ)).

Question 9.4 Suppose Δ has a genuine zero position. Does Δ have a genuine zero position n with min(n) = 1? Also, if Δ is a connected complex with v vertices, is min_{n}{max(n)} bounded by some function of v for all zero positions n?

Perhaps the most intriguing question we have not been able to answer is this:

Question 9.5 For each Nim-regular complex Δ mentioned in this paper, the Nimbasis of Δ consists of all sets that can be written as disjoint unions of circuits of Δ. We showed this to be the case for binary matroids, but does this property hold in general?

The value of a game played on a non-connected simplicial complex is the Nimsum (see [1, page 61]) of the values on the connected components. In particular, a position is a zero position if and only if the Nim-sum of these values is zero. However, it seems quite hard to compute the value of games on all but the simplest complexes. In [5], Jenkyns and Mayberry give a formula for the value of Moore’s Nim_{k} which is equivalent to playing on Δ_{k}(V) when the set V has cardinality k + 1 (see Proposition 4.7). That is, this amounts to playing on the boundary complex of a k-dimensional simplex. Thus we can compute the Nim-value of any game on a complex consisting of the disjoint union of such boundaries and of simplices, since the value of a game on a simplex is simply the total number of chips on its vertices.

Another generalization of Nim is Wythoff’s game, see [1, page 76]. The referee of the present paper suggested the following generalization of Wythoff’s game: On a simplicial complex Δ, place a pile of chips on each vertex of Δ. Now, when making a move you are allowed to remove chips from any non-empty face F of Δ, but you have to remove the same number of chips from each vertex of F.

There are 14 connected non-isomorphic simplicial complexes on 4 vertices. In this paper, we have indeed described the zero positions for all of these but one. (We invite

xy  z  w

Figure 6: A simplicial complex with two different types of zero positions.

the reader to check this!) The only complex that we have not touched upon is shown in Figure 6. The set W of its zero positions is given by:

W = {(n_{x}, n_{y}, 0, n_{w}) : n_{x} + n_{y} = n_{w}}
∪ {(n_{x}, n_{y}, n_{z}, n_{w}) : n_{x} = n_{y} = n_{z} + n_{w}, n_{z} ≥ 1}.

It is interesting to note that the zero positions of this complex are of two different “types”. This fact hints that in general simplicial Nim it will be hard to describe the set of zero positions.

Acknowledgement

We would like to thank Margaret Readdy and the anonymous referee for carefully reading the manuscript and suggesting numerous improvements in the presentation, as well as correcting a few mistakes.

References

[1] E. R. Berlekamp, J. H. Conway, and R. K. Guy, “Winning Ways,” Academic Press, London, 1982.

[2] C. L. Bouton, Nim, a Game with a Complete Mathematical Theory, Ann. of Math. (2) 3 (1901-1902), 35-39.

[3] J. H. Conway, “On Numbers and Games,” Academic Press, London, 1976.

[4] P. M. Grundy, Mathematics and Games, Eureka 2 (1939), 6-8.

[5] T. A. Jenkyns and J. P. Mayberry, The Skeleton of an Impartial Game and the Nim-Function of Moore’s Nim_{k}, Internat. J. Game Theory 9 (1980), 51-63.

[6] E. H. Moore, A Generalization of the Game Called Nim, Ann. of Math. (2) 11 (1909-1910), 93-94.

[7] J. R. Munkres, “Elements of Algebraic Topology,” Addison-Wesley Publishing Company, Inc., 1984.

[8] F. Schuh, “Master Book of Mathematical Recreations,” Dover Publications, Inc., New York, 1968.

[9] B. L. Schwartz, Some Extensions of Nim, Math. Mag. 44 (1971), 252-257.

[10] R. P. Sprague, Über mathematische Kampfspiele, Tôhoku Math. J. (2) 41 (1935-36), 438-444.

[11] N. White, “Theory of Matroids,” Cambridge University Press, 1986.