Skip to main content
Log in

On the Sprague–Grundy function of extensions of proper Nim

  • Original Paper
  • Published:
International Journal of Game Theory Aims and scope Submit manuscript

Abstract

We consider the game of proper Nim, in which two players alternately move by taking stones from n piles. In one move a player chooses a proper subset (at least one and at most \(n-1\)) of the piles and takes some positive number of stones from each pile of the subset. The player who cannot move is the loser. Jenkyns and Mayberry (Int J Game Theory 9(1):51–63, 1980) described the Sprague–Grundy function of these games. In this paper we consider the so-called selective compound of proper Nim games with certain other games, and obtain a closed formula for the Sprague–Grundy functions of the compound games, when \(n\ge 3\). Surprisingly, the case of \(n=2\) is much more complicated. For this case we obtain several partial results and propose some conjectures.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  • Albert MH, Nowakowski RJ, Wolfe D (2007) Lessons in play: an introduction to combinatorial game theory, 2nd edn. A K Peters Ltd., Wellesley, MA

    Book  Google Scholar 

  • Beideman C, Bowen M, Muyesser NA (2018) The Sprague-Grundy function for some selective compound games. arXiv:1802.08700 [math.CO]

  • Berlekamp ER, Conway JH, Guy RK (2001–2004) Winning ways for your mathematical plays, vol.1–4, second edition, A.K. Peters, Natick, MA

  • Boros E, Gurvich V, Ho NB, Makino K, Mursic P (2018) On the Sprague–Grundy function of exact \(k\)-Nim. Discrete Appl Math 239:1–14

    Article  Google Scholar 

  • Boros E, Gurvich V, Ho NB, Makino K, Mursic P (2019a) Tetris hypergraphs and combinations of impartial games. arXiv:1701.02819

  • Boros E, Gurvich V, Ho NB, Makino K, Mursic P (2019b) Sprague-Grundy function of symmetric hypergraphs. J. Comb. Theory. Ser. A 165:176–186

    Google Scholar 

  • Boros E, Gurvich V, Ho NB, Makino K, Mursic P (2019c) Sprague-Grundy function of matroids and related hypergraphs. Theor Comput Sci 799:40–58

    Article  Google Scholar 

  • Bouton CL (1901–1902) Nim, a game with a complete mathematical theory. Ann. Math, 2nd Ser., 3:35–39

  • Conway JH (1976) On numbers and games. Acad. Press, London, NY, San Francisco

    Google Scholar 

  • Grundy PM (1939) Mathematics of games. Eureka 2:6–8

    Google Scholar 

  • Grundy PM, Smith CAB (1956) Disjunctive games with the last player losing. Proc Cambridge Philos Soc 52:523–527

    Article  Google Scholar 

  • Gurvich V, Ho NB (2019) Slow k-Nim, RUTCOR Research Report, RRR-03-2015. Rutgers University. arXiv:1508.05777

  • Jenkyns TA, Mayberry JP (1980) The skeletion of an impartial game and the Nim-Function of Moore’s Nim\(_k\). Int J Game Theory 9(1):51–63

    Article  Google Scholar 

  • Moore EH (1910) A generalization of the game called Nim. Ann Math, Second Series, 11(3):93–94

  • Smith CAB (1966) Graphs and composite games. J Combin Theory 1:51–81

    Article  Google Scholar 

  • Sprague R (1935–1936) Über mathematische Kampfspiele. Tohoku Math J 41:438–444

  • Sprague R (1937) Über zwei Abarten von Nim. Tohoku Math J 43:351–354

    Google Scholar 

Download references

Acknowledgements

The authors thank Rutgers University and RUTCOR for the support to meet and collaborate. The authors thank the anonymous reviewers and the editor for the detailed reports and helpful advice.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Nhan Bao Ho.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Vladimir Gurvich was partially funded by the Russian Academic Excellence Project ‘5-100’. Kazuhisa Makino was partially supported by JSPS KAKENHI Grant Numbers JP24106002, JP25280004, JP26280001, and JST CREST Grant Number JPMJCR1402, Japan.

Appendix: Slow Nim

Appendix: Slow Nim

In this section, we consider a variant of Nim, so called slow Nim. A move in a Hypergraph Nim game Nim\(_\mathcal{H}\) is called slow if each pile is reduced by at most one token. Let us restrict both players by their slow moves, then the obtained game is called slow hypergraph Nim. We study SG functions and losing positions of slow Moore Nim and slow exact Nim, where they respectively correspond to hypergraphs \(\mathcal{H}= \{H \subseteq I \mid 1 \le |H| \le k\}\) and \(\mathcal{H}=\{H \subseteq I \mid |H|=k\}\) for some \(k \le n\). We provide closed formulas for the SG functions of both games when \(n = k = 2\) and \(n = k+1 = 3\), where we remak that the SG function for slow exact Nim when \(n = k = 2\) is trivial. We also characterize losing positions for slow Moore Nim if either \(n \le k+2\) or \(n = k+3 \le 6\) holds.

Here we only present the results, where all the proofs can be found in the preprint by Gurvich and Ho (2019).

Given a position \(x = (x_1, \ldots , x_n) \in {\mathbb {Z}}_+^I\), we will always assume that its coordinates are nondecreasing \(x_1 \le \cdots \le x_n\). The parity vector p(x) is defined as the vector \(p(x) = (p(x_1), \ldots , p(x_n)) \in \{0,1\}^I\) such that \(p(x_i) = 0\) if \(x_i\) is even, and \(p(x_i) = 1\) if \(x_i\) is odd. It appears that the status of a position x in the slow Moore Nim in the cases below is defined by p(x) .

