1

Question: Two people roll a die with n faces in an alternative manner. The game is over when a face shows that is exactly one point lower than the previous roll, and that person loses the game. What is the probability of the first person losing the game?

My attempt: Let P be the probability. If the first roll is $1$ (with probability $\frac{1}{n}$), the conditional probability that the first person loses will be $1-P$ (the probability the second player loses). After that I have no idea how to proceed with the other possible first rolls.

Barry Cipra
  • 79,832
Rishi
  • 833
  • Did you try considering games of fixed length (i.e. games finished at step $k$) and adding probabilities? – Tal-Botvinnik Apr 18 '18 at 13:31
  • When you say "point lower: do you mean "one point lower" or "any lower point? If the first person rolls $6$ and the second player rolls $4$ is the game over? – saulspatz Apr 18 '18 at 13:32
  • @saulspatz exactly one point lower. so if first person rolls 6, then second players rolls 5, the game is over – Rishi Apr 18 '18 at 13:32
  • @Rishi But not if the second player rolls a 4, right? Then the game continues? – Arthur Apr 18 '18 at 13:39
  • @Arthur yes that's right – Rishi Apr 18 '18 at 13:42
  • Have you tried to solve this problem exactly for $n=2$ or $3$? It seems reasonably doable, and you might pick up a generalizable pattern. – Arthur Apr 18 '18 at 13:44
  • It may depend on the points marked on sides. For example, if all numbers are even, or all are equal, the game never ends, so the probability of losing by either player is zero. – CiaPan Apr 18 '18 at 15:26

3 Answers3

1

I will do the $n=3$ case first. Let $P1, P2, P3$ be the probability that the next player wins on receiving the indicated roll. The first player's winning probability is $P1$ as he is in the equivalent state. We have $$P1=\frac 13\left((1-P1)+(1-P2)+(1-P3)\right)=1-\frac 13(P1+P2+P3)\\ P2=\frac 13((1-P2)+(1-P3))\\P3=\frac 13((1-P1)+(1-P3))$$ Alpha gives $$P1=\frac {34}{61},P2=\frac {25}{61},P3=\frac {22}{61}$$ We see $P2 \gt P3$, which is not surprising. If I receive a $2$, I won't pass back a $1$ so my opponent will not be in the best place. For larger $n$ you have to consider each face separately to be really right but I suspect you won't be far wrong to just consider $P,Q$, where $Q$ is the chance somebody who doesn't receive a $1$ will win and ignores the differences between the higher numbers. This gives $$P=1-\frac 1n(P+(n-1)Q)\\Q=\frac 1n(1-P)+\frac {n-2}n(1-Q)$$ Which Alpha solves to give $$P=\frac {n+1}{2n+1},Q=\frac{n^2-n-1}{(n-1)(2n+1)}$$

Ross Millikan
  • 374,822
  • I found a mistake in my sympy code. The correct solution for $n=6$ shows that the probability of losing increases with the number you are passed. I compute the probability that the first player loses as $0.46296$ while $6/13\approx 0.46154.$ – saulspatz Apr 18 '18 at 16:10
  • @saulspatz: they look about like what I would expect now. It was a fun problem. – Ross Millikan Apr 18 '18 at 16:53
0

Your general idea is right, but you need to consider all the possible rolls separately. Let $p_n$ be the probability that the player who is about to roll loses, if his opponent has just rolled $n$, for $n=1,...6$. Then, $$ p_1 = \sum_{k=1}^{6}{\frac{1-p_k}{6}}\\ p_n= \frac{1}{6}+ \sum_{k\ne n-1}{\frac{1-p_k}{6}},\space n=2,\dots,6 $$ That is, he loses if he rolls $n-1,$ and if he rolls $k\ne n-1,$ he loses if his opponent wins. This gives you a system of linear equations to solve for $p_n.$ Once you have solved it, the probability that the first player loses is $p_1$ because that is the position he is in at the beginning of the game. (I had this wrong before, but I have learned from Ross Millikan's answer.) I also see that I made a mistake when I converted my equations to sympy code.

EDIT I think I have my sympy code correct now, and here are the answers I get $$ p_1=46656/100777\\ p_2=54432/100777\\ p_3=55728/100777\\ p_4=55944/100777\\ p_5=55980/100777\\ p_6=55986/100777 $$

saulspatz
  • 53,131
  • Sorry for all the edits. After you answered my question, I solved the problem as if you had answered just the opposite, and I've been repairing the damage. – saulspatz Apr 18 '18 at 14:00
  • I don't think you should have the $\frac 16$ out front in the $p_n$ calculation because there is no winning roll. – Ross Millikan Apr 18 '18 at 14:51
  • @RossMillikan If $n>1$ the player wins if he rolls $n-1$. Maybe I didn't make myself clear. This formula doesn't apply at the very first roll. $p_n$ is the probability that the roller wins, at some time in the play, if his opponent just rolled $n$. – saulspatz Apr 18 '18 at 14:55
  • The person who rolls one less loses, not wins. – Ross Millikan Apr 18 '18 at 15:01
  • You're right! I've been working the problem backwards. – saulspatz Apr 18 '18 at 15:03
  • @RossMillikan Does it look right now? Thanks for pointing out my mistake. Someday I've got to learn to read. – saulspatz Apr 18 '18 at 15:13
  • It agrees with my calculation for $p_1$ assuming the $p_n$ are equal for $n\neq 1$. I don't think that is really right as I explain. I think $p_2$ should be greater than all the rest by a little bit because $p_1$ is greater than any (you can't lose immediately) and $p_1$ is not subtracted from the $p_2$ calculation. I got $\frac {36}{65}$ for the other $p_n$ in the six sided die case. – Ross Millikan Apr 18 '18 at 15:21
  • This answer seems to assume the players are rolling a $6$-sided die. But the OP is asking, more generally, about an $n$-sided die (in which case you can't also use $n$ to denote the result of a roll). – Barry Cipra Apr 18 '18 at 17:18
  • @BarryCipra This is for a six-sided die, you're correct. I really read the OP's carelessly. Just looking at the answers for $n=6$ though, I suspect the answer for general $n$ will be ugly. I would guess that we'd have have to be satisfied with an approximation. Not sure how to approach it. – saulspatz Apr 18 '18 at 18:09
0

This answer follows the same basic outline as the others given so far: separate the case that a player is passed a one from the other cases. Let $p=\Pr(\text{lose}\mid\text{previous roll was one})$ and $q=\Pr(\text{lose}\mid\text{previous roll wasn’t one})$. The probability that the first player loses is then $$\frac1n(1-p)+{n-1\over n}(1-q).$$

The players’ roles are reversed with each roll and there’s no way to lose on your roll if you were passed a one, so $$p = \frac1n(1-p)+\frac{n-1}n(1-q),$$ i.e., the same as that of the first player losing.

The recurrence for $q$ is a wee bit trickier. Regardless of which of the other $n-1$ possible other rolls you’ve been passed, there’s only one roll that will lose immediately. Otherwise, only $n-2$ of the possible numbers that you might have received allow you to pass a one to your opponent, therefore $$q = \frac1n + {n-2\over n(n-1)}(1-p) + \left(1-\frac1n-{n-2\over n(n-1)}\right)(1-q).$$ Solving this system for $p$ produces $$p = {n(n^2-2n+2)\over2n^3-3n^2+2n+1}.$$ For $n=6$, $p=156/337 \approx 0.4629$, which agrees pretty well with the other answers. As $n\to\infty$, $p\to\frac12$, which one might expect: the the contribution from being passed a one becomes minuscule compared to all of the other possibile rolls.

amd
  • 53,693