# Creating $Y \sim U[1, \dots, 6] + U[1, \dots, 6]$ as a function of $X_1, X_2, X_3 \sim U[1, \dots, 6]$

The Three Indistinguishable Dice Puzzle from standupmaths

The problem therein can be summarized as follows:

You have three dice rolls. Each die is indistinguishable from the others. However, using the result of those three dice, emulate the roll of a pair of dice.

Stated formally:

Let $X_1, X_2, X_3$ be three independent identically distributed uniform random variables $X_i \sim U[1, \dots, 6]$.

The objective is to find a function $f$ such that:

$$f(X_1, X_2, X_3) \sim U[1, \dots, 6] + U[1, \dots, 6]$$

$$f(X_1, X_2, X_3) = f(X_1, X_3, X_2) = f(X_3, X_2, X_1)$$

That is to say $f$ is invariant in function argument ordering.

A weaker alternative objective is to find functions $f, g, h$ such that

$$h(f(X_1, X_2, X_3), g(X_4, X_5, X_6)) \sim U[1, \dots, 6] + U[1, \dots, 6]$$

$$f, g \text{ are invariant in function argument ordering.}$$

And further weaker alternatives involve similar iterations (rolling the group of three dice multiple more times).

## What I've tried so far:

There are $156$ sorted triples of $\{1, \dots, 6\}^3$. This equivalent $(6)(26)$ triples, so potentially partitioning these $156$ pairs into slices of size $26$ will allow us to assign a number from $1$ to $6$ with equal probability. Rolling twice will give another number in the same way. Take the sum of both numbers and we're done. This is satisfies the weak alternative objective.

Now, this method is a solution by the video's standards if I can define the partition above in a simple closed form (given $x_1, x_2, x_3$, which slice of the partition am I in?). However, the video seems to imply that there's another way that is simpler than this.

## Question:

Is there such a method in which the three dice are only rolled once? If so, what is it?

There are $6^3=216$ equally likely outcomes when you throw three six-sided dice: $\{(x,y,z):x,y,z\in\{1,2,3,4,5,6\}\}$. To show that your function $f$ exists, it suffices to show that these 216 outcomes can be divided into 36 groups of size six each, where any permutation of $(x,y,z)$ lies in the same group as $(x,y,z)$.
There are ${6\choose 3}=20$ triples of distinct values, and each of these corresponds to a natural group of size six as follows: $\{(1,2,3),(1,3,2),(2,1,3),(2,3,1),(3,1,2),(3,2,1)\}$.
There are ${6\choose 2}=15$ pairs of distinct values, and each of these corresponds to a natural group of size six as follows: $\{(1,2,1),(1,1,2),(2,1,1),(2,2,1),(2,1,2),(2,2,1)\}$.
The remaining outcomes form the 36th group of size six: $\{(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,6)\}$.