50

I throw 2 unfair dice, suppose that $p_i$ is the probability that the first die can give an $i$ if I throw it, for $i =1,2,3,..6$ and $q_i$ the probability that the second die can give an $i$. If I throw the dice together, is it possible to get all possible sums $2,3,4,...12$ with the same probability?

Here's what I've tried so far, the probability that I get a $2$ if I throw both dice is $p_1q_1$, the probability that I get $3$ is $p_1q_2+p_2q_1$, and generally the probability that I get $n$ is $$\sum_{i+j=n} p_iq_j$$ where $i=1,2,...6$, $j=1,2,...6$.

So now in order for all possible sums to appear with the same probability, it must be true that $$p_1q_1=p_1q_2+p_2q_1$$ $$p_1q_2+p_2q_1=p_1q_3+p_2q_2+p_3q_1$$ $$........$$ has a solution, this is where I am stuck I can't find a way to prove that the system above has a solution, can you help?

Henry
  • 169,616
Guin_go
  • 583
  • Just out of curiosity, did you come up with this yourself? – Cotton Headed Ninnymuggins Apr 15 '21 at 06:37
  • Yes, I was actually thinking whether this could be possible. – Guin_go Apr 15 '21 at 06:42
  • 3
    It's clear that the system will have the zero solution, I want to prove it has non-zero solution where $p,q \leq 1$. – Guin_go Apr 15 '21 at 06:48
  • 6
    So, you want the probability of a sum of $2$ to be the same as that of $3$ etc? So, they will all be $\frac{1}{11}$. You don't mean the same as with fair dice where these probabilities are not equal. However, that suggests a different interesting question: could you have dice which are unfair by themselves yet as a pair behave as a fair pair. – badjohn Apr 15 '21 at 08:15
  • 4
    @badjohn I am trying to see if 2 unfair dice are rolled together will be a fair pair. – Guin_go Apr 15 '21 at 08:31
  • 9
    In that case, remember that even with a fair pair, the probability of $2$ is not the same as the probability of $3$. – badjohn Apr 15 '21 at 08:49
  • 1
    This is the discrete analogous to this https://mathoverflow.net/a/228030 , and it can be proved in the same way, by using the characteristic functions. – leonbloy Apr 15 '21 at 19:41
  • @user253751, you're right I misread the question! thanks. – PatrickT Apr 16 '21 at 11:48
  • 3
    @badjohn your "different interesting question" is indeed interesting. Perhaps you can ask it as a separate question. It is easy to see that if two unfair dice are unfair in exactly the same way then the pair can't mimic the sums of a standard fair pair, but it isn't so obvious for a pair of differently biased dice. I suspect that there are enough degrees of freedom to make it work. If that is the case, a minor variation of the question is if you can do so with the additional constraint that the probability of rolling a double is 1/6. – John Coleman Apr 16 '21 at 16:08
  • @badjohn correct, and the probability that 7 or 8 will be the sum is highest of all. – Mark Ransom Apr 16 '21 at 18:08
  • @JohnColeman: Re: "I suspect that there are enough degrees of freedom to make it work": That other question has no more degrees of freedom than this one: both can be written as a set of equations of the form $p_1 q_1 = a$, $p_1 q_2 + p_2 q_1 = b$, etc., just with different values of $a$, $b$, etc., except that that question also forbids the obvious solution whereby $p_1 = p_2 = \dots = p_6 = q_1 = q_2 = \dots\ = q_6 = 1/6$. – ruakh Apr 16 '21 at 18:18
  • 1
    @ruakh It is basically just a hunch. In this case you have the fair solution (which you point out) where all the $p_i,q_j = 1/6$. I think of it as more of a question if you can perturb the solution. Can you make compensating changes which preserve the sums? I don't have strong intuitions about it, but it strikes me as more plausible that you could do that then you could create uniformly distributed sums with a pair of dice (which we know that you can't do). – John Coleman Apr 16 '21 at 23:16
  • @JohnColeman: I don't have strong intuitions about the dice problem itself, but per the accepted answer here, it can be reformulated as a problem about the product of two polynomials being a third polynomial. The only difference is the coefficients of the third polynomial: instead of all being 1/11, they will be 1/36, 1/18, etc. The roots of a nonzero polynomial must be isolated; so you can't get another solution by simply perturbing the obvious one. (But there may well be another solution anyway. I have no idea.) – ruakh Apr 16 '21 at 23:32
  • 1
    @JohnColeman The same approach as presented in Mees de Vries' answer works for this different interesting question; it then boils down to finding another factorization $$PQ=(x+x^2+x^3+x^4+x^5+x^6)^2,$$ where $\deg P=\deg Q=6$ and all coefficients of $P$ and $Q$ are nonnegative, and $P(0)=Q(0)=0$, i.e. $P$ and $Q$ are divisible by $x$. Factoring the RHS into irreducibles shows that then $$\frac{P}{x}\frac{Q}{x}=(x+1)^2(x^2+x+1)^2(x^2-x+1)^2.$$ If $P$ is divisible by $(x^2-x+1)^2$, then to get $\deg P=6$ you must have $$P=x(x+1)(x^2-x+1)^2=x^6-x^5+x^4+x^3-x^2+x,$$ [continued] – Servaes Apr 17 '21 at 19:11
  • 1
    [continued] which has negative coefficients. So by symmetry both $P$ and $Q$ are divisible by $x^2-x+1$. As both are divisible by $x$, of odd degree, then to get degree $6$ both must be divisible by $x+1$. Then finally, to get degree $6$, also both must be divisible by the remaining factor $x^2+x+1$. So there is no other solution. – Servaes Apr 17 '21 at 19:13
  • 1
    @Servaes: Well done! – ruakh Apr 17 '21 at 20:05

