Winning the War by (Strategically) Losing Battles: Settling the Complexity of Grundy-Values in Undirected Geography

Kyle W. Burke, Matthew T. Ferland, Shang-Hua Teng

Abstract

This paper settles a decades-old mystery in combinatorial game theory by proving that computing the Grundy value (or nim-value) of the game Undirected Geography is PSPACE-complete. This reveals a fascinating paradox: while the game itself is easy to win (polynomial-time), determining exactly how much you are winning by—a necessity for playing multiple games at once—is computationally "hard."

Introduction

In combinatorial game theory, many games are played as a "disjunctive sum," where players choose one of several independent components to move in each turn. Sprague-Grundy Theory establishes that every impartial game (where moves depend only on position, not the player) is equivalent to a single pile in the game of Nim. This equivalence is captured by a single integer called the Grundy value.

While a game might be tractable (winning strategies found in polynomial time), calculating its Grundy value can be significantly more difficult. Since 1981, researchers have investigated whether the sum of two "easy" impartial games could be "hard." This research proves that for Undirected Geography, the transition from winning a single game to calculating the value for a sum of games represents a leap from P to PSPACE-complete.

Methodology

The authors employ a combination of graph theory and complexity reductions to establish their results.

Gadget-Based Reduction

To prove PSPACE-hardness, the authors reduce from Generalized Geography (played on directed graphs) to Undirected Geography. They design specific "direction-imposing" gadgets that force players to move across undirected edges as if they were directed, provided the Grundy values are calculated correctly.

Figure 1: A graph gadget used in the reduction to prove PSPACE-hardness of computing Grundy values in Undirected Geography.

Algorithmic Approaches

For graphs with a maximum degree of three, the authors demonstrate that the game tree can be navigated efficiently. They utilize a branch-and-bound process that leverages a polynomial-time matching algorithm. Additionally, they provide a novel constructive proof for building Undirected Geography instances that result in any arbitrary Grundy value $n$ using a graph of polynomial size.

Key Insights and Results

The research establishes a Geographical Dichotomy regarding the complexity of Undirected Geography based on graph degree:

  • Tractability at Degree 3: The Grundy value is computable in $O(n^3)$ time for graphs with maximum degree 3.
  • PSPACE-Completeness at Degree 4: Computing the Grundy value becomes PSPACE-complete for graphs with maximum degree $\ge 4$, even if the graphs are planar and bipartite.

This "Phase Transition" highlights a computational divergence. While Sprague-Grundy theory provides an elegant mathematical summary, that summary can be exponentially more expensive to compute than the win/loss status of the game itself. This leads to the concept of "Strategic Losing": in a sum of games, a player might intentionally lose a component game to win the overall sum, requiring exact knowledge of Grundy values.

Conclusion and Future Work

The paper proves that, unless P = PSPACE, there is no general polynomial-time method to summarize two tractable impartial games to solve their disjunctive sum. Future research directions include:

  • Grid Graphs: Determining if Undirected Geography remains PSPACE-hard on regular grids (square or hexagonal).
  • Fixed-Parameter Tractability: Investigating if Grundy values are tractable with respect to parameters like treewidth.
  • Partisan Games: Finding tractable partisan rulesets where the sum of instances is PSPACE-hard.

The authors have already applied these insights to develop new board games like Binary Undirected Geography and Uno Swap, bridging the gap between theoretical complexity and engaging gameplay.

Summary updated

BibTeX
@inproceedings{burke2021winning,
  author = {Kyle W. Burke and Matthew T. Ferland and Shang-Hua Teng},
  title = {{Winning the War by (Strategically) Losing Battles: Settling the Complexity of Grundy-Values in Undirected Geography}},
  booktitle = {FOCS},
  year = {2021},
  doi = {10.1109/focs52979.2021.00119},
}
Figure