Artificial intelligent assistant

Probability of A wins the game Assume player $A$, $B$ throw a pair of fair dices in turn. Player $A$ is the winner if the sum of two dices is $5$ at the round he throw and player $B$ is the winner if the sum of the dices is $9$ at his turn. Once any one of the player achieve their number, the game end and he will become the winner. Suppose $A$ throw first, what's the probability $A$ will be the winner.

Player A may win at the first leg, which happens with probability p = P(sum of two dice is 5). Or, later on, but only if A's first leg and B's first leg are both unsuccessful, and then everything starts again.

Hence the probability w that A wins is w = p + (1-p)(1-q)w, where q = P(sum of two dice is 9). Solving for w yields w = p/(p+q-pq).

Thus, when p = q (as in the question), the first player wins with probability w = 1/(2-p) and the second player wins with probability 1 - w = (1-p)/(2-p) (in the question, p = q = 1/9 hence w = 9/17).

On the contrary, to get equal probabilities for both players, one should require that p = q(1-p), that is, p = 1/(n+1) and q = 1/n for some n > 1.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 04f3da0d53041012e9e8f956a0fff0c8