5 Answers5

85

This is a classical problem. Without changing the problem, we can let the digits on the dice be $0, \ldots, 5$ instead of $1, \ldots, 6$ to make our notation easier. Now we make two polynomials: $$ P(x) = \sum_{i=0}^5 p_ix^i,\qquad Q(x) = \sum_{i=0}^5q_ix^i. $$ Now we can succinctly phrase your condition on $p_i, q_i$: it is satisfied if and only if $$ P(x)Q(x) = \frac1{11}\sum_{i=0}^{10} x^i. $$ Let's multiply both sides by $11 \times (x-1)$, and you get $$ 11(x-1)P(x)Q(x) = x^{11} - 1. $$ The 11 zeroes of the polynomial on the right are the 11th roots of unity, which means those are also the zeroes of the polynomial on the left. The term $(x-1)$ takes care of one of the zeroes, and since $P, Q$ are both of degree 5, that means that they each have to have 5 of the other 10 zeroes.

But now note: besides $1$, all of the 11th roots of unity are complex numbers, while $P, Q$ are real polynomials. If a complex number is the root of a real polynomial, then so is its complex conjugate. That means that $P, Q$ must each have an even number of complex zeroes, but we just showed that they also have to have 5 each.

We have reached a contradiction: such $P, Q$, and thus such distributions $p_i, q_i$, do not exist.

