# How do I go about solving this probability question?

I was playing around with dice this morning and flipping them, when a problem suddenly hit me. If I roll $n$ normal six-sided dice, and flip every single dice, what is the probability that the distribution of 1's and 2's and 3's and 4's and 5's and 6's on the flipside is the same as the distribution for the normal side? e.g. If I rolled one 1, two 3's, two 4's and one 6, flipping all the dice would end up in one 1, two 3's, two 4's and one 6, which is the same as what I started off with.

I started by trying to use a Multinomial Distribution, viewed as a Generating Function:

$$(x_1+x_2+x_3+x_4+x_5+x_6)^n = \sum_{a_1+\dots+a_6 = n} \frac{n!}{a_1! a_2! a_3! a_4! a_5! a_6!} x_1^{a_1} x_2^{a_2} x_3^{a_3} x_4^{a_4} x_5^{a_5} x_6^{a_6}$$

Dividing by $6^n$, we can view this probabilistically: $$6^{-n}(x_1+x_2+x_3+x_4+x_5+x_6)^n = \sum_{a_1+\dots+a_6=n} P(a_1, a_2, a_3, a_4, a_5, a_6) x_1^{a_1} x_2^{a_2} x_3^{a_3} x_4^{a_4} x_5^{a_5} x_6^{a_6}$$ where $P(a_1, \dots, a_6)$ is the probability the dice has exactly distribution $(a_1, \dots, a_6)$ of number of dots before the flip. (Thanks to Kevin Costello who helped me with this question)

Noticing that a 1 and a 6 will become a 6 and a 1 after flipping (same with 2,5 and 3,4), the conditions that the flipside distribution be the same as the normal side is that $$a_1 = a_6, a_2 = a_5, a_3 = a_4$$

But I'm not too sure how to only extract the probabilities where this is the case, so I'm not sure if this method is really applicable to this problem. Another method I tried was after noticing that $n$ has to be even for the probability to be non-zero, I tried to work with the idea that the dices exist in pairs (1,6 or 2,5 or 3,4), and try to find the probability by dividing the number of ways of arranging $\dfrac{n}{2}$ pairs by the total number of arrangements, but the equation I got didn't match the expected result for $n = 4$, so I must have made a mistake.

• If we view this as a counting problem instead of a probability one (i.e. don't divide by $6^n$), this is sequence A002896 in OEIS (oeis.org/A002896 ), which has some references and a couple alternative expressions/asymptotic formulae (there doesn't seem to be a nice closed form). Commented Jun 13, 2017 at 22:01

If $n$ is odd, this probability is $0$. So for $a_1+\cdots+a_6=2n$

$$P\{a_1=a_6,a_2=a_5,a_3=a_4\}=\sum_{a_1+\cdots+a_6=2n}1\{a_1=a_6,a_2=a_5,a_3=a_4\}\binom{2n}{a_1,\dots,a_6}\left(\frac{1}{6}\right)^{2n}$$ $$=6^{-2n} \binom{2n}{n} \sum_{a_1+a_2+a_3=n}\binom{n}{a_1,a_2,a_3}^2 \approx 6^{-2n} \binom{2n}{n}\times \frac{3^{2n+1.5}}{4\pi n}$$

where the approximation is due to this post.

Computations suggest that this approximation works well:

$$\begin{array}{c|c|c|} n & p_{exact} & p_{approx} \\ \hline 2 & 0.1667 & 0.2067 \\ \hline 4 & 0.0694 & 0.0775 \\ \hline 10 & 0.0194 & 0.0204 \\ \hline 20 & 0.0071 & 0.0073 \\ \hline 30 & 0.0039 & 0.0039 \\ \hline 40 & 0.0026 & 0.0026 \\ \hline \end{array}$$