AUTHOR=Yang Zongbao , He  Zhimin , Li  Lvzhou , Dong  Shoubin , Zheng  Shenggeng TITLE=A linear algorithm for the restricted subtraction games JOURNAL=Frontiers in Physics VOLUME=10 YEAR=2022 URL=https://www.frontiersin.org/journals/physics/articles/10.3389/fphy.2022.1049019 DOI=10.3389/fphy.2022.1049019 ISSN=2296-424X ABSTRACT=

The subtraction game is a well-known problem in the field of game theory, which is often called a one-heap Nim game. There are two players, a heap of tokens, and a strategy matrix, in this game. It is called a restricted subtraction game if some constraints are imposed on the strategy matrix. The subtraction game could be solved by a classical algorithm with a query complexity no less than O(N2) and computed by an O(N32logN) quantum query algorithm with an error probability ϵ1N. The restricted subtraction game proposed by Huang et al. can be computed by an exact quantum algorithm with O(N32) queries. They also proved that the classical exact query complexity is Θ(N2). In this study, we use an array and an adjacency list to replace the strategy matrix and propose another more general subtraction game than the one introduced by Huang et al. Based on dynamic programming and the replaced game strategy, two linear classical query algorithms are designed to solve the restricted subtraction game proposed by Huang and this study, respectively.