Mees de Vries
  • 27,550
  • 12
    Here's the same argument, but without using complex numbers: the LHS and the RHS have the same (real) zeros. Therefore, the zeros of P(x) and Q(x) are also the zeros of x^11 - 1. Since the graph of the RHS crosses the x-axis only at x=1, and since P(x), Q(x) are each odd-degree polynomials with at least one root, each is divisible by (x-1). Dividing the LHS and RHS by (x-1), we get that (x-1)^2 divides x^10 + x^9 + ... + 1, a contradiction. – Pinkwater Apr 15 '21 at 17:47
  • 3
    In the more general case where both dice have $n\ge 2$ sides (note that I still assume that both dice have the same number of sides), faces being numbered $0,1,2,\ldots,n-1$, the formula becomes$$(2n-1)(x-1)P(x)Q(x)=x^{2n-1}-1$$Both polynomials $P$ and $Q$ have degree $n-1$. Is there an argument if $n$ is odd, so $n-1$ is even? – Jeppe Stig Nielsen Apr 17 '21 at 10:47
  • @JeppeStigNielsen At the heart of that problem is the question whether the polynomial $$\frac{x^{2n+1}-1}{x-1}=x^{2n}+x^{2n-1}+\ldots+x^2+x+1,$$ is a product of two polynomials $P$ and $Q$ of degree $n$ with all positive coefficients and $P(1)=Q(1)=1$. In particular you need $\varphi(2n+1)\leq n$, so $n$ can't be very small. The smallest value $n=52$ doesn't allow such a factorization. It seems unlikely that such a factorization exists for any $n$. – Servaes Apr 17 '21 at 15:39
  • 1
    @Servaes Your condition $\phi(2n+1) \leq n$ suggests that you think that $P$ and $Q$ will have rational coefficients (since $\phi(2n+1)$ is the degree of the cyclotomic polynomial). But it is perfectly natural to consider this question with real coefficients, and then the odds seem much better. – David E Speyer Apr 18 '21 at 01:27
  • 1
    To make a small observation, all roots of $x^{2n}+\cdots +x+1$ are complex, so $P$ and $Q$ must have even degree, so Servaes's $n$ (which is half of Jeppe's $2n-1$) must be even. – David E Speyer Apr 18 '21 at 01:37
  • @DavidESpeyer You're absolutely right! – Servaes Apr 18 '21 at 08:22
56

Let's assume that this is possible. We can derive a contradiction from this assumption.

The probability of rolling a total of $2$ must be $1/11$, and the probability of rolling a total of $12$ must also be $1/11$, so

$$ \begin{align} p_1 q_1 &= 1/11,\ \text{and}\\ p_6 q_6 &= 1/11. \end{align} $$

The probability of rolling a total of $7$ must also be $1/11$. At the same time, the probability of rolling a total of $7$ is greater than or equal to $p_1 q_6 + p_6 q_1$. So,

$$p_1 q_6 + p_6 q_1 \le 1/11.$$

The numbers $p_1$, $p_6$, $q_1$, and $q_6$ are all probabilities, so they can't be negative. Also, if any one of them were $0$, then either $p_1 q_1$ or $p_6 q_6$ would be $0$, which we already know is not the case. So, all four of these numbers are positive. This means that $p_1 q_6$ and $p_6 q_1$ are both positive, and so

$$ \begin{align} p_1 q_6 &< 1/11,\ \text{and}\\ p_6 q_1 &< 1/11. \end{align} $$

If we combine these inequalities with the equations above, we find that

$$ \begin{align} p_1 q_6 &< p_1 q_1,\\ p_6 q_1 &< p_1 q_1,\\ p_1 q_6 &< p_6 q_6,\ \text{and}\\ p_6 q_1 &< p_6 q_6. \end{align} $$

Since the numbers $p_1$, $p_6$, $q_1$ and $q_6$ are all positive, we may cancel them when they appear on both sides of one of these inequalities. Doing that, we conclude that

$$ \begin{align} q_6 &< q_1,\\ p_6 &< p_1,\\ p_1 &< p_6,\ \text{and}\\ q_1 &< q_6. \end{align} $$

But this is impossible.

