The number $2022$ is written on the white board. Ivan and Peter play a game, Ivan starts and they alternate. On a move, Ivan erases the number $b$, written on the board, throws a dice which shows some number $a$, and writes the residue of $(a+b) ^2$ modulo $5$. Similarly, Peter throws a dice which shows some number $a$, and changes the previously written number $b$ to the residue of $a+b$ modulo $3$. The first player to write a $0$ wins. What is the probability of Ivan winning the game?
Problem
Source: Bulgarian Autumn Tournament 2022 11.4
Tags: combinatorics
11.04.2023 15:36
Let us look at what could be on the board after the first turn: if the dice rolls 3 the game ends, if the dice rolls 1, 5 or 6 Ivan writes a 4, if it rolls a 2 or a 4 he writes a 1. But from the point of view of Peter the result matters only mod 3. So it has a 1/6 probably to win and a 5/6 probably to leave a number, that is 1 mod 4. Now looking at peters turn we conclude that there is a 1/3 probably he wins 1/3 he leaves a 1 and 1/3 he leaves a 2. But looking in the case that he leaves 1 Ivan once again has a 1/6 chance to win and 5/6 chance to leave a number that is 1 mod 3. To conclude the game goes as follows: Ivan has a 1/6 to win then Petar has a 1/3 to win and then they repeat. So the probability of Ivan winning would be an infinite sum of the probabilities of him getting to each turn multiplied by the probability to win when it's his turn. The probability of the game going on from one turn of Ivan to his next is the probability of ivan not winning, multiplied by the probability of Petar not winning, which is (5/6)*(2/3) = 5/9. This means that the probability of Ivan winning is: P = (1/6)*(1+5/9+(5/9)^2+(5/9)^3+ ... +(5/9)^(infinity)) We can substitute P = (1/6)*x Where for x we know: x = 1 + x*5/9 so x=9/4 So the probability for Ivan to win is (1/6)*(9/4) = 3/8.