Number of combinations for the NxNxN Rubik's cube


Consider an NxNxN Rubik's cube, where N denotes the number of layers. Surely you will agree that when comparing two cubes of different N, the one with higher N is harder to solve (5x5x5 cube is harder than a 2x2x2). At least in terms of time. Why is that so?

It's because a cube with higher N has more movable pieces, which results in a greater number of combinations that can occur on it. It's a direct proportion - the more pieces, the more combinations, the longer time horizon we need to solve it.

Number of combinations for an NxNxN Rubik's cube can be even expressed by a couple of formulas. For the one which is being presented on this page I would like to thank Michael Gottlieb very much, who literally guided me to it. I discussed the equation with him several times.

Number of combinations (also known as configurations or states) which can occur on an NxNxN Rubik's cube is equal to

number of combinations for rubik's cube

where N is the number of layers, the exclamation mark is a factorial and mod is a modulo. Modulo is a mathematical operation - more about it can be found on wikipedia, for example. For our purposes is sufficient the information that the index of the first bracket from the left takes only values of 0 or 1. If N is an even number, the index equals 0. If N is an odd number, the index equals 1. It should be noted that the equation doesn't contain square brackets. What may seem like a square bracket in the index at first glance is in fact a floor function (notice that the top "beak" is missing). Floor function is also described on wikipedia, for instance. Simply put, it is a number that is before the decimal point. Numbers not containing a decimal point (let's denote them as X) can be imagined e.g. in the form of X.00. Then a floor function equals X.

It should be noted that the formula is valid for N > 1. Fortunately, for N = 1 we don't have to calculate anything because a 1x1x1 Rubik's cube has only one possible combination.

Maybe you are thinking: "well, starting with a 4x4x4 cube, the centers are composed of several pieces. These center pieces can be also mutually swapped (permuted), so a total number of combinations will be greater". You're right, but only like in the Russian fairly tale - i.e. partially right. Center cubies for "bigger" cubes (for N > 3) can be truly permuted with each other, however, we may not register it. Center cubies of one color appear to be identical to us, thus we cannot really recognize them.