Sophie Swett
  • 10,830
  • 3
    +1 I think this is the best answer, as it is the only one that generalizes readily to dice with other numbers of sides. – Yly Apr 16 '21 at 06:56
  • 1
    @Yly - the generating polynomial answers work equally well for all dice with an even number of sides. But it is true that the particular contradiction they find fails for dice with an odd number of sides. – Paul Sinclair Apr 16 '21 at 14:00
  • With real fair dice, the possibility of rolling a 2 or 12 isn't 1/11, it's 1/36. The question assumes something which already isn't true. – Mark Ransom Apr 16 '21 at 18:24
  • Yes, though I would have been satisfied with you ending "$\ldots p_1 q_6$ and $p_6 q_1$ are both positive, and so $0<p_1q_6 < 1/11=p_1q_1$ and $0<p_6q_1 < 1/11 =p_6q_6$, implying $q_6<q_1<q_6$. But this is impossible." – Henry Apr 16 '21 at 18:37
  • 3
    @MarkRansom But the question doesn't assume that they're fair dice. – Sophie Swett Apr 16 '21 at 19:02
  • How can you expect an outcome from unfair dice that doesn't even hold for fair dice? The flawed assumption isn't that the dice are fair, it's that the outcomes will have an even probability. They don't. – Mark Ransom Apr 16 '21 at 21:26
  • 3
    @MarkRansom : Neither the title nor the Question (even checking prior versions) nor this answer assert any expectations. From where is this comparison/contrast with fair dice coming? – Eric Towers Apr 16 '21 at 21:48
  • The expectation expressed is that the sums of the dice will have equal probabilities of outcome. It's both in the question and the opening of your answer. The fact that this is not the outcome from fair dice is not universally known. – Mark Ransom Apr 16 '21 at 22:15
  • 1
    @MarkRansom I'm trying to figure out what you mean when you say that "the question assumes something which already isn't true." I think you're talking about the asker's statement that "I can't find a way to prove that the system above has a solution," which, as you're pointing out, seems to assume (falsely) that the system does have a solution. Other than that statement, the question doesn't seem to make any false assumptions. – Sophie Swett Apr 17 '21 at 00:19
  • @Yly Personally, I'd say the generating function approach is the more flexible one, since it reduces this question and many variants to a finite calculation--looking for factorizations over the positive reals of a fixed real polynomial. The real root contradiction works any time the two dice have the same parity of number of sides. The inequality arguments in this answer are a more "bare-handed" contradiction to the existence of a factorization. – Joshua P. Swanson Sep 26 '23 at 07:20
16

The probability generating function of the dice are $P(x) = \sum_{i=1}^6 p_i x^i$ and $Q(x) = \sum_{i=1}^6 q_i x^i$. The probability generating function for their sum is $R(x) = P(x)Q(x)$. You want all possible sums $2, \ldots, 12$ to have the same probability, or equivalently you want $R(x) = \frac{1}{11} x^2 (1+x+\cdots+x^{10})$.

Hence an equivalent way to state your problem is: can we factor $1+x+\cdots+x^{10} = p(x)q(x)$ where $p, q \in \mathbb{R}_{\geq 0}[x]$ have degree 5?

We can factor $1+x+\cdots+x^{10} = \frac{1-x^{11}}{1-x}$ over the complex numbers as $\prod_{k=1}^{10} (x-\exp(2\pi i k/11))$. Grouping together complex conjugate pairs using \begin{align*} (x-\exp(2\pi i k/m))(x-\exp(-2\pi i k/m)) &= x^2 - (\exp(2\pi i k/m) + \exp(-2\pi i k/m))x + 1 \\ &= x^2 - 2\cos(2\pi k/m) x + 1 \end{align*} gives \begin{align*} 1 + x + \cdots + x^{10} = \prod_{k=1}^5 (x^2 - 2\cos(2\pi k/11)x + 1). \end{align*}

But that says $1 + x + \cdots + x^{10}$ has no real factors of degree $5$ whatsoever, so there is no solution.

