Probability & cube problem A $3\times3$ cube made up of $1\times1$ pieces is painted red from all faces and broken in $27$ smaller pieces ($1\times1$). A Blind man comes and randomly arranges pieces to make a $3\times3$ cube. What is the probability that a cube similar to the original is formed (red faces from all sides)?
 A: Let's count the number of ways that this can happen, and then divide by the total number of permutations.
There are four types of pieces: center piece (with no colored sides), middle pieces (with one colored side), edge pieces, with two colored sides, and corner pieces with three colored sides.
Each type of piece must be moved to another piece with the same type.
The middle piece must be placed in the middle with any of the $24$ orientations.
For center pieces, there are $6$ of them, so there are $6!$ permutations of the pieces, but there are $4$ valid orientations for each, so there are $4^6\cdot6!$ valid reorderings.
For edge pieces, of which there are $12$, there are $12!$ permutations of the pieces, but each one has $2$ valid orientations, making $2^{12}\cdot12!$ valid reorderings.
For corner pieces, of which there are $8$, there are $8!$ permutations, but there are $3$ valid orientations, making $3^8\cdot8!$ valid reorderings.
In total, there are $24^{27}\cdot27!$ possible ways for the blind man to mess around with the blocks, so our answer is
$$
\begin{aligned}
\frac{24\cdot4^6\cdot6!\cdot2^{12}\cdot12!\cdot3^8\cdot8!}{24^{27}\cdot27!}&=\frac{6!\cdot12!\cdot8!}{6^6\cdot12^{12}\cdot8^8\cdot27!}\\
&=\frac{1}{5,465,062,811,999,459,151,238,583,897,240,371,200}
\end{aligned}$$
The probability is approximately $1.8\times10^{-37}$.
