StrNim: a variant of Nim played on strings
Shota Mizuno, Ryo Yoshinaka, Ayumi Shinohara
TL;DR
StrNim introduces a string-based Nim variant where a move deletes a homogeneous substring, and a mapping from Nim positions to run-length strings shows StrNim generalizes Nim. The paper develops several P-position conditions using formal-language tools, proving non-context-freeness of P_pos in general while identifying structured, tractable cases: periodic a^i b^j a^k forms, complementary palindromes, run-length-one strings, a context-free subset L^*, and Thue–Morse prefixes. Key contributions include a non-context-free result via L1, a periodicity framework for run structures, and complete characterization of P/N for Thue–Morse prefixes, linking combinatorial game theory with language theory. These findings lay groundwork for a broader classification of StrNim positions and invite further exploration of language-driven analyses in similar games.
Abstract
We propose a variant of Nim, named StrNim. Whereas a position in Nim is a tuple of non-negative integers, that in StrNim is a string, a sequence of characters. In every turn, each player shrinks the string, by removing a substring repeating the same character. As a first study on this new game, we present some sufficient conditions for the positions to be P-positions.
