Nimber-Preserving Reduction: Game Secrets and Homomorphic Sprague-Grundy Theorem

,


Introduction
Mathematical games are fun and intriguing. Even with succinct rulesets (which define game positions and the players' options from each position), they can grow game trees of size exponential in that of the starting positions. A game is typically formulated for two players. They take turns strategically selecting from the current options to move the game state to the next position. In the normal-play convention, the player that faces a terminal positiona position with no feasible options -loses the game. The game tree from a starting positionwith the leaves as the terminal positions -naturally captures this alternation of all potential feasible moves.
Generalized Geography [28,24] models a two-player game of traversing maximal paths: Each position is defined by a token in a directed graph and a move consists of removing the current vertex from the graph and moving the token to an out-neighbor.
(It is often just referred to as Geography.) Atropos [10] models the dynamic formation of discrete equilibria (panchromatic triangles) in topological maps: Positions are partially colored Sperner triangles, and a move consists of coloring a vertex.
The deep alternation of strategic reasoning also intrinsically connects optimal play in many games to highly intractable complexity classes, most commonly PSPACE. After Even and Tarjan proved this for a generalization of Nash's Hex [14], deciding winnabilty of many natural combinatorial games -including Node-Kayles, Generalized Geography, Avoid True, Proper-K-Coloring, Atropos, Graph Nim, and Generalized Chomp 1 -have been shown to be PSPACE-complete [28,24,11,3,10,30,22].

A Classical Mathematical Theory for Impartial Games
Mathematical characterizations of combinatorial games emerged prior to the age of modern computational complexity theory. In 1901, Bouton [5] developed a complete theory for Nim, based on an ancient Chinese game Jian Shi Zi (捡石子 -picking stones). A Nim position is a collection of piles of (small) stones. On their turn, a player takes one or more stones from exactly one of the piles. Representing each Nim position by a list of integers, Bouton [5] proved that the current player has a winning strategy in the normal-play setting if and only if the bitwise-exclusive-or of these integers (as binary representations) is not zero. Note that although the game tree of a Nim position could be exponentially tall in the number of bits representing the position, Bouton's characterization provides a polynomial-time solution for determining the winnability of Nim games.
Nim is an example of an impartial ruleset, meaning both players have the same options at every position. Games that aren't impartial are known as partisan. The two graph games, Node-Kayles and Generalized Geography aforementioned, are also impartial.
In the 1930s, Sprague [31] and Grundy [23] independently developed a comprehensive mathematical theory for impartial games. They introduced a notion of equivalence among games, characterizing their contributions in the disjunctive sums with other impartial games. Extending Bouton's theory for Nim, Sprague-Grundy Theory provides a complete mathematical solution to the disjunctive sums of impartial games.  Sprague and Grundy showed that every impartial game G can be equivalently replaced by a single-pile Nim game in any disjunctive sum involving G. Thus, they characterized each impartial game by a natural number -now known as the nimber, Grundy value, or nim-value -which corresponds to a number of stones in a single-pile of Nim. Mathematically, the nimber of G, which we denote by nimber(G), can be recursively formulated via G's game tree: (1) if G is terminal, then nimber(G) = 0; otherwise (2) if {G 1 , . . . , G k } is the set options of G, letting mex returns the smallest value of (Z + ∪ {0}) \ {nimber(G 1 ), . . . , nimber(G t )}, then: Let ⊕ denote the bitwise xor (nim-sum). By Bouton's Nim theory [5]: Thus, Sprague-Grundy Theory -using Bouton's Nim solution -provides an instrumental mathematical summary (of the much larger game trees) that enhances the winnability for impartial games: A position is a winning position if and only if its nimber is non-zero. This systematic framework inspired subsequent work in the field, including Berlekamp, Conway, and Guy's Winning Ways for Your Mathematical Plays [4], and Conway's On Numbers And Games [11], which laid the foundation for Combinatorial Game Theory (CGT). This 1930s theory also has an algorithmic implication. Equation (2) provides a polynomial-time framework for computing the nimber of a sum game -and the hence the winnability -from the nimbers of its component games: If the nimbers of two games G and H are tractable, then nimber(G + H) is also tractable.

Our Main Contributions
Obviously, in spite of this algorithmic implication, Sprague-Grundy Theory does not provide a general-purpose polynomial-time solution for all impartial games, as witnessed by many PSPACE-hard rulesets, including Node Kayles and Generalized Geography [28,24]. If one views the nimber characterization of an impartial game as a reduction from that game to a single pile Nim, then Schaefer et al's complexity results demonstrate that this reduction has intractable constructability. In fact, a recent result [9] proved that the nimber of polynomial-time solvable Undirected Geography -i.e., Generalized Geography on undirected graphs -is also PSPACE-complete to compute. The sharp contrast between the complexity of winnability and nimber computation illustrates a fundamental mathematicalcomputational divergence in Sprague-Grundy Theory [9]: Nimbers can be PSPACE-hard "secrets of deep alternation" even for polynomial-time solvable games.
Computational complexity theory often gives new perspectives of classical mathematical results. In this work, it also provides us with a new lens for understanding this classical mathematical characterization as well as tools for exploring and identifying new fundamental characterizations in combinatorial game theory.

Polynomial-Time Nimber-Preserving Reduction to Generalized Geography
In this paper, we consider the following natural concept of reduction among impartial games.
Because an impartial position is a losing position if and only if its nimber is zero, nimberpreserving reductions enhance winnability-preserving reductions in traditional complexitytheoretical characterizations of combinatorial games [14,28]: Polynomial-time nimber-preserving reductions introduce the following natural notion of "universal" impartial rulesets.
▶ Definition 3 (Sprague-Grundy Completeness). For a family J of impartial rulesets, we say R ∈ J is a Sprague-Grundy-complete ruleset for J if for any position Z of any ruleset of J , one can construct, in polynomial time, a position G ∈ R such that nimber(G) = nimber(Z).
As the main technical contribution of this paper, we prove the following theorem regarding the expressiveness of Generalized Geography. The natural family of rulesets containing Generalized Geography is I P , the family of all impartial rulesets whose positions have game trees with height polynomial in the sizes of the positions. We call games of I P polynomially-short games. In addition to Generalized Geography, I P contains many combinatorial rulesets studied in the literature, including Node Kayles, Chomp, Proper-K-Coloring, Atropos, and Avoid True, as well as Nim and Graph Nim with polynomial numbers of stones.
▶ Theorem 4 (A Complete Geography). Generalized Geography is a Sprague-Grundy complete ruleset for I P .
In other words, for example, given any Node Kayles or Avoid True game, we can, in polynomial time, generate a Generalized Geography game with the same Grundy value, despite the fact that the Grundy value of the input game could be intractable to compute.
Because nimber-preserving reductions generalize winnability-preserving reductions, every Sprague-Grundy complete ruleset for I P must be PSPACE-complete to solve. However, for a simple mathematical reason, we have the following observation: ▶ Proposition 5. Unless P = PSPACE, not every PSPACE-complete ruleset in I P is Sprague-Grundy complete for I P .
In particular, Atropos [10] is PSPACE-complete but not Sprague-Grundy-complete for I P . Thus, together Theorem 4 and Proposition 5 highlight the fundamental difference between winnability-preserving reductions and nimber-preserving reductions. Our result further illuminates the central role of Generalized Geography -a classical PSPACE-complete ruleset instrumental to Lichtenstein-Sipser's PSPACE-hard characterization of Go [16] -in the complexity-theoretical understanding of combinatorial games.
In Section 5, when discussing related questions, we also demonstrate the brief corollary: 2 This natural concept of reduction in combinatorial game theory can be viewed as the analog of functional-preserving reductions in various fields. To name a few: approximation-preserving, gappreserving, structure-preserving reductions in complexity and algorithmic theory, hardness-preserving and security-preservation in cryptography, dimension-preserving, metric-preserving, and topology-preserving reductions in data analytics, parameter-preserving reductions in dynamic systems, counterexamplepreserving reductions in model checking, query-number-preserving, sample-preserving and high-ordermoment-preserving in statistical analysis, and modularity-preserving reductions in network modeling. We are inspired by several of these works.
▶ Corollary 6. Edge Geography (formulated in [28] and studied in [17], see Section 5.1 for the ruleset) is also Sprague-Grundy-complete for I P .

Game Secrets: Homomorphic Sprague-Grundy Theorem
In the framework of disjunctive sums, every impartial game G encodes a secret, i.e., its Grundy value nimber(G), which succinctly summarizes G's game tree and can be represented by a single-pile Nim. Once this secret is obtained, by Sprague-Grundy theory, one can replace G by its equivalent single-pile Nim in any disjunctive sum involving G. Even though Nim is expressive enough to provide natural game representations of these game secrets, it does not admit an efficient reduction, even for polynomial-time solvable games, such as Undirected Geography, in I P .
In contrast, for impartial games in I P , Theorem 4 shows that Generalized Geography provides natural game representations of these game secrets. In conjunction with Sprague-Grundy theory, this Generalized Geography-based encoding of nimbers leads to a surprising cryptography-inspired homomorphic characterization of impartial games.
Like the Sprague-Grundy theory -which represents the game values by natural games -Theorem 7 encodes "nimber secrets" with natural games. The former uses "single-pile" Nim and the later uses "single-graph" Generalized Geography. For both, one can compute, in polynomial time, the representation of the disjunctive sum of any two representations. Because Generalized Geography is not naturally closed under disjunctive sums, genuine computational effort -although feasible in polynomial-time -is required in the homomorphic encoding of the disjunctive sum.

Bout on (in P)
Se ct ion 3 (in P) Figure 1 Two transformations of impartial games A and B into a single game equivalent to their disjunctive sum.

Remarks
This genuineness can be partially captured by Conway's notion of prime impartial games in his studies of misère games. Let prime impartial games be ones that can't be expressed as the disjunctive sum of any two other games (see Section 4.1 for the formal definition). Like the role of prime numbers in the multiplicative group over integers, these games are the basic building blocks in the disjunctive-sum-based monoid over impartial games.
In Theorem 20, we will prove that each Generalized Geography game created in the proof of Theorem 7 is indeed a prime game. Thus, in Theorem 7, because G is a natural prime game, the algorithm for "Homomorphic Game Encoding" cannot trivially output the syntactic description of G 1 + G 2 . Thus, it must use a more "elementary" position to encode nimber(G 1 ) ⊕ nimber(G 2 ). In other words, the bitwise-xor of the PSPACE-hard "nimber secrets" encoded in any two impartial games of I P can be efficiently re-encoded by a natural prime game of I P , whose game tree is not isomorphic to that of G 1 + G 2 .
Conway's notation of prime games only partially captures the genuineness of the homomorphic encoding in Theorem 7 because one may locally modify the game rule for some zero positions to make the sum game prime without changing the nimber. So the naturalness of Generalized Geography captures more beyond the current concept of prime games. We continue to look for a more accurate characterization.
Note also that the characterization presented in Theorem 7 is cryptography-inspired rather than cryptographically-applicable. In partially homomorphic encryption, the encoding functions, such as RSA encryption and discrete-log, must be one-way functions. Here, we consider a game position as a "natural encoding" of its nimber-secret: The focus of Theorem 7 is on the complexity-based homomorphic property of this encoding (and that it arises naturally from impartial games) rather than the construction of homomorphic "one-way" game-based encryption of secret messages. (See Section, 5 -Conclusion and Open Questions -for more discussion on this.) Thus, in contrast to (partially) homomorphic cryptographic functions -such as discrete-log and RSA -whose secret messages can be recovered in NP (due to a one-way encoding of secrets), "decoding" the nimber-secrets -as they are naturally encoded in combinatorial games of I P -is PSPACE-complete in the worst case.

Impartial Games and Their Trees: Notation and Definitions
In this section, we review some background concepts and notation. In the paper, we use I to denote the family of all impartial rulesets; we use I to denote the family of all impartial games -positions -defined by rulesets in I; we use I P to denote the family of all polynomially-short impartial games, i.e., positions defined by rulesets in I P .
Each impartial ruleset R ∈ I has two mathematical components (B R , ρ R ), where B R represents the set of all possible game positions in R and ρ R : B R → 2 B R defines the options for each position in R. For each position G ∈ B R , the ruleset R defines a natural game tree, T G , rooted at G. T G recursively branches with feasible options. The root is associated with position G itself. The number of children that the root has is equal to the number of options, i.e., |ρ R (G)|, at G. Each child is associated with a position from ρ R (G) and its sub-game-tree is defined recursively. Thus, T G contains all reachable positions of G under ruleset R. The leaves of T G are terminal positions under the normal-play setting. Up to isomorphism, the game tree for an impartial game is unique.
▶ Definition 8 (Game isomorphism). Two impartial games, G and H, are isomorphic to each other if T G is isomorphic to T H .
For any two impartial games F and G, the game tree T (F +G) of their disjunctive sum can be more naturally characterized via T F □ T G , the Cartesian product of T F and T G . Clearly, T F □ T G is a directed acyclic graph (DAG) rather than a rooted tree, as a node may have up to two parents. The game tree T (F +G) can be viewed as a tree-expansion of DAG T F □ T G . To turn it into a tree, one may simply duplicate all subtrees whose root has two parents, and give the parents edges to different roots of those two subtrees. We will use T F ■ T G to denote this tree expansion of the Cartesian product T F □ T G , and call it the tree sum of T F and T G .
In combinatorial game theory (CGT), each ruleset usually represents an infinite family of games, each defined by its starting position. For algorithmic and complexity analyses, a size is associated with each game position as the basis for measuring complexity [28,15,26,7]. Examples include: (1) the number of vertices in the graph for Node Kayles and Generalized Geography, (2) the board length of Hex and Atropos, and (3) the number of bits encoding Nim.
The size measure is assumed to be natural 3 with respect to the key components of the ruleset. In particular, for each position G in a ruleset R: G has a binary-string representation of length polynomial in size(G). Each position reachable from G has size upper-bounded by a polynomial function in size(G).
Determining if a position of F ∈ B R is an option of G -i.e., whether F ∈ ρ R (G) -takes time polynomial in size(G).
Recall that the family, I P , discussed in the introduction is formulated based on the sizes of game positions. We call games of I P polynomially-short games. Generalized Geography and Node Kayles are among the many examples of games that are both polynomially-wide and polynomially-short. Nim, however, is neither polynomially-wide nor polynomially-short due to the binary encoding of the piles. In general, under the aforementioned assumption regarding the size function of game positions, |ρ R (G)| could be exponential in size(G). However, positions in ρ R (G) can be enumerated in polynomial space. Therefore, by DFS evaluation of game trees and classical complexity analyses of Node Kayles, Generalized Geography and Avoid True: An impartial ruleset is said to be polynomial-time solvable -or simply, tractable -if there is a polynomial-time algorithm to identify a winning option whenever there exists one (i.e., for the search problem associated with the decision of winnability). If one doesn't exist, then the algorithm needs to only identify this.

Star Atlas: A Complete Generalized Geography
In our analysis, we will use the standard CGT notation for nimbers: * k for k, except that * is shorthand for * 1 and 0 is shorthand for * 0. 4 Mathematically, one can view * as a map from Z + ∪ {0} to (infinite) subfamilies of impartial games in I, such that for each k ∈ Z + ∪ {0}, nimber(G) = k, for all G = * k. In other words, * is nature's game encoding of non-negative integers.
Sprague-Grundy Theory establishes that each impartial game's strategic relevance in disjunctive sums is determined by its nimber (i.e., its star value). In this section, we prove Theorem 4, showing how to use Generalized Geography to efficiently "map out" games' nimbers across I P .
For readability, we restate Theorem 4 to make the needed technical component explicit: ▶ Theorem 11 (Sprague-Grundy-Completeness of Generalized Geography). There exists a polynomial-time algorithm ϕ such that for any game G ∈ I P , ϕ(G) is a Generalized Geography position satisfying nimber(ϕ(G)) = nimber(G).
Our proof starts with the following basic property of nimbers, which follows from the recursive definition (given in Equation 1): ▶ Proposition 12. For any impartial game G, nimber(G) is bounded above by both the height of its game tree, h, and the number of options at G, l. In other words, G = * k, where k ≤ min(h, l).
To simplify notation, we let g = min(h, l). To begin the reduction, we will need a reduction for each decision problem Q i = "Does G = * i?" (∀i ∈ [g]). By Proposition 10, the decision problem Q i is in PSPACE. Thus, we can reduce each Q i to an instance in the PSPACE-complete QSAT (Quantified SAT), then to a Geography instance using the classic reduction, f , from [28,24]. Referring to the starting node of f (Q i ) as s i , we add two additional vertices, a i and b i , with directed edges (b i , a i ) and (a i , s i ). Now, s i has exactly two options, so the value of f (Q i ) is either 0, * , or * 2. By the reduction, it is 0 exactly when G ̸ = * i, and in { * , * 2} when G = * i. a i has exactly one option (s i ), so the value of the Geography position starting there (instead of at s i ) is 0 when G = * i and * otherwise. b i has exactly one option (a i ), so the value of the Geography position starting there is * when G = * i and 0 otherwise.
Each of these constructions from Q i is shown in Figure 2. We will combine these g + 1 Geography instances into a single instance, but first we need some utility vertices each equal to one of the nimber values 0, . . . , * (g − 2). We can build these using a single gadget as shown in figure 3. This gadget consists of vertices t 0 , t 1 , . . . , t g−2 with edges (t i , t j ) for each i > j. Thus, each vertex t i has options to t j where j < i and no other options, exactly fulfilling the requirements for t i to have value * i. b i a i s i  For k ≥ 2, we will split up our analysis into the two cases: i < k and i ≥ k. We will next consider the case where k ≥ 2 and i < k. From d i there are moves to b 1 , c 2 , . . . , c i . Since k > i, these have values 0, * , * 2, . . . , * (i − 1), respectively, by Lemma 13. The mex of these is * i, so d i has value * i.  Proof. The options from start are b 0 , c 1 , and ∀i ∈ [2, g] : d i . If G = 0, then b 0 is * , c 1 is * , and, by Lemma 14, each d i is * i. Since 0 is missing from these options, the value at start is 0 = * k.
If G = * , then the move to b 0 is 0, the move to c 1 is also 0, and, by Lemma 15, the moves to d i is each also 0, because each i > k = 1 and * (k − 1) = * (1 − 1) = 0. All the options are to 0, so the value at start is * = * k.

Nimber Secrets: A PSPACE-Complete Homomorphic Encoding
Mathematically, Sprague-Grundy Theory together with Bouton's Nim characterization provide an algebraic view of impartial games. Their framework establishes that the Grundy function, nimber(), is a morphism from the monoid (I, +) -impartial games with disjunctive sum -to the monoid (Z + ∪ {0}, ⊕) -non-negative integers in binary representations with bitwise-xor: Elegantly, 1. nimber(G) can also be represented by a natural game, i.e., a single pile Nim with nimber(G) stones, and 2. the sum of two single-pile Nim games can be represented by another single-pile Nim whose game tree can be significantly different from the game tree of the sum. The only "blemish" -from computational perspective -is that the Grundy function can be intractable to compute [28], even for some tractable games in I P [9].
Theorem 11 provides an alternative natural game representation of nimber(G), for G ∈ I P . In contrast to Nim, Generalized Geography admits a polynomial-time algorithm for computing this representation from G without the need of computing nimber(G). In fact, using Theorem 11, one can also compute, in polynomial time, a single-graph Generalized Geography representation of the sum of any two (Generalized Geography) games: ▶ Theorem 17 (Homomorphic Game Encoding of Grundy Values). For any pair of games G 1 , G 2 ∈ I P , one can, in polynomial-time in size(G 1 ) + size(G 2 ), construct a Generalized Geography game G, such that: Proof. Given the game functions ρ G1 and ρ G2 , in time linear in size(G 1 ) + size(G 2 ), one can construct a game function ρ (G1+G2) for their disjunctive sum G 1 + G 2 such that the game tree of ρ (G1+G2) is G 1 ■ G 2 . This theorem follows from Theorem 4 and the following basic fact: The disjunctive sum (G 1 + G 2 ) of two polynomially-short games G 1 , G 2 ∈ I P remains polynomially short in terms of size(G 1 ) + size(G 2 ). Now we can apply Theorem 4 to ρ (G1+G2) to construct a prime Generalized Geography G in time polynomial in size(G 1 )+size(G 2 ). G satisfies: nimber(G) = nimber(G 1 )⊕nimber(G 2 ). The correctness follows from that of Theorem 4 and Sprague-Grundy Theory. ◀ Figuratively, every impartial game G encodes a secret, nimber(G). The game G itself can be viewed as an "encryption" of its nimber-secret. The players who can uncover this nimbersecret can play the game optimally. For every game G ∈ I P , this secret can be "decrypted" by a DFS-based evaluation of G's game tree in polynomial space. Thus, computing the nimber for I P is PSPACE-complete (under the Cook-Turing reduction).
Speaking of encryption, several basic cryptographic functions have homomorphic properties. For example, for every RSA encryption function ENC RSA , for every pair of its messages m 1 and m 2 , the following holds: Another example is the discrete-log function. For any prime p, any primitive element g ∈ Z * p , and any two messages m 1 , m 2 ∈ Z * P : Assuming RSA encryption and the discrete-log function are computationally intractable to invert, these morphisms state that without decoding the secret messages from their encoding, one can efficiently encode their product or sum, respectively, with the RSA and discrete-log functions. In cryptography, these functions are said to support partially homomorphic encryption.
Together, Theorem 17 and Theorem 11 establish that polynomially-short impartial games are themselves partially homomorphic encodings of their nimber-secrets: Without decoding their nimbers, one can efficiently create a Generalized Geography game encoding the ⊕ of their nimbers.
Note again that homomorphic cryptographic functions, such as discrete log and RSA encryption, satisfy an additional property: They are one-way functions, i,e., tractable to compute but are assumed to be intractable to invert. Theorem 7 (and hence Theorem 17) is inspired by the concept of partially homomorphic encryption. However, its focus is not on a one-way encoding of targeted nimber-values with impartial games in I P . Rather, it characterizes the complexity-theoretical homomorphism in this classical and natural encoding for impartial games. Because of the one-way property, RSA and discrete-log functions are decodable by an NP-oracle. In contrast, the nimber-decoding of impartial games in I P is in general PSPACE-hard.

Natural Prime Games
Inspired by Conway's notation with parts within the context of misère games [11][29], we use the following terms to identify what game trees can be described as isomorphically the sum of two other games:

▶ Definition 18 (Prime Games and Composite Games). A game G is a composite game if it is a sum of two games that both have tree-height at least 1. Otherwise, it is prime.
Note that prime games, in a similar manner to prime numbers, can only be summed by a game with tree-height of 0 (ie: just a single vertex) and itself. It follows from the basic property of Cartesian graph products that each composite game has a unique decomposition into prime games.

▶ Proposition 19 (Decomposition in Prime Games). A game G is isomorphic to a disjunctive sum of two games A and B if and only if its game tree T G is isomorphic to T
In Bouton theory for Nim, for any non-negative integers a, b, even though nimber(Nim(a ⊕ b)) = nimber(Nim(a)) ⊕ nimber(Nim(b)), Nim(a ⊕ b) is not isomorphic to Nim(a) ⊕ Nim(b). In fact, Nim(a ⊕ b) is a natural prime game. Similarly, even though in the proof of Theorem 17, ρ (G1+G2) simply copies the syntactic game transition function that can generate G 1 ■ G 2 , the construction in Theorem 4 generates the homomorphic prime game encoding of nimber(G 1 ) ⊕ nimber(G 2 ).
▶ Theorem 20 (Prime Geography). Each Generalized Geography position as created in the reduction in Theorem 11 is a prime game.
Proof. Suppose that our game tree is claimed to be X ■ Y , with root vertices x 0 and y 0 , respectively, and both X and Y have height at least 1. We will find a contradiction.
Consider vertex b 0 , an option of start. Since b 0 has only one option, that means that it must correspond to a terminal move in either X or Y . WLOG, let it correspond to x 1 , a terminal vertex in X. Thus, b 0 = (x 1 , y 0 ) and is isomorphic to Y , because x 1 is terminal in X.
The move to c 1 must be available, since otherwise the start would have only one option and thus not be a tree sum. This position also has only one option from itself. There are two cases: it either corresponds to a terminal vertex in X, say x 2 , or a terminal vertex in Y , say y 1 . In the first case, then c 1 = (x 2 , y 0 ), which is isomorphic to Y . This causes a contradiction, however, because the subtrees generated by b 0 and c 1 are not isomorphic. (b 0 has 2 moves to reach s 0 , but c 1 has 3 moves to reach s 1 .) In the second case, c 1 = (x 0 , y 1 ), and y 1 is terminal in Y . Then that means there must be a move from c 1 to a vertex, v, corresponding to (x 1 , y 1 ). Since both x 1 and y 1 are terminal (in X and Y ), that means v will be terminal in the tree sum. However, c 1 doesn't have any options to a terminal vertex. This case cannot happen and, without any other possible cases, no such X and Y exist as factors for our tree. ◀

Final Remarks and Open Questions
It is expected that PSPACE-complete games encode some valuable secrets. And once revealed, those secrets can help players in their decision making (e.g., under the guidance of Sprague-Grundy Theory). In this work, through the lens of computational complexity theory, we see that all polynomially-short impartial games neatly encode their nimber-secrets, which can be efficiently transferred into prime Generalized Geography games. The game encoding is so neat that the bitwise-xor of any pair of these nimber-secrets can be homomorphically re-encoded into another prime game in polynomial time, without the need to find the secrets first.
We are excited to discover this natural mathematical-game-based PSPACE-complete homomorphic encoding. Recreational mathematics can be simultaneously serious and fun!
The crypto-concept of (partially) homomorphic encryption has inspired us to identify these basic complexity-theoretical properties of this fundamental concept in CGT. It would have been more fulfilling if we could also make our findings useful in cryptography. Currently, we are exploring potential cryptographic applications of this "game encoding of strategic secrets," particularly on one-way game generation for targeted nimbers. In addition to finding direct cryptographic connections, we are still exploring several concrete CGT questions. Below, we share some of them.

Expressiveness of Intractable Games: Sprague-Grundy Completeness
In this paper, we have proved that the PSPACE-complete polynomially-short Generalized Geography is prime Sprague-Grundy complete for I P . We observe that not all games in I P with PSPACE-hard nimber computation are Sprague-Grundy complete for the family because: 1. Some intractable games can't encode nimbers polynomially related to the input size 2. Some games with intractable nimber computation have some nim values which are tractable.
For (1), our first example is Generalized Geography on Degree-Three Graphs. In [24], Lichtenstein and Sipser proved that Generalized Geography is PSPACEcomplete to solve even when the game graph is planar, bipartite, and has a maximum degree of three. These graph properties are essential to their analysis of the two-dimensional gridbased Go. Mathematically, the maximum achievable nimber in Generalized Geography on Degree-Three Graphs is three. Thus, there is no nimber-preserving reduction from higher nimber position in I P to these low-degree Generalized Geography games. For the same reason, the PSPACE-complete Atropos introduced in [10] cannot be Sprague-Grundy complete.
▶ Lemma 21. The value of any Atropos position must be one of these nimbers: 0, * , * 2, · · · , * 7. (And thus, Atropos cannot be Sprague-Grundy complete.) Proof. For the details of how Atropos is played, please see [10]. If the last (played) vertex has uncolored neighbors, then there are at most six neighbors, so the highest nimber value is * 6.
If the previously-played vertex is fully surrounded by colored vertices 5 , then there are two possibilities: either all playable vertices have uncolored neighbors, or some of the playable vertices are also fully surrounded. In the first case, there may be options to all nimbers 0, * , * 2, . . . , * 6, so the value here could be up to * 7.
In the second case, the current position, say G, is equal to the sum of the portion of the board (say, H) without those fully-surrounded (but playable) vertices and the portion of the board with only those vertices. Each of those vertices in G \ H changes the value by * . Thus, if there are k of them, G = H + k × * . Thus, either G = H or G = H + * . By the previous case, the nimber of H can be up to * 7, so the value of G can also be at most * 6 or * 7.
Atropos has a bounded nimber, so it cannot be Sprague-Grundy complete. ◀ For (2), both Undirected Geography [17] and Uncooperative Uno [12] 6 are not Sprague-Grundy complete for I P -unless P = PSPACE -despite their nimber intractability, with Undirected Geography being known to have polynomially high nimber positions [9]. For Undirected Geography, Fraenkel, Scheinerman, and Ullman [17] presented a matching-based characterization to show these games are polynomial-time solvable. For Uncooperative Uno, Demaine et al [12] presented a polynomial-time reduction to Undirected Geography. Thus, any polynomial-time nimber-preserving reduction from I P to Undirected Geography (or Uncooperative Uno) would yield a polynomial-time algorithm for solving I P .
Rulesets which have nimber preserving reductions from Generalized Geography are Sprague-Grundy complete. A simple example is the vertex version of DiGraph Nim [18], in which each node has a Nim pile and players can only move to a reachable node in a directed graph from the current node to pick stones. When every pile has one stone, the game is equivalent to Generalized Geography with the underlying graph. An interesting question is whether Neighboring Nim (with a polynomial number of stones) -a PSPACE-complete version of Nim played on an undirected graph [6] -is Sprague-Grundy complete.
The edge variant of Generalized Geography, known as the Edge-Geography, considered in the literature [28,24,17] presents a natural extension. This is a version of Geography where instead of deleting the current node after the token moves away, it is the edge traversed by the token that is deleted. Edge-Geography and its undirected sub-family, Undirected Edge-Geography are both PSPACE-complete. The following proof sketch shows that Edge-Geography remains Sprague-Grundy complete. Proof. We can follow the early parts of the proof for Generalized Geography. We reduce from all polynomially-short games, creating a game of Edge-Geography for each. Then, for each game, we again append two "filler" moves to the beginning, to ensure that it is exactly 0 or * .
We can then reuse our scheme from figure 2. Since there are no cycles in that gadget, play between both Edge-Geography and Generalized Geography is identical.
Of course, the primality section required knowing that the main Geography game didn't start with an out degree of only one. To fix this, we can simply have v b go to v a1 and v a2 which both only have a single edge to v s . ◀ It remains open whether Undirected Edge-Geography is Sprague-Grundy complete. In addition to these rulesets adjacent to Generalized Geography, we are interested in the following three well-studied games: Is Node Kayles Sprague-Grundy complete for I P ? Is Avoid True Sprague-Grundy complete for I P ? Is Generalized Chomp Sprague-Grundy complete for I P ? In our proof for Generalized Geography, we critically use the "locality" in this graphtheoretical game: The options are defined by the graph-neighbors of the current node. Both Node-Kayles and Avoid True are far more "global"; there is no need for moves to be near the previous move. We are also interested in Generalized Chomp because the hierarchical structures from partial orders could be instrumental to analyses.
Node-Kayles -see below for more discussion -also suggests the following basic structural question: Is there a natural ruleset in I P that is Sprague-Grundy-complete for I P but not prime Sprague-Grundy-complete for I P ?

Game Encoding and Computational Homomorphism
Let's call a family H of impartial rulesets satisfying Theorem 7 (in place of I P and with a prime game of I P in place of Generalized Geography) a computationally-homomorphic family. Note that for any J including Undirected Geography, J satisfies Theorem 7. Now suppose we "slightly" weaken Theorem 7 by removing the prime-game requirement (in the Homomorphic Game Encoding condition), and call H satisfying the weakened version of Theorem 7 a weakly computationally-homomorphic family. Then, I P itself is a weakly computationally-homomorphic family, by Sprague-Grundy Theory and the fact that I P is closed under the disjunctive sum.
Indeed, if a ruleset in I P is PSPACE-complete and allows a simple way to express the sum of two positions as a single position, then the ruleset is a weakly computationallyhomomorphic family. One of the most basic examples of this is Node Kayles. Here, two positions can be trivially summed into a single game by simply taking the two graphs and making them a single (disconnected) graph. This is a very common property for combinatorial games to have. However, many impartial games with this property aren't known to be intractable. As an example, Cram is a game that is simply played by placing 2x1 dominoes in either horizontal or vertical orientation on unoccupied tiles of a 2-dimensional grid. Two Cram positions can be added together by surrounding each with a boundary of dominoes, then concatenating the two boards together. Unfortunately, it is not currently known whether Cram is intractable.
Related to the question we asked in Section 5.1, we are curious to know: Given a pair of Node Kayles positions G 1 and G 2 , can we construct, in polynomial time, a prime Node Kayles position satisfying nimber(G) = nimber(G 1 ) ⊕ nimber(G 2 )?

Beyond I P
More generally, Are there analog extensions of our results to polynomially-short partizan games? Is there a characterization of Sprague-Grundy completeness for I P ? Does the family of PSPACE-solvable impartial games have a natural Sprague-Grundycomplete ruleset? Does the family of all impartial games have a natural Sprague-Grundy-complete ruleset? What is the complexity of Graph Nim with an exponential number of stones?
For these last few questions, we may need to go beyond PSPACE as well as polynomiallyshort games to unlock the nimber secrets.