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 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.
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to explore a new variant of the Nim game named "Josephus Nim" and reveal its relationship with the classic Josephus problem. Specifically, the author studied a special Nim game in which two stone piles contain stones with weights of 1 and - 2 respectively. Players take turns removing stones from either pile, and the total weight removed each time cannot exceed half of the current pile's total weight. The goal of the game is that the player who removes the last stone or stones wins.
### Main research content:
1. **Definition of game rules**:
- The game has two stone piles. Each stone in the first pile has a weight of 1, and each stone in the second pile has a weight of - 2.
- Players take turns removing stones from either pile, but the total weight removed each time must not exceed half of the current pile's total weight.
- The player who removes the last stone wins.
2. **The relationship between Grundy numbers and the Josephus problem**:
- The author found that when a position \((n, m)\) is a winning position for the previous player, \(2m + 1\) is exactly the last remaining number in the Josephus problem, where initially there are \(n\) numbers and every other number is removed.
- Further, the author also discovered a simple relationship between Grundy numbers and the removal order in the Josephus problem.
### Mathematical formula representation:
- **Grundy numbers**: For a position \((x, y)\), its Grundy number \(G(p)\) is defined as:
\[
G(p)=\text{mex}(\{G(h):h\in\text{move}(p)\})
\]
where \(\text{mex}(S)\) represents the smallest non - negative integer that does not appear in the set \(S\).
- **Josephus problem formula**:
- For any \(v\), let \(F_s(v)\) represent the \(s\)-th removed number in the Josephus problem, then there is a recursive relationship:
\[
F_s(2v)=2F_s(v)- 1
\]
\[
F_s(2v + 1)=2F_s(v)+1
\]
### Conclusion:
Through the above research, the author revealed the profound connection between this new Nim game and the classic Josephus problem, especially the correspondence between Grundy numbers and the removal order in the Josephus problem. This discovery not only enriches the research content of combinatorial game theory but also provides a new perspective for understanding these two seemingly unrelated problems.
### References:
- Levine, L. (2006). Fractal sequences and restricted Nim, *Ars Combinatoria* 80, 113–127.
- Miyadera, R., Kannan, S., & Manabe, H. (Accepted). Maximum Nim and Chocolate Bar Games, *Thai Journal of Mathematics*.
- Miyadera, R., & Manabe, H. (2023). Restricted Nim with a Pass, *Integers*, Vol. 23, #G3.
- Graham, R. L., Knuth, D. E., & Patashnik, O. (1989). *Concrete Mathematics: A Foundation for Computer Science*. Addison Wesley.
Hope this information can help you better understand the main research content and significance of this paper. If you have more questions, feel free to continue asking!