Cube Theory; The Fascinating Math Behind the Rubik’s Cube

     The Rubik’s Cube may seem like cubes randomly rotating around a core with no meaning. Well, technically it is… BUT, the point is that there’s a lot of underlying mathematics about the cube and its many permutation groups and probabilities, that you don’t necessarily need to understand. However, learning about it will give you a new perspective and hopefully a greater appreciation for this seemingly naive puzzle. This article will go quite in-depth with some topics but there will always be a summary at the start of each paragraph. 

     There were three research papers used to gather information for this article. 2 were titled “The Mathematics of [the] Rubik’s Cube,” one by UC Berkeley, and the other by MIT. I also used a paper by the MAA primarily for information about god’s number. They are cited throughout the article and you can find more info by simply searching up “the math behind the Rubik’s Cube” on Google. 

43 Quintillion

     We’ve all heard this number: the number of possible states the Rubik’s Cube can take. But how exactly do we get to this number? Here’s how. Basically, we need to find the possible orientations of the corners, multiply that by the possible orientations of the edges and then divide that by all the parity cases. There is an excellent explanation of this process in a research paper at MIT (yes MIT!), that showcases it very well:

Parity

     Any move or algorithm on the cube is a product of 2-cycles, meaning an even number of pairs of pieces will always be moved. In this case, a 2-cycle is not a 2-cycle of pieces, but a 2-cycle of facelets. We can prove this by first representing a 2-cycle of pieces like (x,y). X and Y are the corresponding numbers of 2 faces (refer to the diagram above). This means that a two-cycle like (21, 28) would be the same as flipping an edge of the cube. Then we can show that all possible cycles are a product of two cycles: 

And so on. This is helpful for a more mathematical proof of parity because we can then use the fact that every move on the Rubik’s Cube (F, R, U, etc.) can be written as an EVEN product of 2-cycles. For example, F the move F can be written as F = (FL FU FR FD)(FUL FUR FDR FDL) in terms of 4 cycles which is 3 2-cycles: (FL FU)(FL FR)(FL FD)(FUL FUR)(FUL FDR)(FUL FDL) which is an even number of 2-cycles. Since a move like F is even, all other face turns are even because they are the same transformations as F, just with the cube rotated to a different position. Cycles of 2-letter pieces like FR represent edges and 3 letters like FUL represent corners. This means that by only using outer turns – which are the only move you can do on 3×3 – the 3×3 Rubik’s Cube can never reach a parity state because there are always an even number of 2-cycles happening. Notice how the number of corner swaps and edge swaps are both even. 

Then How Does Parity Happen?

4×4 Parity

     Whenever two corner pieces are cycled, two edge pieces also have to be cycled. This is why parity cannot exist on a 3×3 because the number of edge and corner swaps is always the same, OR, there has to be an even number of both or an odd number of both. For example, in T-Perm, it’s almost a 2-corner swap but 2 edges also have to be swapped because if it was 1 corner swap and 0 edge swaps then there would be an even number of edge swaps and an odd number of corner swaps which isn’t allowed. Parity happens on larger puzzles like 4×4 because slice moves cycle 3-edges but 2 wing pieces! This means that if we do an odd number of slice moves during the solve then we will run into parity because 3(2n+1) is 6n+3 which is odd and 2(2n+1) is 4n + 2 which is even. This is why OLL parity is also called odd parity because it only happens when you do an odd number of slice turns. 

     PLL parity is a special parity because it’s not technically parity. This is because it’s actually 2 2-swaps of the wing pieces which is an even number of swaps. It just seems like parity because it’s not a possible PLL case in 3×3. 

43 Quintillion Put Into Perspective

Different representations of the number as found on WolframAlpha

     Here are some interesting comparisons to put the total number of unique Rubik’s Cube states into perspective. 

  • A straw of hay is about 1 gram. For a 2,000-pound haystack, that works out to about 1,000,000 = 106 straws in a haystack. In other words, finding a needle in a haystack is more than 1013 times easier.
  • If you stacked sheets of paper on top of each other until the total thickness reached the moon, the number of sheets would be over a million times smaller than this number of cube positions.
  • The largest publicly known database in commerce or government is at the World Data Centre for Climate, with about 6 petabytes, or 6 × 1015 bytes. The “Rubik’s Cube database” is over 7,000 times larger.

One thought on “Cube Theory; The Fascinating Math Behind the Rubik’s Cube

Add yours

Leave a comment

Blog at WordPress.com.

Up ↑