Suppose you weaken the requirements and don't insist the dice both have values in $\{1, \ldots, 6\}$. The subsets of factors with non-negative coefficients are $\{\}$,$\{3\}$,$\{4\}$,$\{5\}$,$\{2,4\}$,$\{2,5\}$,$\{3,4\}$,$\{3,5\}$,$\{4,5\}$,$\{2,3,4\}$,$\{2,3,5\}$,$\{2,4,5\}$,$\{3,4,5\}$,$\{2,3,4,5\}$,$\{1,2,3,4,5\}$. Since $1$ is only in one of these, namely $\{1, 2, 3, 4, 5\}$, the only complementary pair is the trivial one, $\{\}, \{1,2,3,4,5\}$ and there are no interesting solutions to the weaker version either.

  • 2
    Not to overstate this, but this might be my favorite answer in the history of MSE. What a great piece of math. – Cade Reinberger Apr 15 '21 at 14:57
  • Cool indeed :-) Just curious, did you explore whether ${3},{1,2,4,5}$ is the only factorization that has nonnegative coefficients, or could there be others? – David Z Apr 15 '21 at 21:04
  • @DavidZ Sadly there was a typo in my code (I was missing the 2 in front of the $\cos$ term). There are actually no non-trivial solutions to the weaker problem with differing numbers of pips on the dice. The answer has been edited. – Joshua P. Swanson Apr 16 '21 at 02:02
  • Ah well, as far as I'm concerned, knowing that there are no solutions to that variant of the problem is just as interesting as finding one! – David Z Apr 16 '21 at 03:48
  • Not sure what you mean by the negation of "the dice both have values in ${1,\dotsc,6}$". If the dice faces can be anything, then the usual ${1,2,3,4,5,6}$ and ${1,7,13,19,25,31}$ works. – obscurans Apr 16 '21 at 04:00
  • @obscurans The key requirement is that the sum have a uniform distribution on ${2, 3, \ldots, 12}$. If the size of the support is a composite number, you can cook up a factorization like you suggest. It makes one wonder if the converse holds. – Joshua P. Swanson Apr 16 '21 at 05:24
  • @CadeReinberger Now, I'm curious to see the overstated version. – Strawberry Apr 16 '21 at 13:23
4

Let take a simpler system. There are 2 outcomes for 2 coins $\{C_1,C_2\}$ - $\{1,2\}$ with probabilities $p_1,p_2$ for $C_1$ and $q_1,q_2$ for $C_2$.

Given condition: probability after 2 coin throws of the sum being $\{2,3,4\}$ is the same.

Question: Can you find some $p_1,p_2,q_1,q_2$ that satisfies the condition?


In this the given condition is $p_1q_1 = p_1q_2 + p_2q_1 = p_2q_2 -(G)$. But we also have the implicit conditions: $p_1 + p_2 = 1-(eq1)$, $q_1+q_2 = 1-(eq2)$. Consider the first and third expressions of the given condition (G). \begin{align*} p_1 q_1 &= p_2q_2\\ p_1 q_1 &= (1-p_1)(1-q_1)\\ p_1 q_1 &= 1-p_1-q_1+p_1q_1\\ p_1+q_1 &= 1\tag{eq3}\\ p_2+q_2 &= 1\tag{eq4}\\ \end{align*} Comparing the equations (eq1) and (eq3) and (eq1) and (eq4), we get $p_2 = q_1$ and $p_1 = q_2$.

Finally from the first two equalities of the given condition, we have: \begin{align*} p_1q_1 &= p_1q_2 + p_2q_1\\ p_1p_2 &= p_1p_1 + p_2p_2\\ -p_1p_2 &= p_1^2 + p_2^2 - 2p_1p_2\\ -p_1p_2 &= (p_1 - p_2)^2\\ \end{align*} Now we have a contradiction as the left side is $-ve$ and the right side is $+ve$


Since we can't find a solution for this simpler system, with just 2 equalities, it is quite unlikely that a solution for the more complicated die system with $\binom{6}{2}$ equalities exists.

Note: This is of course not a proof that no solution exists for the die system.

Rahul Madhavan
  • 2,939
  • 1
  • 12
  • 16
1

If you want to generate numbers 1 through 12 with uniform probability, it is possible by re-labeling the faces of fair dice. One die has the faces labeled 1 through 6. The other has the faces labeled -2, 0, 2, 4, 6, 8. If the total is not in the 1 through 12 range, roll again. This is an acceptance-rejection technique.

Also, there is a theorem in probability theory than any desired probability can be constructed by a sequence of Bernoulli trials (coin flips). Simulate coin flips by having the faces of a die be 0, 0, 0, 1, 1, 1, another die with faces 0, 0, 0, 2, 2, 2, a third die with faces 0 and 4, and a fourth die with faces 0 and 8. You will roll 0 through 15 with equal probability, and roll again if your number is not in the 1 through 12 range. Another acceptance-rejection method, with dice simulating coins.

Forgive my "engineering" approach; I can't help it.

richard1941
  • 1,051