-
Maximum Nim and Josephus Problem algorithm
Authors:
Shoei Takahashi,
Hikaru Manabe,
Ryohei Miyadera
Abstract:
In this study, we study a Josephus problem algorithm. Let $n,k$ be positive integers and $g_k(n) = \left\lfloor \frac{n}{k-1} \right\rfloor +1$, where $ \left\lfloor \ \ \right\rfloor$ is a floor function. Suppose that there exists $p$ such that $g_{k}^{p-1}(0) < n(k-1) \leq g_{k}^{p}(0)$, where $g_{k}^p$ is the $p$-th functional power of $g_k$. Then, the last number that remains is…
▽ More
In this study, we study a Josephus problem algorithm. Let $n,k$ be positive integers and $g_k(n) = \left\lfloor \frac{n}{k-1} \right\rfloor +1$, where $ \left\lfloor \ \ \right\rfloor$ is a floor function. Suppose that there exists $p$ such that $g_{k}^{p-1}(0) < n(k-1) \leq g_{k}^{p}(0)$, where $g_{k}^p$ is the $p$-th functional power of $g_k$. Then, the last number that remains is $nk-h2_{k}^{p}(0)$ in the Josephus problem of $n$ numbers, where every $k$-th numbers are removed. This algorithm is based on Maximum Nim with the rule function $f_k(n)=\left\lfloor \frac{n}{k} \right\rfloor$. Using the present article's result, we can build a new algorithm for Josephus problem.
△ Less
Submitted 9 April, 2024;
originally announced April 2024.
-
Maximum Nim and Josephus Problem
Authors:
Shoei Takahashi,
Hikaru Manabe,
Ryohei Miyadera
Abstract:
In this study, we study the relation between Grundy numbers of a Maximum Nim and Josephus problem. Let f(x) = floor(x/k), where floor( ) is the floor function and k is a positive integer. We prove that there is a simple relation with a Maximum Nim with the rule function f and the Josephus problem in which every k-th numbers are to be removed.
In this study, we study the relation between Grundy numbers of a Maximum Nim and Josephus problem. Let f(x) = floor(x/k), where floor( ) is the floor function and k is a positive integer. We prove that there is a simple relation with a Maximum Nim with the rule function f and the Josephus problem in which every k-th numbers are to be removed.
△ Less
Submitted 28 March, 2024;
originally announced March 2024.
-
Josephus Nim
Authors:
Shoei Takahashi,
Hikaru Manabe,
Aoi Murakami,
Ryohei Miyadera
Abstract:
Here, we present a variant of Nim with two piles. In the first pile, we have stones with a weight of 1, and in the second pile, we have stones with a weight of -2. Two Players take turns to take stones from one of the piles, and the total weight of stones to be removed should be equal to or less than half of the total weight of the stones in the pile. The player who removed the last stone or stone…
▽ More
Here, we present a variant of Nim with two piles. In the first pile, we have stones with a weight of 1, and in the second pile, we have stones with a weight of -2. Two Players take turns to take stones from one of the piles, and the total weight of stones to be removed should be equal to or less than half of the total weight of the stones in the pile. The player who removed the last stone or stones is the winner of the game. The authors discovered that when (n,m) is a previous player's winning position, 2m+1 is the last remaining number of the Josephus problem, where there are n -numbers, and every second number is to be removed. There are similar relations between the position of which the Grundy number is s and the (n-s)-th removed number.
△ Less
Submitted 4 December, 2023;
originally announced December 2023.
-
Games of Nim with Dynamic Restrictions
Authors:
Keita Mizugaki,
Shoei Takahashi,
Hikaru Manabe,
Aoi Murakami,
Ryohei Miyadera
Abstract:
The authors present formulas for the previous player's winning positions of two variants of restricted Nim.
In both of these two games, there is one pile of stones, and in the first variant, we investigate the case that in k-th turn, you can remove f(k) stones at most, where f is a function whose values are natural numbers. In the second variant, there are two kinds of stones. The Type 1 group c…
▽ More
The authors present formulas for the previous player's winning positions of two variants of restricted Nim.
In both of these two games, there is one pile of stones, and in the first variant, we investigate the case that in k-th turn, you can remove f(k) stones at most, where f is a function whose values are natural numbers. In the second variant, there are two kinds of stones. The Type 1 group consists of stones with the weight of one, and the Type 2 group consists of stones with the weight of two. When the total weight of stones is a, you can remove stones whose total weight is equal to or less than half of a.
△ Less
Submitted 30 November, 2023;
originally announced November 2023.
-
Impartial and Partizan Restricted Chocolate Bar Games
Authors:
Ryohei Miyadera,
Shoei Takahashi. Aoi Murakami,
Akito Tsujii,
Hikaru Manabe
Abstract:
In this paper, we consider impartial and partizan restricted chocolate bar games. In impartial restricted chocolate bar games, players cut a chocolate bar into two pieces along any horizontal or vertical line and eat whichever piece is smaller. If the two pieces are the same size, a player can eat either one. In constrast, partizan restricted chocolate bar games include players designated as Left…
▽ More
In this paper, we consider impartial and partizan restricted chocolate bar games. In impartial restricted chocolate bar games, players cut a chocolate bar into two pieces along any horizontal or vertical line and eat whichever piece is smaller. If the two pieces are the same size, a player can eat either one. In constrast, partizan restricted chocolate bar games include players designated as Left and Right and chocolate bars with black and white stripes. Left cuts the chocolate bar in two as above and eats the part with fewer black blocks. Similarly, Right cuts the bar and eats the part with fewer white blocks. A player loses when they cannot eat the remaining chocolate bar. We provide formulas that describe the winning positions of the previous player, Right, and Left players. We also present an interesting similarity in the graphs of previous players' winning positions for impartial and partizan chocolate bar games.
△ Less
Submitted 13 August, 2023;
originally announced August 2023.
-
Curious Properties of Iterative Sequences
Authors:
Shoei Takahashi,
Unchone Lee,
Hikaru Manabe,
Aoi Murakami,
Daisuke Minematsu,
Kou Omori,
Ryohei Miyadera
Abstract:
In this study, several interesting iterative sequences were investigated. First, we define the iterative sequences. We fix function f(n). An iterative sequence starts with a natural number n, and calculates the sequence f(n),f(f(n)), ...f(f(f(f(n)))),... We then search for interesting features in this sequence. We study Kaprekar's routine, the digit factorial process, and the digit power process.…
▽ More
In this study, several interesting iterative sequences were investigated. First, we define the iterative sequences. We fix function f(n). An iterative sequence starts with a natural number n, and calculates the sequence f(n),f(f(n)), ...f(f(f(f(n)))),... We then search for interesting features in this sequence. We study Kaprekar's routine, the digit factorial process, and the digit power process. The authors presented new variants of Kaprekar's routine.
△ Less
Submitted 13 August, 2023;
originally announced August 2023.
-
Multi-Dimensional Chocolate and Nim with a Pass
Authors:
Ryohei Miyadera,
Hikaru Manabe
Abstract:
Chocolate-bar games are variants of the CHOMP game. A three-dimensional chocolate bar comprises a set of cubic boxes sized 1 X 1 X 1, with a bitter cubic box at the bottom of the column at position (0,0). For non-negative integers u,w such that u < x and w \< z, the height of the column at position (u,w) is min (F(u,w),y) +1, where F is a monotonically increasing function. We denote this chocolate…
▽ More
Chocolate-bar games are variants of the CHOMP game. A three-dimensional chocolate bar comprises a set of cubic boxes sized 1 X 1 X 1, with a bitter cubic box at the bottom of the column at position (0,0). For non-negative integers u,w such that u < x and w \< z, the height of the column at position (u,w) is min (F(u,w),y) +1, where F is a monotonically increasing function. We denote this chocolate bar as CB(F,x,y,z). Each player, in turn, cuts the bar on a plane that is horizontal or vertical along the grooves, and eats the broken piece. The player who manages to leave the opponent with the single bitter cubic box is the winner. In this study, functions F such that the Sprague--Grundy value of CB(F,x,y,z) is x xor y xor z are characterized. We have already published the research on three-dimensional chocolate games. In this paper, the authors study a multi-dimensional chocolate game, where the dimension is more than three, and apply the theory to the problem of pass move in Nim. We modify the standard rules of the game to allow a one-time pass, that is, a pass move that may be used at most once in the game and not from a terminal position. Once a pass has been used by either player, it is no longer available. It is well-known that in classical Nim, the introduction of the pass alters the underlying structure of the game, significantly increasing its complexity. A multi-dimensional chocolate game can show a perspective on the complexity of the game of Nim with a pass. Therefore, the authors address a longstanding open question in combinatorial game theory. The authors present this paper, since their discovery seems to be significant. It appears to the authors that the relation between chocolate games and Nim with a pass will be an essential research topic soon.
△ Less
Submitted 19 July, 2022;
originally announced July 2022.
-
Previous Player's Positions of Impartial Three-Dimensional Chocolate-Bar Games
Authors:
Ryohei Miyadera,
Hikaru Manabe,
Shunsuke Nakamura
Abstract:
In this study, we investigate three-dimensional chocolate bar games, which are variants of the game of Chomp. A three-dimensional chocolate bar is a three-dimensional array of cubes in which a bitter cubic box is present in some part of the bar. Two players take turns and cut the bar horizontally or vertically along the grooves. The player who manages to leave the opponent with a single bitter blo…
▽ More
In this study, we investigate three-dimensional chocolate bar games, which are variants of the game of Chomp. A three-dimensional chocolate bar is a three-dimensional array of cubes in which a bitter cubic box is present in some part of the bar. Two players take turns and cut the bar horizontally or vertically along the grooves. The player who manages to leave the opponent with a single bitter block is the winner. We consider the P-positions of this game, where the P-positions are positions of the game from which the previous player (the player who will play after the next player) can force a win, as long as they play correctly at every stage. We present sufficient conditions for the case when the position {p,q,r} is a P-position if and only if the bitxor of p-1, q-1, r-1, where p, q and r are the length, height, and width of the chocolate bar, respectively.
△ Less
Submitted 24 May, 2022;
originally announced May 2022.
-
Restricted Nim with a Pass
Authors:
Ryohei Miyadera,
Hikaru Manabe
Abstract:
This paper presents a study of restricted Nim with a pass. In the restricted Nim considered in this study, two players take turns and remove stones from the piles. In each turn, when the number of stones is m, each player is allowed to remove at least one stone and at most the ceiling of m/2 stones from a pile of m stones. The standard rules of the game are modified to allow a one-time pass, that…
▽ More
This paper presents a study of restricted Nim with a pass. In the restricted Nim considered in this study, two players take turns and remove stones from the piles. In each turn, when the number of stones is m, each player is allowed to remove at least one stone and at most the ceiling of m/2 stones from a pile of m stones. The standard rules of the game are modified to allow a one-time pass, that is, a pass move that may be used at most once in the game and not from a terminal position. Once a pass has been used by either player, it is no longer available. It is well-known that in classical Nim, the introduction of the pass alters the underlying structure of the game, significantly increasing its complexity. In the restricted Nim considered in this study, the pass move was found to have a minimal impact. There is a simple relationship between the Grundy numbers of restricted Nim and the Grundy numbers of restricted Nim with a pass, where the number of piles can be any natural number. Therefore, the authors address a longstanding open question in combinatorial game theory: the extent to which the introduction of a pass into a game affects its behavior. The game that we developed appears to be the first variant of Nim that is fully solvable when a pass is not allowed and remains fully solvable following the introduction of a pass move.
△ Less
Submitted 24 May, 2022;
originally announced May 2022.
-
Grundy Numbers of Impartial Chocolate Bar Games
Authors:
Ryohei Miyadera,
Shunsuke Nakamura,
Yushi Nakaya
Abstract:
Chocolate bar games are variants of the CHOMP game in which the goal is to leave your opponent with the single bitter part of the chocolate. In this paper, we investigate step chocolate bars whose widths are determined by a fixed function of the horizontal distance from the bitter square. When the width of chocolate bar is proportional to the distance from the bitter square and the constant of pro…
▽ More
Chocolate bar games are variants of the CHOMP game in which the goal is to leave your opponent with the single bitter part of the chocolate. In this paper, we investigate step chocolate bars whose widths are determined by a fixed function of the horizontal distance from the bitter square. When the width of chocolate bar is proportional to the distance from the bitter square and the constant of proportionality is even, the authors have already proved that the Grundy number of this chocolate bar is $(m-1) \oplus (n-1)$, where $m$ is is the largest width of the chocolate and $n$ is the longest horizontal distance from the bitter part. This result was published in a mathematics journal(Integers,15, 2015). On the other hand, if the constant of proportionality is odd, the Grundy number of this chocolate bar is not $(m-1) \oplus (n-1)$. Therefore, it is natural to look for a necessary and sufficient condition for chocolate bars to have the Grundy number that is equal to $(m-1) \oplus (n-1)$, where $m$ is the largest width of the chocolate and $n$ is the longest horizontal distance from the bitter part.
In the first part of the present paper, the authors present this necessary and sufficient condition. Next, we modified the condition that the Grundy number that is equal to $(m-1) \oplus (n-1)$, and we studied a necessary and sufficient condition for chocolate bars to have Grundy number that is equal to $((m-1) \oplus (n-1+s))-s$, where $m$ is is the largest width of the chocolate and $n$ is the longest horizontal distance from the bitter part. We present this necessary and sufficient condition in the second part of this paper.
△ Less
Submitted 14 November, 2017;
originally announced November 2017.
-
Wythoff's Game with a Pass
Authors:
Ryohei Miyadera
Abstract:
The author introduces the Wythoff game with a pass, a variant of the classical Wythoff game. The latter game is played with two piles of stones, and two players take turns removing stones from one or both piles; when removing stones from both piles, the numbers of stones removed from each pile must be equal. The player who removes the last stone or stones is the winner. An equivalent description o…
▽ More
The author introduces the Wythoff game with a pass, a variant of the classical Wythoff game. The latter game is played with two piles of stones, and two players take turns removing stones from one or both piles; when removing stones from both piles, the numbers of stones removed from each pile must be equal. The player who removes the last stone or stones is the winner. An equivalent description of the game is that a single chess queen is placed somewhere on a large grid of squares, and each player can move the queen towards the upper left corner of the grid: leftward, upward, or to the upper left, any number of steps. The winner is the player who moves the queen into the upper left corner. In Wythoff's game with a pass, we modify the standard rules of the game so as to allow for a one-time pass, i.e., a pass move which may be used at most once in a game, and not from a terminal position. Once the pass has been used by either player, it is no longer available. The author discovered that, when a pass move is available, the set of $\mathcal{P}$-positions (previsous player's position) of the Wythoff's game with a pass is equal to $ T_0 \cup T_1\cup B -A$, where $T_0 = \{(x,y): \mathcal{G}(x,y)=0 \}$, $T_0 = \{(x,y): \mathcal{G}(x,y)=1 \}$, $B$ is a finite subset of $\{(x,y): \mathcal{G}(x,y)=4 \}$, $A$ is a finite subset of $T_0$ and $\mathcal{G}$ is the Grundy number of the classical Wythoff game. Here the size of $B$ is $6$, and the size of $A$ is $7$. According to the research of U.Blass and A.S.Fraenkel, for a position $(x,y) \in T_1 $ there is always a position $(x^{\prime},y^{\prime}) \in T_0$ such that $\mid x- x^{\prime} \mid \leq 2$ and $\mid y - y^{\prime} \mid \leq 4$, and hence the graph of the set of $\mathcal{P}$-positions of the Wythoff's game with a pass is very similar to the graph of the set of $\mathcal{P}$-positions of the classical Wythoff's game.
△ Less
Submitted 14 November, 2017;
originally announced November 2017.
-
Impartial Triangular Chocolate Bar Games
Authors:
Ryohei Miyadera,
Shunsuke Nakamura,
Masanori Fukui
Abstract:
Chocolate bar games are variants of the game of Nim in which the goal is to leave your opponent with the single bitter part of the chocolate bar. The rectangular chocolate bar game is a thinly disguised form of classical multi-heap Nim. In this work, we investigate the mathematical structure of triangular chocolate bar games in which the triangular chocolate bar can be cut in three directions. In…
▽ More
Chocolate bar games are variants of the game of Nim in which the goal is to leave your opponent with the single bitter part of the chocolate bar. The rectangular chocolate bar game is a thinly disguised form of classical multi-heap Nim. In this work, we investigate the mathematical structure of triangular chocolate bar games in which the triangular chocolate bar can be cut in three directions. In the triangular chocolate bar game, a position is a $\mathcal{P}$-position if and only if $x \oplus y \oplus z = 0$, where the numbers $x,y,z$ stand for the maximum number of times that the chocolate bar can be cut in each direction. Moreover, the Grundy number of a position $(x,y,z)$ is not always equal to $x \oplus y \oplus z $, and a generic formula for Grundy numbers in not known. Therefore, the mathematical structure of triangular chocolate bar game is different from that of classical Nim.
△ Less
Submitted 14 November, 2017;
originally announced November 2017.
-
Ryuo Nim: A Variant of the classical game of Wythoff Nim
Authors:
Ryohei Miyadera,
Yuki Tokuni,
Yushi Nakaya,
Masanori Fukui,
Tomoaki Abuku,
Koki Suetsugu
Abstract:
The authors introduce the impartial game of the generalized Ryūō Nim, a variant of the classical game of Wythoff Nim. In the latter game, two players take turns in moving a single queen on a large chessboard, attempting to be the first to put her in the upper left corner, position $(0,0)$. Instead of the queen used in Wythoff Nim, we use the generalized Ryūō for a given natural number $p$. The gen…
▽ More
The authors introduce the impartial game of the generalized Ryūō Nim, a variant of the classical game of Wythoff Nim. In the latter game, two players take turns in moving a single queen on a large chessboard, attempting to be the first to put her in the upper left corner, position $(0,0)$. Instead of the queen used in Wythoff Nim, we use the generalized Ryūō for a given natural number $p$. The generalized Ryūō for $p$ can be moved horizontally and vertically, as far as one wants. It also can be moved diagonally from $(x,y)$ to $(x-s,y-t)$, where $s,t$ are non-negative integers such that $1 \leq s \leq x, 1 \leq t \leq y \textit{and} s+t \leq p-1$. When $p$ is $3$, the generalized Ryūō for $p$ is a Ryūō, i.e., a promoted hisha piece of Japanese chess. A Ryūō combines the power of the rook and the king in Western chess. The generalized Ryūō Nim for $p$ is mathematically the same as the Nim with two piles of counters in which a player may take any number from either heap, and a player may also simultaneously remove $s$ counters from either of the piles and $t$ counters from the other, where $s+t \leq p-1$ and $p$ is a given natural number. The Grundy number of the generalized Ryūō Nim for $p$ is given by $\bmod(x+y,p) + p(\lfloor \frac{x}{p} \rfloor \oplus \lfloor \frac{y}{p}\rfloor)$. The authors also study the generalized Ryūō Nim for $p$ with a pass move. The generalized Ryūō Nim for $p$ without a pass move has simple formulas for Grundy numbers. This is not the case after the introduction of a pass move, but it still has simple formulas for the previous player's positions. We also study the Ryūō Nim that restricted the diagonal and side movement. Moreover, we extended the Ryūō Nim dimension to the $n$-dimension.
△ Less
Submitted 4 November, 2017;
originally announced November 2017.