# 欧拉计划599题:魔方的不同着色

Distinct Colourings of a Rubik's Cube

Problem 599

The well-known Rubik's Cube puzzle has many fascinating mathematical properties. The 2×2×2 variant has 8 cubelets with a total of 24 visible faces, each with a coloured sticker. Successively turning faces will rearrange the cubelets, although not all arrangements of cubelets are reachable without dismantling the puzzle.

Suppose that we wish to apply new stickers to a 2×2×2 Rubik's cube in a non-standard colouring. Specifically, we have n n different colours available (with an unlimited supply of stickers of each colour), and we place one sticker on each of the 24 faces in any arrangement that we please. We are not required to use all the colours, and if desired the same colour may appear in more than one face of a single cubelet.

We say that two such colourings c1 ,c2 are essentially distinct if a cube coloured according to c1 cannot be made to match a cube coloured according to c2 by performing mechanically possible Rubik's Cube moves.

For example, with two colours available, there are 183 essentially distinct colourings.

How many essentially distinct colourings are there with 10 different colours available?

```
U=[1,1,1,1];
L=[2,2,2,2];
F=[3,3,3,3];
R=[4,4,4,4];
B=[5,5,5,5];
D=[6,6,6,6];

function show()
println("..",U[1],U[2],"....")
println("..",U[3],U[4],"....")
println(L[1],L[2],F[1],F[2],R[1],R[2],B[1],B[2])
println(L[3],L[4],F[3],F[4],R[3],R[4],B[3],B[4])
println("..",D[1],D[2],"....")
println("..",D[3],D[4],"....")
end;

function turn_x()
F[2],F[4],D[2],D[4],B[3],B[1],U[2],U[4] =
U[2],U[4],F[2],F[4],D[2],D[4],B[3],B[1];
R[1],R[2],R[3],R[4]=R[2],R[4],R[1],R[3];
show();
end;

function turn_y()
F[1],F[2],R[1],R[2],B[1],B[2],L[1],L[2] =
L[1],L[2],F[1],F[2],R[1],R[2],B[1],B[2];
U[1],U[2],U[3],U[4]=U[2],U[4],U[1],U[3];
show();
end;

function turn_z()
U[3],U[4],L[4],L[2],D[1],D[2],R[3],R[1] =
R[1],R[3],U[3],U[4],L[2],L[4],D[1],D[2];
F[1],F[2],F[3],F[4]=F[2],F[4],F[1],F[3];
show();
end;
```

# 评论

http://tomas.rokicki.com/cubecontest/winners.html
https://www.jaapsch.net/puzzles/ –  lt 04-19 12:17

http://blog.csdn.net/wildcatlele/article/details/8764601

× 4645
× 2