Generating function for maximum of two dice

combinatoricsgenerating-functions

Is it possible to make a generating function such that the coefficients provide the number of ways that the maximum of two dice can be obtained?

For the sum of dice, I know that the generating function is simply:

$$f(x) = x^1 + x^2 + x^3 + x^4 + x^5 + x^6$$

And reading the coefficients of $f(x)^2$ gives the probability distribution.

i.e $$f(x)^2 = (x^1 + x^2 + x^3 + x^4 + x^5 + x^6)(x^1 + x^2 + x^3 + x^4 + x^5 + x^6)$$

$$f(x)^2 = 1x^{12} + 2x^{11} + 3x^{10} + 4x^{9} + 5x^8 + 6x^7 + 5x^6 + 4x^5 + 3x^4 + 2x^3 + 1x^2 $$

There are 6 ways to get a sum of 7, reading the coefficient of $x^7$.

What is $g(x)$ for the maximum of two dice?

For example rolling a 2 and a 3 will output a 3. Rolling a 4 and a 4 will output 4.

Best Answer

For fixed $n \ge 1$ the number of pairs $(i,j) \in \mathbf{N}^2$ such that $\max(i,j) = n$ is $2n-1$. So the polynomial (generating function) whose coefficient of $x^n$ counts the number of ways to roll two (six-sided) dice and get a max of $n$ is $x + 3x^2 + 5x^3 + 7x^4 + 9x^5 + 11x^6$.

Related Question