Skip to content

Computing the Remoteness Function of Exact NIM(n,k) with n≤3kn \leq 3k

Vladimir Gurvich, Mariya Naumova, Artem Parfenov, Mikhail Vyalyi

math.CO

Abstract

We obtain an explicit formula for the Smith remoteness function of the impartial game Exact NIM(n,k) when 2k≤n≤3k2k\leq n \leq 3k under the normal-play convention (the case n<2kn<2k is trivial). A legal move in this game decreases exactly kk of nn piles of tokens by any positive amounts. Even characterizing the P-positions of NIM(5,2) was an open problem for at least ten years. For each position we consider the corresponding Bouton matrix, introduce the concept of its rank, and define capacity as the maximal possible number of piles that can be decreased while preserving the rank. Then, P-positions are exactly those of capacity smaller than kk. Generalizing this result, we also express the remoteness function in the same terms. We provide an algorithm computing the rank and capacity in polynomial time even if nn and kk are part of the input. For fixed kk, we provide a finite-state automaton recognizing the P-positions and nondeterministic finite-state transducers that output the rank and an optimal move (the winner wins as quickly as possible; the loser resists as long as possible). From this we conclude that, for Exact NIM(n,k) with k=O(1)k=O(1) and n≤3kn\leq 3k, P-membership belongs to logspace uniform NC1NC^1, while computing the remoteness function and an optimal move belongs to FNC1FNC^1; these problems can therefore be solved in logarithmic space.

Create a lesson

Metadata

Categories
math.CO, cs.CC