← Home ← Mathematics

God's number

God's number is usually used in context of Rubik's cubes. It takes at most 20 moves to solve a Rubik's cube; as such, God's number for the Rubik's cube (at least, the 3×3 one) is 20.

What is God's number?

A Rubik's cube is a very specific instance of a permutation group. The "moves" are a set of base permutations, with which all states of a Rubik's cube may be reached. This is generalizable to groups in general. For any group GG, we pick a certain number of elements a1,ana_1, \dots a_n. Our moves then are all powers of these moves. In terms of a Rubik's cube, we can start with turning each side once clockwise. The powers of those are then turning each side any amount of time. We do this so that, for example, a half turn on a Rubik's cube still counts as "one move". Then, we can create "layers", C1,C2,C_1, C_2, \dots, where C1C_1 is the collection of moves, and each CiC_i contains the elements from Ci1C_{i-1} and any uu such that there is a move mC1m\in C_1 and an xCi1x\in C_{i-1} with u=xmu = x\cdot m. In other words; CiC_i is the set of states you can reach by doing ii moves. Now, the smallest nn with Cn=Cn+1C_n = C_{n+1} is what we define to be "God's number".

Note that we might not reach the entire group GG. For a Rubik's cube, not every state is solvable; for example, swapping two corner pieces is impossible.

How do you find God's number?

That's a good question. Nobody knows, really, how to do it in the general case. It took until 2010 for mathematicians to figure out God's number for the Rubik's cube. And they didn't even really "prove" it in the traditional sense of the word, they ran simulations on many computers to show that any state is solvable in 20 moves. It's a proof, but it doesn't create understanding about the structures of groups in general or even about the Rubik's cube group specifically.

Layer sizes

Before, we defined layers CiC_i. These layers were cumulative, i.e. each CiC_i contains the Ci1C_{i-1} before it. We can therefore also define LiL_i such that L0={1}L_0 = {1}, L1=C1{1}L_1 = C_1 \setminus {1}, and Li=CiCi1L_i = C_{i} \setminus C_{i-1}. This way of thinking about the layers is helpful because it's a bit easier to think about what happens to their sizes. For the initial handful of layers, we know that the amount of moves more-or-less determines how many elements are in the next layer.

For example, for a Rubik's cube, there are 18 moves we can do at any given point. After having done a move, there are 15 possible moves that would not be mergeable with the previous move. So, L0L_0 just has the "solved" cube in it, i.e. 11; the identity permutation. Then L1L_1 has 18 moves. Now, we know L2L_2 has at most 181518\cdot 15 moves. It's not exactly that, because moving the top layer first, and then the bottom layer, is the same as doing it the other way around. Those positions are counted twice, so actually L2=243|L_2| = 243. But this line of thinking still works, and we find in general that the sizes of the layers rack up exponentially. However, at some point we find it goes back down (since Lg+1=0L_{g+1} = 0 for God's number gg). For Rubik's cubes, we see that the ratio between the sizes of the two layers sit between 1313 and 131213\tfrac12 right up until the 16th layer (according to cube20.org).

An idea

With this in mind, we maybe don't need to compute all the layers all the way till the end. If we look at their logarithmic sizes, perhaps there is something to deduce from how the layers grow in size and the rate at which is decreases compared to that exponential curve, what God's number will be.

I'll write some code to do some testing with this. To be continued…