[Combinatorics] Permutations of the Rubik’s Cube
By: Tao Steven Zheng (鄭濤)
【Problem】
Calculate the number of arrangements of the Rubik's cube if the cube is solved only by twisting the faces (a.k.a. making legal moves).
Two things to remember:
(1) The center piece of each face are fixed in position (although they do mechanically rotate with the face).
(2) Some permutations are impossible states when legal moves are considered.


【Solution】
The number of possible permutations of the squares on a Rubik’s cube (3x3x3 cube) can be determined by calculating? the number of arrangements of the corner pieces and the edge pieces.
Corner Pieces
There are 8 corner pieces that can be permuted in ways. Furthermore, each permutation can be arranged in 3 orientations, thus giving
possibilities for each permutation of the corner pieces. Therefore, the number of possible arrangements for the 8 corner pieces is
.

Edge Pieces
There are 12 edge pieces which can be arranged in ways. Each edge piece has 2 possible orientations, so each permutation of the edge pieces has
arrangements. Therefore, the number of possible arrangements for the 8 corner pieces is
.

Possible and Impossible States
There are three sets of "impossible states" that cannot be accessed by twisting (a.k.a making legal moves) the Rubik's cube.
(1) For the Rubik's cube, every reachable arrangement by legal moves from twisting the cube can always be represented by an even number of swaps. Subsequently, it cannot be represented by an odd number of swaps. For example, the arrangement shown below, which lacks the correct cube-rearrangement parity, has only one swap (odd number of swaps); thus, this is impossible. Since exactly half of the conceivable permutations are even and the other half are odd, only half of the cube's permutations (ignoring orientation) are reachable by legal moves. Therefore, we must divide by 2.

(2) Each legal move of the Rubik's Cube always flips an even number of edges such that the edge pieces has the same edge-flipping orientation as the original cube. For example, the arrangement shown below would be impossible to reach by legal moves, and there is no way of correcting the orientation by legal moves as well. Hence, only half of the edge orientations are reachable, and we must divide by 2 again.

(3) Each legal move of the Rubik's Cube always twists the corners in such a way that the sum of all of their orientations is exactly divisible by 3. Notice that every corner piece either belongs to the top or bottom and therefore each corner piece has one of its coloured face being either the colour of the top face or the colour of the bottom face. Any twist of the top and bottom faces will not change the orientation of the corners, and therefore the total orientation will remain exactly divisible by 3. For example, the arrangement shown below would be impossible to reach since its total corner orientation is 1 (not divisible by 3). Thus, only one-third of the corner arrangements are reachable.

Now that we know all the possible arrangements and the possible and impossible states, the total number of permutations is: