# Generating Functions to design nonstandard dice [duplicate]

Define a nonstandard die as a $6$-sided die that is equally likely to come up on each side, but has a different set of numbers than the usual $1,2,3,4,5,6$ on its sides. A standard die will be the usual fair die bearing the numbers $1,2,3,4,5,6$.

Is it possible to design a pair of nonstandard dice, with positive integers on the faces (not necessarily all distinct), so that the probability of rolling any given total on those two dice is the same as the probability of rolling that total on two standard dice? The two dice do not need to be identical. If it is possible, do it. If it is not possible, prove that it is not possible.

Construct a pair of nonstandard dice such that the generating function for their sum matches the corresponding g.f. for a pair of standard dice?

Just multiply the two $D_6(x)$ generating functions and refactor them: $$D_6(x)D6(x) = x^2 (1 + x)^2 (1 - x + x^2)^2 (1 + x + x^2)^2$$ Then multiply groups of factors so you get two polynomials with 6 terms, no negative no constant terms: $$D_6(x)D_6(x)= (x+x^2+x^2+x^3+x^3+x^4)(x+x^3+x^4+x^5+x^6+x^8)$$

$$\Rightarrow \{1,2,2,3,3,4\}, \{1,3,4,5,6,8\}$$

While there may be some cute trick to this, I used (and would recommend) Mathematica or a similar CAS to expand and refactor polynomials.

The Mathematica process, by request (the process should work in any CAS, probably even W|A).

$$\textrm{factor}\left[(x+x^2+x^3+x^4+x^5+x^6)^2\right] = x^2(x+1)^2(x^2-x+1)^2(x^2+x+1)^2$$

What you want to do is multiply the factors to make $D_6^*(x), D_6^{**}(x)$ so that you have a six term polynomial without negative or constant terms.

The makesure that it has six terms (6 faces) we want $D_6^*(1) = D_6^{**}(1) = 6$. So consider the following at $x=1$:

$$x \mapsto 1$$ $$(x+1) \mapsto 2$$ $$(x^2-x+1) \mapsto 1$$ $$(x^2+x+1) \mapsto 3$$

So we need to give each of the polynomials one $(x^2+x+1)$ and one $(x+1)$ term so the product will be six when evaluated at one.

To remove the constant term, split the $x^2$ between the two polynomials.

These leave us with the following:

$$D_6^*(x) = x(x+1)(x^2+x+1)j(x), D_6^{**}(x) = x(x+1)(x^2+x+1)k(x)$$

Where $k(x)$ and $j(x)$ are some polynomials that we can create from the remaining factors. However, we have two copies of $(x^2-x+1)$ remaining, and if we set $k(x) = j(x)$, then we will simply have the original dice back, so both of them go to one of the nonstandard dice. WLOG, set $k(x) = 1$ and $j(x) = (x^2-x+1)^2$.

Our final result:

$$D_6^*(x) = x(x+1)(x^2+x+1)(x^2-x+1)^2, D_6^{**}(x) = x(x+1)(x^2+x+1)$$

Then in Mathematic:

$$\textrm{expand}\left[x(x+1)(x^2+x+1)(x^2-x+1)^2\right] = x+x^3+x^4+x^5+x^6+x^8$$ $$\textrm{expand}\left[x(x+1)(x^2+x+1)\right] = x+x^2+x^2+x^3+x^3+x^4$$

As before, the exponents are the sides of each die, so we just read those off.

Full disclosure: I didn't go through much of a process beyond distributing the $x$ to both of them the first time; the GF is short enough that I came up with that answer after trying a few combinations. For longer GFs, you'll need to do a similar analysis to add enough contraints to make it feasible to solve.

• @CuddlyCuttlfish I use Mathematica but I do not know how to make it expand and refactor. Would you mind sharing the code you used for this procedure? – Geoffrey Critzer Jun 6 '15 at 19:58
• @GeoffreyCritzer added that, and some more detail on the process :) – TokenToucan Jun 6 '15 at 23:25
• Thanks. I think there is a typo in the right hand side of the penultimate equation. The second term should be x^3. – Geoffrey Critzer Jun 7 '15 at 10:23
• Yup! Fixed that. – TokenToucan Jun 7 '15 at 19:22