Unless we would make center cubies distinguishable from each other. If you paint a picture (on cube's centers) that will be solved only in one combination of cubies, the Supercube will be created. There is a modified formula for a Supercube - Chris Hardwick presents one, for example. The more pieces we can mutually distinguish on a Rubik's cube, the greater number of combinations the puzzle will have.

For the formula written above, I have made a simple online calculator. Just rewrite a value of N in "for N=3" at the beginning of the enter line. As you can see, a calculator is set to N = 3 by default.

Ken Silverman is the author of a 1x1x1 - 256x256x256 Rubik's cube simulator. Even bigger cubes can be theoretically solved using an IsoCubeSim application (made by Michael Gottlieb; it offers LxMxN cubes as well). Personally, I like better a Rubix simulator (2x2x2 - 50x50x50 cubes), whose author is Peter Bone. Although it offers smaller cube dimensions, for an ordinary mortal human being it is still sufficient. In addition, I like better a cube manipulation via the mouse on this simulator. But that's probably just about getting used to it.

Now let's derive the formula stated above (you can skip this part - a derivation ends by a blue title "1x1x1 Rubik's cube"). In order to begin, it is first needed to realize what pieces will be actually included into the equation. A 3x3x3 Rubik's cube consists of three piece types: centers, edges and corners. A 5x5x5 Rubik's cube, however, has more pieces.

Thus we must take into account the following pieces: fixed centers, movable centers, central edges, wing edges and corners.

Piece types of a Rubik's cube
Fig. 1 - Piece types of 7x7x7 Rubik's cube and depiction of composite edge

One outer layer of a 7x7x7 Rubik's cube is graphically illustrated on Fig. 1. Fixed center is depicted in black, movable centers are depicted in yellow, gray and orange, central edges are depicted in red, wing edges are depicted in blue and finally the corners are depicted in green.

You may be wondering why movable centers have three colors? It's because those are three independent piece types. Just as you can not swap a corner with a (central) edge on a 3x3x3 Rubik's cube, you can't swap yellow with either gray or orange movable pieces. Yellow movable centers are called "+centers" (along with a fixed center they form a "+" sign), while gray movable centers are called "X-centers" (along with a fixed center they form an "X" sign), and orange movable centers are called "oblique centers" (along with a fixed center they form an oblique angle I guess). For further considerations there will be no need to mutually distinguish these three piece types, hence they will be collectively called as movable centers.

Next, we can observe a purple set of pieces on Fig. 1. By composite edge we call a formation which is composed of wing edges and central edge, and is adjacent to two corners. Since "even cubes" (N = even number) don't have central edges, their composite edge consists of only the wing edges. On contrary, "odd cubes" (N = odd number) have both wing and central edges. So, in case of a 4x4x4 Rubik's cube, one composite edge is composed of two wing edges, while one composite edge in case of a 5x5x5 Rubik's cube consists of one central edge and two wing edges.

If we imagine a composite edge like an airplane, then the central edge represents the hull and the wing edges represent the airplane wings - thence the wing edge naming (the idea applies to odd cubes but the principle remains the same for even cubes as well).

We cannot "move" fixed center. They are present on odd cubes, whereas we won't find them on even cubes.

Movable centers are present on all cubes for N > 3. For instance, in case of a 4x4x4 Rubik's cube we designate 4 inner pieces on each face of a cube as movable centers. For a 5x5x5 Rubik's cube we designate inner 3x3 square of pieces minus fixed center in terms of one face as movable centers. Thus there are 8 pieces in case of a 5x5x5 cube.

Central edges have the same properties as the edges on a 3x3x3 cube and we will find them exclusively on odd cubes.

For N > 1, there are always 8 corner pieces (corners in short) on a cube.

Technically speaking, the relation mentioned above is a combination of two formulas - one for calculating the combinations for odd cubes and the other one for calculating the combinations for even cubes. In order to express both these formulas by just one formula, it was necessarry to choose some kind of reference point that determines "cube position". Fixation of fixed centers can be chosen as a reference point, for example. But it is impossible to do for even cubes because a fixed center isn't present on them. Therefore, fixation of one corner on a cube has been chosen as a reference point.

After fixation of one corner, the remaining corners can be permuted (moved, swapped) by 7! ways and oriented by 36 ways while keeping a fixed orientation of given fixed corner (one out of seven corners must submit to the orientation of a fixed corner).

Fixed centers can be permuted while fixing one corner in case of odd cubes - if certain center is situated on the right face, on the left face is situated opposite center unambiguously. Remaining 4 centers may be permuted by an M move by 4 ways. Since there are 6 faces (i.e. we can place 6 different centers to the right face), a total number of center permutations is equal to the product of 6·4. Center orientations are mutually indistinguishable, hence there is only 1 case => number of combinations for fixed centers is therefore 6·4·1 = 24.
In case of odd cubes, it further applies that central edges may be oriented by 211 ways and permuted by 12!/2 ways (see more at Rubik's cube notation). So 210·12! possible combinations.
In order to consider these products for odd cubes and simultaneously not consider them for even cubes (which have neither fixed centers nor central edges), modulo operation will be used - exponent of N mod2, to be specific.

Wing edges can be permuted by 24! ways and oriented by 1 way in its orbit (i.e. an orbit in which they may appear) => 24!·1 = 24! possible combinations. There are (N-3)/2 orbits for odd cubes, whereas there are (N-2)/2 orbits in case of even cubes. Without a loss of generality, these two terms can be collectively expressed as a floor function of ((N-2)/2).

In each orbit of movable centers there are 24!/(4!6) combinations, because each orbit of movable centers has 4 identical pieces in terms of one face (6 of them in total) on a cube. In other words, there are 24 pieces in one orbit of movable centers and 4 indistinguishable pieces in color are situated on each face of a cube. For even cubes, there are ((N-2)·(N-2))/4 = ((N-2)/2)2 orbits of movable centers, whereas in case of odd cubes, there are ((N-1)·(N-3))/4 = ((N-2)/2)2-1/4 such orbits of movable centers. Without a loss of generality, these two terms can be collectively expressed as a floor function of (((N-2)/2)2).

A short list of some cubes with different number of layers is following. Times achieved by the fastest cubers are added.

1x1x1 Rubik's cube

The cube has only one position. Solving time is less than one tenth of a second.

2x2x2 Rubik's cube

The cube has 3 674 160 combinations (7 digits). Solving time is less than 2 seconds.

3x3x3 Rubik's cube

Number of cube combinations is equal to a number of 20 digits. Solving time is less than 7 seconds.

4x4x4 Rubik's cube

Number of cube combinations is equal to a number of 46 digits. Solving time is about 25 seconds.

5x5x5 Rubik's cube

Number of cube combinations is equal to a number of 75 digits. Solving time is roughly one minute.

6x6x6 Rubik's cube

Number of cube combinations is equal to a number of 117 digits. Solving time is around 1 minute and 45 seconds.

7x7x7 Rubik's cube

The "biggest" cube which can be competed with. Number of combinations is equal to a number of 161 digits. Solving time is around 2 and a half minutes.

20x20x20 Rubik's cube

Twice in my life I tried to solve this pettiness. For the first time it took me 20 hours, for the second time it took me a little bit over 8 hours (I already knew how to do it and what to be beware of when solving). Number of combinations is equal to a number of 1 478 digits. World record (unofficial, of course) solving time is 53 minutes and 10 seconds, set by Michael Gottlieb.

22x22x22 Rubik's cube

The biggest fully functional real cube ever made (not mass-produced, though) since 2016. Number of combinations is equal to a number of 1 796 digits. Solving time is long.

111x111x111 Rubik's cube

In May 2013, Michael Gottlieb solved such a big cube in less than 30 hours of solving time (29 hours, 52 minutes and 2.64 seconds). Number of cube combinations is equal to a number of 47 374 digits. The cube has been solved by means of a modification of Cage method.

121x121x121 Rubik's cube

In September 2013, Adrian Acosta solved this giant cube in 89 hours, 2 minutes and 2.26 seconds of solving time. He spent 2 106 hours (i.e. about 3 months) on his attempt in total. Number of combinations is equal to a number of 56 334 digits. He used centers-first (edges-last) solving method and even though the method has been quite optimized, he needed 623 523 moves to solve the cube.

128x128x128 Rubik's cube

The biggest cube ever solved by a human being. Michael Gottlieb saw something like this on a screen in front of him at 7:09 p.m. on November 4, 2014:

128x128x128 rubik's cube

Fifteen days, one hour and 36 minutes later, he already got a solved puzzle. He hasn't been solving non-stop, he used only 7.3% of this time period. Therefore, his solving time was only 26 hours, 25 minutes and 18.52 seconds! He had to solve 96 776 cubies / pieces in total and that has been done using only 157 318 moves!!! His number of moves per second ratio (1.65) is remarkable as well! The number of possible combinations for this titan is represented by 63 055 digits (although the calculator linked above gives a value of 63 071 digits - it is probably not designed for such unimaginably large numbers; the programmers made a mistake somewhere - last checked in December 2014). Michael, similarly to his attempt on a 111x111x111 cube, used modified / optimized Cage method.



The page was graphically improved by Conrad Rider and Ken Silverman (see a link above).

ADVERTISEMENT:
„Pes, kterého uzdravíš, tě nikdy nekousne. To je hlavní rozdíl mezi zvířetem a člověkem.“ Mark Twain