Papers
Topics
Authors
Recent
Search
2000 character limit reached

Graph Nim: Graph-Based Extensions of Nim

Updated 10 July 2026
  • 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, PP- and NN-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 KnK_n with unit weights is winning for P1P_1; 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; kk-Neighboring Nim is PSPACE-complete for k2k\ge 2
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 GG with positive integer edge weights and a marker AA. If AA is at vjv_j, a player chooses an incident edge NN0, moves to NN1, and reduces NN2 to any value in NN3; an edge reduced to NN4 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 NN5, where NN6 and NN7 is the current vertex. The legal options are positions NN8 such that NN9 or KnK_n0, KnK_n1, 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 KnK_n2 of forbidden positions together with all incident edges. The result is a cofinite induced subgraph game KnK_n3, and the effect of finite local perturbation on the large-scale geometry of KnK_n4-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 KnK_n5, the legal destinations are

KnK_n6

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 KnK_n7-position for a position where the first player has a winning strategy and KnK_n8-position for a position where the second player has a winning strategy; another uses the conventional KnK_n9- and P1P_10-position notation. In either language, the central facts are the same: a losing position has Grundy number P1P_11, 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

P1P_12

and the categorical reformulation of impartial games treats a game P1P_13 as a well-founded directed graph with finite branching, equivalently as a recursive coalgebra for the finite powerset functor P1P_14. In that framework, games are “graphs on which we can conduct recursive calculation,” and the Conway-sum identity

P1P_15

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

P1P_16

from every edge. Proposition 2.1 states that for an even cycle P1P_17, the P1P_18-positions of the original graph correspond to those of the reduced graph P1P_19 with kk0, 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 kk1 with all edge weights equal to kk2. If play starts at one of the two vertices in the partite set of size kk3, then the second player always wins. Adding the edge joining those two vertices produces the graph kk4, called kk5; here the first player wins by deleting kk6 and leaving the opponent the losing kk7 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 kk8-mutually adjacent vertices, adjacent vertices of degree kk9 with exactly k2k\ge 20 common neighbors. If a unit-weight graph contains at least two mutually adjacent vertices and the game starts on one of them, then k2k\ge 21 wins. Since any two vertices of k2k\ge 22 are k2k\ge 23-mutually adjacent, the corollary is immediate: k2k\ge 24 The proof works by forcing play into an embedded k2k\ge 25 region and keeping the opponent confined there (Erickson, 2010).

Hypercubes provide a second complete unit-weight classification. For the k2k\ge 26-cube k2k\ge 27, every traversed edge is deleted, so the game becomes a finite parity process. If k2k\ge 28 is odd, k2k\ge 29 can confine play in GG0 to levels GG1 of the Hamming-weight decomposition; within that truncated graph, the degree pattern ensures that GG2 always has a legal move and GG3 is eventually trapped. If GG4 is even, bipartiteness and regularity imply that the only possible losing vertex is GG5, from which only GG6 ever moves. Hence

GG7

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 GG8, the reduction replaces it by a seven-vertex undirected gadget with vertices

GG9

weights

AA0

and edges

AA1

Two lemmas enforce the simulation: Don’t Go Backwards, which shows that moving from AA2 into the gadget at AA3 is losing, and Stick to the Script, which shows that after correct entry at AA4, any deviation from the safe internal sequences is losing. The upshot is that Neighboring Nim is PSPACE-hard, AA5-Neighboring Nim is PSPACE-complete for every AA6, and AA7-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-AA8. If a ruleset AA9 contains positions identical to AA0, AA1, and AA2, then the corresponding graph-constrained local-move version Neighboring-AA3 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 AA4 and AA5, and the balanced-tuple conditions for AA6 and AA7 (Karmakar et al., 5 Sep 2025).

Among non-galaxy four-edge graphs, several exact classifications are known. For AA8, the losing positions are exactly those with

AA9

For vjv_j0, an initial configuration

vjv_j1

is losing if and only if

vjv_j2

Every configuration on vjv_j3 and vjv_j4 is winning. The graph vjv_j5, 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 vjv_j6 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 vjv_j7 there is a unique vjv_j8 such that vjv_j9 is a NN00-position in NN01, with

NN02

If NN03 denotes the largest heap size occurring in the forbidden set and NN04, then in fact NN05. The main asymptotic theorem is period-two scale invariance: if NN06 counts NN07-positions NN08 with all coordinates less than NN09, then for every positive integer NN10,

NN11

converges to a nonzero constant. Thus finite local surgery on the Nim game graph can substantially alter the exact NN12-set while preserving a dyadic large-scale law (Garrabrant et al., 2012).

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

NN13

The paper introduces Property S and proves that a graph with Property S is an NN14-position if and only if it has an even number of edges, thereby isolating a broad parity regime while also documenting counterexamples such as NN15 and NN16 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

NN17

and for complete graphs one has

NN18

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 NN19. 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

NN20

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 NN21-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.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Game of Graph Nim.