Rubik Cube, 43 Quintillion Combinations

How many combinations are possible on the standard Rubik cube? The answer, roughly 43 quintillion, is printed on the box, but let's try to justify it.

First notice that the movable shell of the cube consists of 8 corner blocks and 12 side blocks. The corners cannot be moved into side positions, nor can side pieces move into the corners. To first approximation, sides and corners can be analyzed separately. Furthermore, position and orientation can also be analyzed independently. Let's begin with the corners.

Suppose the top and bottom faces of your cube are colored blue and white respectively. Every corner piece has exactly one blue or white face. If this face is horizontal (i.e. located on the top or bottom surface of your cube), then that corner piece has orientation 0. If the piece must be rotated counterclockwise 120 degrees, in order to attain a 0 orientation, then its orientation is 1. (We are looking at the cube from a point just off the corner, extending the cube's main diagonal.) If the piece must be rotated clockwise 120 degrees to attain a 0 orientation, then its orientation is 2. Clearly all corners have orientation 0 at the start.

Twist the top face 90 degrees, and watch what happens to the four top corners. Their positions shift, but their orientations do not change. If the blue side of a corner block was a clockwise turn away from horizontal, then it is still a clockwise turn from horizontal after the move. Similarly, a bottom twist does not change any of the corner orientations. Next twist the front face clockwise. The block at the upper left has its orientation increased by 1, as does the block at the lower right. Of course, if the orientation was 2, it goes back to 0. This is mathematics mod 3. The other two corner blocks have their orientations increased by 2. The total of all the orientations of all the corners is increased by 1+2+1+2 = 6, which is 0 mod 3. By symmetry, this holds for the right, back, and left faces as well. No matter how many moves we make on the cube, the sum of the 8 corner orientations is always 0 mod 3.

Next we must show that the 8 corners can in fact attain all possible orientations, subject to the mod 3 constraint given above. Recall that TBLRFK represent clockwise turns of the top, bottom, left, right, front, and back faces, while their lower case counterparts represent counterclockwise turns. The transformation [rBRFBftFbfrbRT] increments the orientation of the upper right front corner, and decrements the orientation of the upper left front corner, leaving the rest of the cube undisturbed. By prepending a couple moves to this transformation, and undoing these moves at the end, we can bump the orientations of any two corners on the cube, without disturbing any other pieces in any way. Suppose we want to realize the orientations 21022011. Add 1 to the orientation of the first corner, while subtracting 1 from the last corner, until the first has orientation 2. Then do the same with the second corner, until its orientation is 1. Again, the last corner takes up the slack. When the seventh corner attains its desired orientation (1), the same is true of the eighth corner, since the 8 orientations always sum to 0 mod 3. There are therefore 37 possible corner orientations, and any of these can be applied to the cube after the fact. Hereinafter, we will ignore the orientation of the corners, and multiply by 2187 at the end.

The side pieces can be analyzed in a similar fashion. Let the orientation of a side piece be 0 if it is an even number of moves from start, 1 if it is an odd number of moves from start. Of course we need to prove this definition is not ambiguous. Might there be two paths back to start, one even and one odd? The answer is no, but we will need to use the theory of even and odd permutations to prove it. Consider the side piece at the top front. We have already said the top of our cube is blue; let the front face be red. Thus our side piece has a blue top and a red front. In theory, this side piece can be thought of as a miniature Rubik cube, a scale model of the larger cube that contains it. This miniature cube, 1/27 the volume of the original, has 4 other faces that are not visible, as they are hidden inside the larger cube. Give them the same colors as the corresponding faces on the larger cube. Now twist the front face clockwise, and our little side cube also spins clockwise. This permutes the six virtual colors on the small side-cube. We see that the blue side has spun around to the right, but we also imagine the green, white, and yellow faces of the side cube rotating around inside the larger Rubik cube. Each time the side cube moves, four of its six faces spin around in a cycle while the other two remain in position. This is an odd permutation. After an odd number of moves, the side cube is rotated through an odd permutation, whereas an even number of moves carries the side cube into an even permutation. Since a side cube cannot exhibit an odd and an even permutation simultaneously, there cannot be two paths back to start having odd and even lengths.

Now that we have a well-defined orientation function, analyze the sides using the same techniques that were applied to the corners. Whenever any face is twisted 90 degrees, each of the 4 side pieces moves one step closer or farther from its home. In other words, the orientation of each of the 4 side pieces is reversed. Yet the sum of all the orientations remains 0 (mod 2).

Now select an arbitrary pattern of 12 orientations, subject to the above mod 2 constraint. We must implement these 12 orientations without disturbing the corners in any way, or the positions of the side pieces. The transformation [FFRlTTrLtlTkRlTTrLFFKtLT] flips the orientations of two side pieces, and leaves the rest of the cube undisturbed. By prepending a couple moves to this transformation, and undoing these moves at the end, we can change the orientations of any two sides on the cube. If the first side piece exhibits the wrong orientation, flip it (along with the last side). Do the same with the second side, and so on up to the panultimate side. The last side will be correct, because the 12 orientations always sum to zero. Hereinafter, we will ignore the orientation of the sides, and multiply by 211 = 2048 at the end.

Since orientations are no longer a factor, number the corner cubes 1 through 8, and number their corresponding start positions 1 through 8. How many ways can these 8 corner pieces be distributed among the 8 corner positions? The transformation [RTrftFRtrTT] swaps two corner pieces and leaves the other corners in their original positions. This is the key to swapping any two corners on the cube. The first swap moves any of the 8 corners into the first position, the next swap moves any of the 7 remaining corners into the second position, and so on. All 8! corner permutations are accessible.

Finally, the sides must be moved into position, without moving the corners. At first, all side permutations look accessible, and this is almost the case. However, permutation parity cuts this number in half. Consider a 90 degree twist of any face. Four corners march around in a cycle, an odd permutation. Similarly, four sides march around in a cycle, producing another odd permutation. After one move, corners and sides both present odd permutations. After two moves, corners and sides attain even permutations again. By induction, the parity of the two permutations is equal. If the corners are arranged in an odd permutation, then the sides will present an odd permutation (as a result of arranging the corners), and only odd permutations are accessible thereafter. The transformation [FFRlTTrL] exchanges three side pieces, leaving the corners intact. This is the key to cycling any three sides on the cube. Move any of 12 sides into the first position, using a third piece to complement the dance. Then move any of 11 pieces into the second position, and so on. Once the tenth piece is placed, the transformation cannot be applied again, because there are only two pieces left. However, these pieces will be in position, because the parity of the sides is determined by the parity of the corners. Thus there are 12!/2 accessible side permutations.

Finally we are ready to run the calculation:
8! * 12!/2 * 37 * 211 = 43,252,003,274,489,856,000.

If you have a friend who has mastered the cube, and you enjoy practical jokes, try the following. Physically take apart his cube. (Twist one face 45 degrees and gently pry a side piece out with a spoon.) Swap two corners, and put the cube back together. (Bear in mind, the cube is a little looser after this procedure; it is never quite the same.) Then mix it up, and casually inquire, “So ... you can really solve this thing, eh?” I played this trick on a friend in college, who then spent several frustrating days trying to solve the cube that he thought he had mastered. 😀

There is a related question: how many "different" combinations are there? By different, we mean distinct relative to rotations and reflections. After all, the configuration that is attained by a single clockwise twist of the top face resembles the result of one clockwise twist of the front face. If we rotate the cube and reassign colors accordingly, the former becomes the latter. Since there are 48 possible rotations and reflections of the cube in 3-space, the approximate answer is 43 quintillion divided by 48, or just under a quintillion. This is not an exact answer, because some patterns exhibit symmetry, and do not actually have 48 distinct representations. The exact calculation entails the use of the Bernside Polya counting theorem.

Although the cube has not been completely analyzed, we can place a lower bound on its complexity. After one move, the cube can be in any of 12 different configurations. After two moves, the cube can attain, at most, 122 = 144 patterns (the actual number is 129). The number of configurations that lie within k moves of start is
1 + 12 + 122 + 123 + ... + 12k = (12k+1 - 1) / 11.
When k = 18, the result is less than 43 quintillion. Therefore, some configurations are 19 moves from start. If 180 degree turns are considered moves, the base of the exponential function changes from 12 to 18, and some configurations are 16 moves from start.

Pocket Cube

Consider the top back left piece of the 2 by 2 by 2 pocket cube to be correctg and inposition. The number of configurations is then 7! * 36, or 3,674,160.

Slanted Cube

The only other tactile, monochrome cube I have seen is the slanted cube, wherein the moves are not parallel to the faces of the cube. At first this is quite unnerving. However, there is a trick. Hold the slanted cube with the large layer on top, and an edge pointed toward you. this is 45 degrees off, relative to the standard cube. Now both cubes have moves that are quarter turns: top bottom front back left right. Both have 6 centers, and 8 corner pieces, an 12 side pieces, that permute under these moves.

The top and bottom have a center square that spins, but does not move in space, and is invariant under spin, just like the standard cube. The latteral faces have centers that are at first nonobvious as they are slanted. They too spin, but their slant changes under spin, and we'll get to that below. These centers establish x y z axes, like the standard cube, but again, this cube appears to be off by 45 degrees.

Corner pieces have two faces rather than three, but still, corners have positions and orientations. The top four corners are thicker than the bottom four corners, but otherwise identical. Thus there are 8 choose 4 (binomial coefficient) positional arrangements, or 70. The last orientation is determined, just as it is on the standard cube, so multiply by 37.

Side pieces come in two flavors, sides on the top and bottom, high sides, for high lattitudes, and sides in the middle layer, mid sides. The high sides on top are thicker than the high sides on the bottom. Thus the side pieces come in three setss of four.

High sides have two faces, like the standard cube. Mid sides have but one face exposed. All these sides have positions and orientations.

All positional arrangements are possible. Don't worry about swapping two sides and leaving the corners unchanged; we can swap two sides and two corners, wherein the corners being swapped are identical. There are no pesky even odd parity constraints. Thus there are 12 choose 4 choose 4 choose 4 positional arrangements, or 34650.

The side orientations are tricky. We use to call them flips, there is something similar here. Draw arrows on the side pieces pointing right all the way around. High sides have two arrows as there are two faces but that is a convenience, both arrows will point the same way, up right down left, as we make our moves. If a top side piece is on the top but flipped (in the traditional sense), that can be seen in its arrows pointing left instead of right. If a mid side piece is in the middle but flipped, its arrow points left.

Front left back right will turn 4 arrows clockwise. After any series of moves, the side arrows collectively show turns that are a multiple of 4. It is not possible to flip one side and leave the rest of the cube undisturbed. That would spin an arrow 180 degrees, 2 turns instead of 4. When 11 arrows are set, the 12th is determined. This gives 211 as we expect. But are all these attainable? [FFtBRR] flips two arrows. (It also flips two centers, we'll get to that below.) Prepend and append moves to flip any two arrows.

The latteral centers have spins that are significant. Each can spin in one of four ways, potentially bringing in a factor of 44, or 256. Let an arrow point right on each of the mid centers, as it does on the side pieces. Now, if all the sides and corners are complete, [RRbFFlRTTLrBRR] flips the arrow on the front center square. I have solved the cube with one center spun 90 degrees, so these are indeed a free parameter relative to the rest of the cube.

Number of configurations is now 70 * 37 * 34650 * 211 * 256 =
2,781,121,609,728,000

This does not account for the symmetry of spinning the cube about the y axis. Such symmetry does not exist in the standard cube because the centers are colored. Let's call upon the Bernside Polya theorem once again.

All of the above configurations are fixed by the cube standing still, the trivial rotation.

Suppose a configuration is fixed by a 90 degree rotation. The top corners are on top or on bottom, and tops are oriented the same way and bottoms are oriented the same way. Two choices times three orientations for those on top, and then the orientations of those on the bottom are determined. That's 6 for the corners. The mid sides will be in the middle, top, or bottom, with arrows consistent around. Then the top sides can be in one of two layers, 6 possibilities. Arrows on any of these layers can flip, so 6*8 = 48. Finally the centers are in one of 4 positions. The same for a 270 degree rotation, thus 2304.

Finally we have the 180 degree rotation. Corners arrange 4 ways by position, then 27 choices for orientations. If top sides are all on one layer, and middle sides and bottom sides as well, there are 6 ways to do that. If the sides on top come from one layer, but not so for the layers below, there are 6 ways to do that. Same if the middle layer is consistent, or the bottom layer is consistent. We are up to 24. Finally each layer has pieces from two layers. at the top, 3 ways to do that. 4 ways to arrange the middle layer, and 2 ways to arrange the bottom layer. That's 48. set the arrows on 6 sides and they are determined for the other 6. Set two centers and the other two are determined. 5,308,416

Add these up and divide by 4.
695,280,403,759,680

This cube has 695 trillion configurations, rather than 43 quintillion for the standard cube.

Spins

When braille letters are affixed to the squares of a standard cube, the centers have spins. The letters act like arrows. I noticed this when I solved the cube, but ignored it, because it is not part of the puzzle. If I wanted centers to be correct, as they must be in the slanted cube, then the standard cube becomes harder. Each move turns a center 90 degrees, thus the number of turns of the centers, collectively, has the same parity as the sides or the corners. Configurations are multiplied by 45 times 2. Each of these arrangements can be realized. We can see this by going back to the slanted cube. Remember I solved it with one lateral center twisted by 90 degrees, but that means a center square on top or on the bottom is also twisted by 90 degrees, we just can't see it. Apply this to the standard cube and any two centers can be spun by 90 degrees. Do this repeatedly to spin the centers in any way you wish.

Back to the Rubik home page.