Proposition 2

The SG function \({\mathcal {G}}\) for slow Moore Nim  for \(n = k = 2\) and \(n = 3, k = 2\) are uniquely defined by p(x) as follows:

  1. (i)

    For \(n = k = 2\),

    $$\begin{aligned} {\mathcal {G}}(x) = {\left\{ \begin{array}{ll} 0, \quad \text { if } p(x) = (0,0) \\ 1, \quad \text { if } p(x) = (0,1) \\ 2, \quad \text { if } p(x) = (1,1) \\ 3, \quad \text { if } p(x) = (1,0). \end{array}\right. } \end{aligned}$$
  2. (ii)

    For \(n = 3\) and \(k = 2\),

    $$\begin{aligned} {\mathcal {G}}(x) = {\left\{ \begin{array}{ll} 0 \quad \text { if } p(x) \in \{(0,0,0), (1,1,1)\} \\ 1 \quad \text { if } p(x) \in \{(0,0,1), (1,1,0)\} \\ 2 \quad \text { if } p(x) \in \{(0,1,1), (1,0,0)\}\\ 3 \quad \text { if } p(x) \in \{(0,1,0), (1,0,1)\}. \end{array}\right. } \end{aligned}$$

We next consider losing positions of slow Moore Nim.

Proposition 3

Consider a slow Moore Nim when \(n \le k+2\) or \(n = k+3 \le 6\). Then for a position \(x \in {\mathbb {Z}}_+^I\), we have the following five cases.

  1. (1)

    for \(n=k\), x is losing if and only if \(p(x) = (0, 0, \ldots , 0)\).

  2. (2)

    for \(n=k+1\), x is losing if and only if \(p(x) \in \{(0, 0, \ldots , 0), (1, 1, \ldots , 1)\}\).

  3. (3)

    for \(n=k+2\), x is losing if and only if \(p(x) \in \{(0, 0, \ldots , 0), (0,1, \ldots , 1)\).

  4. (4)

    for \(n=5\) and \(k=2\), x is losing if and only if

    $$\begin{aligned} p(x) \in \{(0,0,0,0,0), (0,0,1,1,1), (1,1,0,0,1), (1,1,1,1,0)\}; \end{aligned}$$
  5. (5)

    for \(n=6\) and \(k=3\), x is losing if and only if

    $$\begin{aligned} p(x) \in \{(0,0,0,0,0,0), (0,0,1,1,1,1), (1,1,0,0,1,1), (1,1,1,1,0,0)\}. \end{aligned}$$

We note that Moore Nim games satisfy that \(1\le k \le n\), and the case in which \(n=4\) and \(k=1\) is a standard 4-pile Nim.

We finally consider slow exact Nim. Note that this game is trivial when \(k=1\) or \(k=n\). We show that the game is tractable if \(n=3\) and \(k=2\). Again the parity vector plays an important role, although it does not define the SG function uniquely.

Define six sets of positions \(x \in {\mathbb {Z}}_+^3\):

$$\begin{aligned} A&= \{(2a, 2b-1, 2(b+i)) \mid 0 \le a< b, 0 \le i< a, (a+i) \bmod {2} = 1\} \\ B&= \{(2a,2b,2(b+i)+1) \mid 0 \le a \le b, 0 \le i< a, (a+i) \bmod {2} = 1\} \\ C_0&= \{(2a-1, 2b-1, 2(b+i)-1) \mid 0 \le a \le b, 0 \le i< a, (a+i) \bmod {2} = 0\} \\ C_1&= \{(2a-1, 2b-1, 2(b+i)-1) \mid 0 \le a \le b, 0 \le i< a, (a+i) \bmod {2} = 1\} \\ D_0&= \{(2a-1, 2b, 2(b+i)) \mid 0 \le a< b, 0 \le i< a, (a+i) \bmod {2} = 1\} \\ D_1&= \{(2a-1, 2b, 2(b+i)) \mid 0 \le a< b, 0 \le i < a, (a+i) \bmod {2} = 0\}, \end{aligned}$$

and let \(C = C_1 \cup C_2\), \(D = D_1 \cup D_2\).

Proposition 4

For a slow exact Nim with \(n=3\) and \(k=2\), the SG function \({\mathcal {G}}\) can be represented by

$$\begin{aligned} {\mathcal {G}}(x) = {\left\{ \begin{array}{ll} 0 \quad \text { if } x \in (\{(2a,2b,c) \mid 2a \le 2b \le c\} {\setminus } B) \cup A \cup C_0 \cup D_0 \\ 1 \quad \text { if } x\in (\{(2a,2b+1,c) \mid 2a \le 2b+1 \le c\} {\setminus } A) \cup B \cup C_1 \cup D_1 \\ 2 \quad \text { if } x \in \{(2a+1,2b+1,c) \mid 2a+1 \le 2b+1 \le c\} {\setminus } C \\ 3 \quad \text { if } x \in \{(2a+1,2b,c) \mid 2a+1 \le 2b \le c\} {\setminus } D. \end{array}\right. } \end{aligned}$$

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Boros, E., Gurvich, V., Ho, N.B. et al. On the Sprague–Grundy function of extensions of proper Nim. Int J Game Theory 50, 635–654 (2021). https://doi.org/10.1007/s00182-020-00707-3

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00182-020-00707-3

Keywords

Navigation