Graph Nim: Graph-Based Extensions of Nim
- Game of Graph Nim is a family of impartial combinatorial games that impose graph constraints on legal moves, extending ordinary Nim.
- Its variants—edge-traversal, vertex-heap, and four-edge games—demonstrate strategic differences through parity and symmetry reductions.
- The framework employs recursive Grundy evaluations and nim-sum factorizations, influencing computational aspects and combinatorial game theory.
Searching arXiv for the cited graph-Nim papers and closely related variants. Game of Graph Nim denotes a family of graph-based extensions of ordinary Nim in which a graph constrains legal moves and edge- or vertex-weights act as local resources. In the literature summarized here, the term covers several non-equivalent rulesets: edge-traversal games on weighted graphs, vertex-heap games with local movement constraints, weighted-edge games in which an entire neighborhood may be altered in one turn, and graph-theoretic perturbations of classical Nim obtained by deleting finitely many positions from its game graph. Despite these differences, the common framework is that of impartial normal-play combinatorial game theory, centered on options, - and -positions, Grundy numbers, mex recursions, and nim-sum factorization (Erickson, 2010, Burke et al., 2011, Karmakar et al., 5 Sep 2025, Garrabrant et al., 2012).
1. Rule systems and terminological scope
The expression “Graph Nim” does not designate a single canonical game. The main rule systems represented in the literature differ in where heaps live, how movement is constrained, and whether a turn modifies one local heap or several incident edge-weights simultaneously.
| Variant | Basic move rule | Representative results |
|---|---|---|
| Nim on graphs | Move a marker across an incident edge and reduce that edge’s weight | Complete graph with unit weights is winning for ; unit-weight hypercubes have an odd/even dimension dichotomy |
| Neighboring Nim | Stay on the current vertex or move to an adjacent vertex, then reduce the landing vertex-heap | PSPACE-hard; -Neighboring Nim is PSPACE-complete for |
| Four-edge Graph Nim | Choose a vertex and remove non-negative amounts from all incident edges, with strictly positive total removal | Near-complete classification on all graphs with exactly four edges |
| CIS-Nim | Remove a finite set of positions from the game graph of three-heap Nim | Period-two scale invariance persists after every finite perturbation |
In the edge-traversal formulation of Nim on graphs, the game is played on a finite undirected graph with positive integer edge weights and a marker . If is at , a player chooses an incident edge 0, moves to 1, and reduces 2 to any value in 3; an edge reduced to 4 is deleted. A player loses when the current vertex has no incident edge of positive weight (Erickson, 2010).
Neighboring Nim instead places heaps on vertices. A position is 5, where 6 and 7 is the current vertex. The legal options are positions 8 such that 9 or 0, 1, and all other vertex-heaps are unchanged. Standard Nim appears here as the complete-graph special case, because every heap is always adjacent to every other heap (Burke et al., 2011).
The four-edge version changes the move geometry again. Each edge has a positive integer weight, and on each turn a player chooses a vertex and subtracts a non-negative integer from every incident edge, subject to non-negativity of the residual weights and the condition that the total amount removed be strictly positive. Play ends when all edge-weights are zero (Karmakar et al., 5 Sep 2025).
CIS-Nim takes a different viewpoint. One starts from the directed game graph of three-heap Nim and deletes a finite set 2 of forbidden positions together with all incident edges. The result is a cofinite induced subgraph game 3, and the effect of finite local perturbation on the large-scale geometry of 4-positions becomes the main object of study (Garrabrant et al., 2012).
2. Combinatorial machinery: options, Grundy numbers, symmetry
Across these variants, the local move set is organized as a set of options. In the edge-traversal formulation, from a position with the marker at 5, the legal destinations are
6
The literature also distinguishes isomorphic options, where the rooted neighborhoods are graph-isomorphic, from identical options, where the isomorphism also preserves edge weights. These notions are used to compress strategy arguments by symmetry (Erickson, 2010).
The standard impartial-game dichotomy appears under two notational conventions. One source uses 7-position for a position where the first player has a winning strategy and 8-position for a position where the second player has a winning strategy; another uses the conventional 9- and 0-position notation. In either language, the central facts are the same: a losing position has Grundy number 1, every move from such a position leads to a winning position, and every winning position has at least one move to a losing position (Erickson, 2010, Burke et al., 2011).
The Grundy recursion is
2
and the categorical reformulation of impartial games treats a game 3 as a well-founded directed graph with finite branching, equivalently as a recursive coalgebra for the finite powerset functor 4. In that framework, games are “graphs on which we can conduct recursive calculation,” and the Conway-sum identity
5
recasts the nim-sum as the value-combining operation induced by decomposition (Hora, 27 Oct 2025).
Symmetry arguments recur throughout graph-Nim research. In complete graphs and hypercubes they appear as option equivalence and parity control; in graph take-away they appear as involutory automorphisms with fixed subgraphs; in spider-graph arrow games they appear as state isomorphisms. This suggests that symmetry is not merely a proof convenience but a principal structural mechanism by which graph constraints still permit nim-like analysis (Erickson, 2010, O'Sullivan, 2017, Mathews, 2021).
3. Edge-traversal Nim on graphs: paths, cycles, complete graphs, and hypercubes
The earliest line of work represented here studies Nim on weighted undirected graphs with a moving marker. For paths and cycles, the outcome is governed by parity and by whether a player can force the residual graph into an even path. On an odd path, the first player wins by removing all weight from an edge along an odd-path option and forcing the opponent onto an even path from a degree-one vertex. On an odd cycle, the first player wins by deleting an edge and thereby breaking the cycle into an even path. Even cycles are subtler: the players seek to avoid breaking the cycle, and the decisive invariant is obtained by subtracting the minimum edge-weight
6
from every edge. Proposition 2.1 states that for an even cycle 7, the 8-positions of the original graph correspond to those of the reduced graph 9 with 0, and the winning strategy lifts accordingly. The resulting criterion is that the first player wins if there is an odd-path option from the starting position, whereas the second player wins if all options are even paths (Erickson, 2010).
A key structural theorem concerns the complete bipartite graph 1 with all edge weights equal to 2. If play starts at one of the two vertices in the partite set of size 3, then the second player always wins. Adding the edge joining those two vertices produces the graph 4, called 5; here the first player wins by deleting 6 and leaving the opponent the losing 7 position. This SSB structure becomes the template for the complete-graph solution (Erickson, 2010).
The complete graph theorem is then stated in terms of mutually adjacent vertices, that is, adjacent vertices with the same neighbor set, or more specifically 8-mutually adjacent vertices, adjacent vertices of degree 9 with exactly 0 common neighbors. If a unit-weight graph contains at least two mutually adjacent vertices and the game starts on one of them, then 1 wins. Since any two vertices of 2 are 3-mutually adjacent, the corollary is immediate: 4 The proof works by forcing play into an embedded 5 region and keeping the opponent confined there (Erickson, 2010).
Hypercubes provide a second complete unit-weight classification. For the 6-cube 7, every traversed edge is deleted, so the game becomes a finite parity process. If 8 is odd, 9 can confine play in 0 to levels 1 of the Hamming-weight decomposition; within that truncated graph, the degree pattern ensures that 2 always has a legal move and 3 is eventually trapped. If 4 is even, bipartiteness and regularity imply that the only possible losing vertex is 5, from which only 6 ever moves. Hence
7
in the unit-weight case (Erickson et al., 2012).
4. Vertex-heap formulations and computational complexity
Neighboring Nim is the principal complexity-theoretic graph-Nim variant. Its move rule is local in the graph but heap-based at vertices, and this small change is enough to encode hard directed behavior. The game is proved PSPACE-hard by reduction from Directed Vertex Geography. For each directed edge 8, the reduction replaces it by a seven-vertex undirected gadget with vertices
9
weights
0
and edges
1
Two lemmas enforce the simulation: Don’t Go Backwards, which shows that moving from 2 into the gadget at 3 is losing, and Stick to the Script, which shows that after correct entry at 4, any deviation from the safe internal sequences is losing. The upshot is that Neighboring Nim is PSPACE-hard, 5-Neighboring Nim is PSPACE-complete for every 6, and 7-Neighboring Nim is polynomial-time solvable because it is equivalent to Undirected Vertex Geography (Burke et al., 2011).
The same paper abstracts the construction to Neighboring-8. If a ruleset 9 contains positions identical to 0, 1, and 2, then the corresponding graph-constrained local-move version Neighboring-3 is PSPACE-hard. This places graph Nim within a broader program in which graph topology controls where the next move in an impartial game may be made, rather than merely recording static piles (Burke et al., 2011).
5. Finite classifications and perturbative graph-Nim models
A recent finite-classification result studies the Game of Graph Nim on graphs with exactly four edges. Here a move consists of choosing a vertex and reducing all incident edge-weights by non-negative integers whose sum is strictly positive. The central simplifying class is that of galaxy graphs, disjoint unions of stars. On such graphs, the game reduces directly to ordinary Nim by replacing each star with a heap whose size is the sum of its edge-weights, and the position is losing exactly when the tuple of star-sums is balanced in the binary sense of classical Nim. This gives complete criteria for the galaxy graphs among the four-edge cases, including the explicit equal-sum conditions for 4 and 5, and the balanced-tuple conditions for 6 and 7 (Karmakar et al., 5 Sep 2025).
Among non-galaxy four-edge graphs, several exact classifications are known. For 8, the losing positions are exactly those with
9
For 0, an initial configuration
1
is losing if and only if
2
Every configuration on 3 and 4 is winning. The graph 5, consisting of a triangle plus a disjoint edge, has a complete but intricate characterization based on the notion of a special multiset of size three. The graph 6 is the sole four-edge graph left without a full classification; the paper instead provides substantial sufficient winning conditions and large explicit families of losing positions expressed through binary expansions and congruence restrictions (Karmakar et al., 5 Sep 2025).
CIS-Nim studies a different perturbative regime: instead of changing the move rule, it removes finitely many positions from the game graph of three-heap Nim. A fundamental theorem states that for every pair 7 there is a unique 8 such that 9 is a 00-position in 01, with
02
If 03 denotes the largest heap size occurring in the forbidden set and 04, then in fact 05. The main asymptotic theorem is period-two scale invariance: if 06 counts 07-positions 08 with all coordinates less than 09, then for every positive integer 10,
11
converges to a nonzero constant. Thus finite local surgery on the Nim game graph can substantially alter the exact 12-set while preserving a dyadic large-scale law (Garrabrant et al., 2012).
6. Related graph games and broader conceptual developments
Several adjacent graph games clarify what is specific to graph Nim and what belongs to a wider theory of impartial play on graphs. Graph Nimors allows deletion or contraction of an edge on each move; blocks are independent, acyclic graphs are governed purely by edge parity, and cycles satisfy
13
The paper introduces Property S and proves that a graph with Property S is an 14-position if and only if it has an even number of edges, thereby isolating a broad parity regime while also documenting counterexamples such as 15 and 16 to the naive parity heuristic (Skala, 2016).
The graph deletion game often called graph take-away or graph chomp uses vertex and edge deletion rather than traversal or heap reduction. For bipartite graphs it satisfies the Fraenkel–Scheinerman parity formula
17
and for complete graphs one has
18
The same paper develops a detailed theory for graphs with one odd cycle via telescoping vertices, proves a conjecture of Khandhawit and Ye, and computes or conjectures highly regular nim-value patterns for wheels and wheel subgraphs (O'Sullivan, 2017).
The Game of Arrows on trees is not a Nim variant in the ordinary sense, but its analysis is graph-Nim-like in method. After trimming leaf structure, the paper decomposes states on 3-legged spider graphs into path states with known Grundy values and proves that the empty state on a spider with even trimmed leg lengths has Grundy value 19. Translating back, player two wins on any 3-legged spider graph with odd leg lengths in the original game (Mathews, 2021).
At the most abstract end, the categorical treatment of impartial games as recursive coalgebras identifies
20
interprets the one-heap Nim game as the terminal game in disguise, and formalizes the nim-sum as the Bouton monoid associated with Conway addition and outcome. This does not change the concrete graph-Nim rulesets, but it supplies a unifying explanation for why recursive evaluation on game graphs and 21-based composition recur so systematically across them (Hora, 27 Oct 2025).
Taken together, these results show that graph Nim is best understood as a research domain rather than a single game. Its central themes are local move constraints imposed by graph topology, recursive evaluation by Grundy theory, symmetry-based reduction, and a persistent tension between parity-governed solvable families and variants whose graph structure encodes substantially richer behavior.