Ponder This Challenge - December 2025 - Sums of a prime and an even number
- Ponder This
This puzzle was suggested by Dan Dima, who based it on a puzzle presented by Stan Wagon who attributes it to Erich Friedman - thanks all!
We consider a solitary backgammon-like game. The game board consists of an infinite sequence of locations, marked by . At the beginning, there are 5 disks ("men") at location 0.
On every turn, two dice are rolled. For the sake of simplicity, we assume the dice only have two equally probable outcomes: 1 and 2.
If rolling two dice results in two different values, the player moves two men forward according to the numbers on the dice (the same man can be moved twice).
If the dice are the same, each die is used twice, so the player can move four men according to the number of the dice (the same man can be moved several times).
A situation where a man is alone at a location is called a blot. The goal of the player is to avoid blots; the game ends after a turn in which a blot was created.
A simple strategy to avoid blots is as follows: If the dice turn out different - too bad, a blot will be created. Otherwise - pick two men and move each of them twice. It can be shown that this strategy gives 1 as the expected number of dice rolls in the game, except for the last roll of the dice.
Your goal: Find the expected number of rolls when playing with an optimal strategy. Note that this can be given as a rational number, but you can also supply it as a decimal number with 6 digits of precision.
A Bonus "*" will be given for solving the puzzle, but instead of the case of dice that can only produce results of 1 or 2, do it for standard dice that produce values in the range of 1, 2, 3, 4, 5, 6 with uniform probability.
The numercial solutions are approximately
This riddle is a classical use case for using discrete time Markov chains to model a combinatorial game. Since there are 5 men and blots are not allowed, the possible states consist of either the 5 men together, or two groups of 2 and 3 at some distance. The locations on the board are irrelevant; only the distance between the groups matter, so if the distance can be bounded we have only a finite number of possible states, which makes the problem relatively easy to deal with using standard methods.
Denote by the state "the group of 2 men is ahead of the group of 3 men". For example, describes the situation "3..2", means all the 5 men are together, and "2.3" (dot being empty loation). A key observation is that if was reached for , the game reduces to the "simple strategy" of "different dice - lose; same dice - move two men"; we can only move the two men on the front, making the gap larger. Since this is not the optimal strategy, those states need not be reached at all.
In all the states with , i.e. states where the group of 3 is ahead of the group of 2, for all the dice results one must move the group of 2 (moving only men from the group of 3 results in a blot for every possible outcome), so the resulting state will have index larger than . It can be seen that is the minimal state that can be reached (from , if the two dice are 2 and we move one men 8 steps). An exhustive check of all possibilites show that the only relevant states are , meaning we can make do with a 13-state markov chain.
Write for the expected number of dice throws given we start at . Now it is possible to write recursive equations for the values. Consider the relatively complex case of , i.e. the state "3...2". In this case, the possible outcomes are:
Putting all these together, we have
Since we don't know yet the max value in each case, this means we can have four different strategies upon reaching . There are not many states where different options are possible, so the total number of possible stategies remain low. A systematic solutions solves the resulting set of linear equations for each possible strategy, determining be optimal one. It can be seen that .
The solution of the bonus, while similar, is much more complex. This did not prevent solvers from finding a rational solution. David F.H. Dunkley presented the solution