Skip to content
Open access

Impartial Games on Graphs: Solving Kayles via Dynamic Programming and Periodicity Properties

Jul 2026 · Journal of the Brazilian Computer Society · Vol 32, pp. 1951-1960 · 0 citations · 16 references
Computer Science

TL;DR

This work considers combinatorial games in which two players alternately choose vertices from a finite graph until a winning condition is achieved, and focuses on the well-known game Kayles, in which the selected vertices must form an independent set and the player who makes the last valid move wins.

Abstract

In this work, we consider combinatorial games in which two players alternately choose vertices from a finite graph until a winning condition is achieved. Specifically, we focus our investigation on the well-known game Kayles, in which the selected vertices must form an independent set, and the player who makes the last valid move wins (i.e., the player who chooses a vertex that completes a maximal independent set). Zermelo's Theorem guarantees that, in this scenario, one of the players has a winning strategy---that is, a sequence of moves that ensures a win regardless of the opponent's choices. Given a graph, the typical decision problem associated with this type of game consists of determining which player has a winning strategy. Answering this question means solving the game. We first consider Kayles played on caterpillars. Since caterpillars are interval graphs, an O(n3)-time algorithm for solving Kayles on this graph class is already known [Bodlaender and Kratsch, 2002]. However, we investigate scenarios in which this time complexity can be reduced to O(1) by extending the periodicity property presented in [Guignard and Sopena, 2009] to caterpillars. We prove that the nimber of any caterpillar is equal to the nimber of an equivalent reduced caterpillar, obtained by appropriately removing certain leaves from the original graph. By partitioning these reduced caterpillars into classes, we show that a period of 34 emerges in each investigated class, allowing the computation of nimbers to scale to graphs with a large number of vertices. We present a sufficient condition for a class of caterpillars to exhibit periodicity 34, using it to identify many periodic classes and to calculate the nimber of their caterpillars in O(1) time. Furthermore, we present an O(n2)-time dynamic programming algorithm for solving Kayles on powers of paths, improving upon the O(n4)-time complexity given in [Bodlaender and Kratsch, 2002]for graphs with an asteroidal number of at most 2. Finally, we show how this same O(n2)-time algorithm can be adapted to solve Kayles on powers of cycles, thereby reducing the O(n3)-time complexity previously established in [Bodlaender and Kratsch, 2002] for circular-arc graphs.

Read PDF

Similar papers

Preprint Aug 2026

Greedy approaches for Gold Grabbing on subclasses of split graphs

It is proved that for complete split graphs $CS_{(2,n)}$, the greedy strategy yields a sequence of moves that maximizes the game value, contributing to a better understanding of the structural conditions that ensure the optimality of simple strategies in graph-based combinatorial games.

Heitor Melo de Lucas Brandão, Hebert Coelho da Silva, J. Nascimento · 0 citations
Preprint Aug 2026

Bidding Games with Rewards: Taming Infinite Configuration Space

Bidding games are graph games in which a token is placed on a vertex, each player starts with an initial budget, and a simultaneous auction determines which player moves the token; the players'budgets are then updated accordingly. Motivated by scenarios such as resource-allocation systems in which agents receive period...

Matan Pinkas · 0 citations
Open access Sep 2026

A Knights and Knaves Game on Paths

We study a nonzero-sum game in which two players label the N vertices of a path as being either Knights (i.e., truth-tellers) or Knaves (i.e., liars). Each vertex utters the sentence “An even number of my neighbors are Knights” and can be consistent (the truth value of its sentence agrees with its type) or inconsistent...

Alexios Karalekas, Athanasios Kehagias · 0 citations
Preprint Aug 2026

Chooser-Picker Degree Games for Regular Graphs

In the unbiased Chooser-Picker (also known as Client-Waiter) game played on the edge set of a graph, Picker offers a pair of unclaimed edges in each turn, Chooser claims one, and the remaining edge goes back to Picker. We study the Chooser-Picker (C-P) degree game played on $d$-regular graphs, where Chooser aims to max...

Lajos Gyõrffy · 1 citation
Jul 2026

Multi-Player Discrete-Bidding Games; Determinacy, Equilibria, and Complexity

Games on graphs constitute a fundamental model. Applications include reactive synthesis, which reduces to solving a zero-sum two-player game, and reasoning about multi-agent systems by modeling them as a multi-player game. We study a class of graph games called bidding games in which the players are allocated a budget,...

Guy Avni, Fatima Murra · 0 citations
Preprint Aug 2026

A Finite Automaton Approach to Combinatorial Games

This study applies finite automata to the automatic solving of a variety of combinatorial games. For games whose positions and moves can be represented as regular languages and their operations, we design a two-stage automatic solving algorithm: first, construct a candidate finite automaton to determine the $\mathcal{P...

Kai Liang · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.