# Permutations and Dice

So, this is the situation: Person $A$ throws two dice while Person $B$ throws one die. The winner has the highest number. Person $A$'s score is the highest of the two dice. If Person $A$ and Person $B$ have the same score then Person $B$ wins. What is the probability that Person $A$ wins?

I did this:

$$\frac{(6\cdot5\cdot2)+(6\cdot4\cdot2)+(6\cdot3\cdot2)+(6\cdot2\cdot2)+6\cdot2 -(1^2+2^2+3^2+4^2+5^2)}{216}$$

At first, I didn't subtract anything because I thought that there were no repetitions. My question is, why does is the subtracted part this $(1^2+2^2+3^2+4^2+5^2)$ and why squared? Is there a way to explain it? (I did it by trial, so I listed case ($6$ possible, $2$ possible(which is $6$ and $5$), Person $B$ rolls $4$) I can solve this for Person $B$ winning and then subtract from $1$, but I want an explanation for the latter. Thanks in advance

-
Are you sure that answer is correct? –  JB King Feb 6 at 17:58
125/216. Yeah pretty sure –  Richard Feb 6 at 18:01

I'd probably go for a simpler approach where I'd take the 36 permutations of A's rolls and see what the score is and then note how many possible values for B's roll will still have A win in the end.

For A to score a 6, there are 11 possibilities, as one die could have from 1-5 for either side which gives 10 possibilities and then there is a pair of 6s. In this case, there are 5 values for which A wins, which would make for 55 possible permutations.

For A to score a 5, there are 9 possibilities, as one die could have from 1-4 on it and then there is the pair of 5s possibility. In this case, there are 4 possible values for which A wins. In this case, it is 36 possible permutations.

For A to score a 4, there are 7 possibilities, by the same reasoning. Thus, there are 3 possibilities here for B's roll. Thus there are 21 possibilities.

One could continue for 3 and 2 as if A rolls a pair of 1s then this person can't win.

Now, there is a pattern here as the multiplications are $11*5+9*4+7*3+5*2+3*1 = 55+36+21+10+3 = 91+34 = 125$.

Thus there are 125 possible permutations where A wins.

125/216 is the answer I'd give which is $(5/6)^3$ for an interesting point.

If B is allowed 2 rolls and the higher is taken as B's score, then the totals would change a bit as instead of that 5,4,3,2,1 sequence, it would now become 9,7,5,3,1 as we'd want B to score lower than A though we know how many possible permutations yield various scores.

Corrected for the cases where the values aren't adjacent as that was the error in my previous post.

So the computation is $11*(9+7+5+3+1)+9*(7+5+3+1)+7*(5+3+1) + 5*(3+1) + 3*1 = 11*25+9*16+7*9+5*4+3 = 505$

The $(9+7+5+3+1)$ corresponds to how many ways could B's pair of rolls give a score of 5,4,3,2, or 1 respectively. If A scores a 6, then B has to score 5 or lower to lose. This is what the bracketed sum represents is the permutations to get the lower scores which get shorter as there are fewer ways to get those lower scores.

Thus it is 505/1296.

From a high level, let's break this problem into a few pieces. First, to get a specific score, there are finitely many possibilities for each score. There are 11 possible permutations to score 6, 9 permutations to score 5, 7 permutations to score 4, 5 permutations to score 3, 3 permutations to score 2, and 1 permutation to score 1. That is the first part of how I'd start to solve this.

Now, let's consider various scoring pairs $(x,y)$ where x is the score for A and y is the score for B. Now, which possibilities exist where A wins, which is $(x,y), x>y$: $(6,5),(6,4),(6,3),(6,2),(6,1),(5,4),(5,3),(5,2),(5,1),(4,3),(4,2),(4,1),(3,2),(3,1),(2,1)$

The sum I gave for 505 is precisely the sum of all the ways those scores could be produced.

You could state that to get a score of x, there are 2x-1 possible permutations as there are 2 sets of outcomes: 1) A pair of the same value, 2) One die that is x and the other can range from 1 to x-1. There are 2 sets of the second one which is 2x-2 total permutations and adding one for the pair gives 2x-1. That is about the only way I could see introducing x in a way that makes sense here as part of this is just brute force counting. If the conditions are mutually exclusive then they can be multiplied together while if the conditions are part of the same set then this is where one adds together the values. Thus, I can take the 11 permutations for A to score a 6 and multiply that with the 25 ways for B to score anything but a 6 and then continue for the other values.

Generalizing the problem to more than 2 rolls you could try a computation like $x^n-(x-1)^n$ as a possibility to compute for n rolls a score of x, which I computed from the idea that $x^n$ represents how one could place n digits from 1 to x in all permutations. However, I need to remove the ones that don't have an x and thus I subtract the other possible values, which would be where the initial computation had the subtraction that it did. As an example, try n=2 and take x=1 to 6. Then you could apply a similar method for other values. This allows you to compute a specific score for a specific number of rolls.

It wouldn't be that hard to solve this with either a computer program or an Excel macro at this point if you can organize the problem though if this was the initial question, that would have been better stated as this is starting to become a bit hard to answer with the question changing so much.

-
The numerator being $5^3$ is a coincidence in that the leading term for an $n$ sided die is $\frac {n^4}8$, not $n^3$ –  Ross Millikan Feb 6 at 18:20
If Person B could now roll his dice twice, would this method work? –  Richard Feb 6 at 18:27
I believe the second answer you gave is wrong. It should be 505/1296. –  Richard Feb 6 at 18:54
I have corrected the figures used and concur with 505/1296. –  JB King Feb 6 at 19:02
Thanks for everything JB King. I really appreciate it :)!! –  Richard Feb 6 at 20:05