# Number of unique permutations of a 3x3x3 cube, including transforms

I asked the question Number of unique permutations of a 3x3x3 cube but now I want to know a similar but related question.

If I have the numbers 1-27 and I assign each small-cube in a 3x3x3 matrix one number, how many permutations are there including rotations like how a Rubik's cube can do.

I think this questions is basically this.

If have 4 buckets (corner, edge, face, middle) and each one can hold a certain number of cubes (corner=>8, edge=>12, face=>6, middle=>1), how many different combinations of the 27 small-cubes can I put into the 4 buckets.

Maybe I'm wrong but this isn't a rubiks cube question at all (it's a balls in bucket type question like you clarified). Then in that case wouldn't the answer just be

$$\frac{27!}{8!12!6!1!} = 783{,}055{,}973{,}700$$

In the first bucket of 8, you can choose, $27*26*25*24*23*22*21*20$, but then order doesn't matter so divide by $8!$. Then the calculation for the bucket of 12 is similar: $19*18*\cdots*8$. But again order doesn't matter so divide by $12!$. And when you do the same for the last two buckets you arrive at the answer.

• Thanks! I guess I thought of it as a Rubik's cube question because the buckets are defined by the properties of a Rubik's cube and it's rotation. – Yehosef Apr 23 '18 at 14:40
• Could you add commas to the number - I think it's easier to read. I tried to edit but you need to change at least 6 characters for some reason. – Yehosef Apr 29 '18 at 13:53
• lol sure no problem – timidpueo May 2 '18 at 4:00