arXiv:2609.00871cs.FLSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.00871

Construction of a DFA for Computing Grundy Numbers in the Successful Derivation Games on Right-Linear Grammars

Yoshiaki Takata, Yusuke Inoue, Hiroyuki Seki

Yoshiaki Takata¹, Yusuke Inoue², and Hiroyuki Seki³

¹ School of Informatics, Kochi University of Technology takata.yoshiaki@kochi-tech.ac.jp

² Graduate School of Informatics, Nagoya University

³ School of Social Informatics, Mukogawa Women's University

Abstract. Inoue et al. have introduced the successful derivation game (SDG) on context-free grammars (CFGs), which is a generalization of classic heap-based games including subtraction games and Keyles, and shown that the least upper bound of the Grundy numbers in the SDG on a given CFG GG is undecidable in general even when we restrict GG to be a linear CFG. This paper shows that for the SDG on a right-linear grammar (RLG), we can construct a DFA for computing the Grundy number of a given position. In other words, for the SDG on an RLG, the set of positions with a given Grundy number cc is regular. As a corollary, the least upper bound of the Grundy numbers in the SDG on a given RLG is decidable. We also investigate the complexity of computing the least upper bound of the Grundy numbers in the SDG on a given RLG, and it is shown to be PSPACE-complete.

1 Introduction

Combinatorial games are “two-player games with no hidden information and no chance elements”[5] and the theory of combinatorial games concerns with the mathematical structure of those games. Among them, impartial, loop-free games under the normal-play convention are particularly well-studied, where impartial means that both players have the same legal moves, loop-free means that every play is finite, and normal play means that the player who makes the last move wins. Examples of such games include classical heap-based games played on heaps of stones, such as subtraction games including Nim. One of the important aspects in the study of combinatorial games is the notion of Grundy numbers [3,6]. A Grundy number is a nonnegative integer assigned to each position and indicates the position is winning or losing.

Inoue et al. [4] have introduced the successful derivation game (SDG) on context-free grammars (CFGs), which can be seen as a generalization of a subclass of heap-based games including subtraction games and Keyles. They have shown that the least upper bound of the Grundy numbers in the SDG on a given CFG GG is undecidable in general even when we restrict GG to be a linear

Yoshiaki Takata, Yusuke Inoue, and Hiroyuki Seki

CFG. This paper shows that for the SDG on a right-linear grammar (RLG), we can construct a DFA for computing the Grundy number of a given position. In other words, for the SDG on an RLG, the set of positions with a given Grundy number cc is regular. By utilizing the DFA for computing the Grundy number, we show that the least upper bound of the Grundy numbers in the SDG on a given RLG is decidable. We also investigate the complexity of computing the least upper bound of the Grundy numbers in the SDG on a given RLG, and it is shown to be PSPACE-complete.

The outline of this paper is as follows. In Section 2, we define the successful derivation game and related concepts. In Section 3, we give an algorithm to construct a DFA representing the set of positions with a given Grundy number. The correctness of the algorithm is shown in Section 4. In Section 5, we show the PSPACE-completeness of computing the least upper bound of the Grundy numbers in the SDG on a given RLG. In Section 6, we show two examples of SDGs on RLGs and examine the resultant DFAs. Finally, we conclude this paper in Section 7.