Mathematicians love the Rubik’s Cube. There’s no denying it. They room amazed at just how such a seemingly simply puzzle can hold so plenty of secrets. There is always something brand-new to learn around the cube (if you space willing come learn, the course). Probably the biggest an enig of all, one that took end 30 years for mathematicians to crack is God’s Number.

You are watching: Algorithm to solve rubik’s cube in 20 moves


God’s Number, as plenty of cube enthusiasts will currently know, is the maximum variety of moves forced to solve any of the 43,252,003,274,489,856,000 combinations of the cube. It has actually been proven the this number is 20 (, yet the discovery is fairly recent (July 2010). The term “God’s Number” was coined since the mind of a gift able to find the shortest succession of move to solve any scramble succession would need to be countless times an ext powerful 보다 our own, maybe to test millions of different combinations in the blink of one eye, something the mathematicians think only a divine being could possess.

This number may seem low, but theoretically it should be even lower. Only about 490,000,000 combinations call for the full 20 move to it is in solved. Return 490 million is a huge number, that is just a portion of the 43 quintillion feasible combinations (0.0000011328955% to it is in precise). The chances of generating a random scramble that deserve to only be fixed in 20 moves, no an ext no less, is about 1 in a billion. However, the number of combinations that can be fixed in 19 move is roughly 1.5 quintillion. This means that God’s Number is lot closer come 19 than 20, yet unfortunately even if only 1 scramble succession was difficult to settle in much less than 20 moves, God’s Number would still it is in 20.

The Super-Flip

Perhapsthe most renowned of the rare scrambles that require specifically 20 move to deal with is the super-flip position (pictured). This is accomplished by performing the adhering to sequence of move - R l U2 F U’ D F2 R2 B2 l U2 F’ B’ U R2 D F2 U R2 U from any orientation. The position is recognisable as every solitary corner is resolved in that is place, if every single edge is flipped in that is place. This was additionally the an initial position that was found that might not be fix in much less than 20 moves, raising the lower bound that God’s Number come 20 in 1995.

History that God"s Number

Work began on the search for God’s Number earlier in 1981, as soon as a male named Morwen Thistlewaite showed using a complicated algorithm he devised himself the 52 moves was sufficient to solve any type of of the 43 quintillion different scrambles. This number began to fall slowly together better, more efficient methods were devised for fixing the huge variety of possible combine in the fewest move possible.

Of course, not all 43 quintillion combinations to be tested personal by computers. Numerous ingenious fads were spotted to alleviate this number come a fraction of its original quantity. Because that example, if you to be to execute the super-flip algorithm top top a Rubik’s Cube and rotate the whole cube through 180 degrees, girlfriend would have actually theoretically created an additional of the 43 quintillion combine without increasing the number of moves required to solve it. The reason for this is because 43 quintillion is the variety of positions, no the number of fully unique patterns. If you were to host the white confront on the top and the green face on the front, that would be one position. If you were to turn the puzzle therefore you room still hold the white confront on the top but instead you had actually the red challenge on the front, you would have one more position. Therefore, by multiply the number of different possible “top faces” (6, one because that each colour) by the variety of different feasible “front faces” because that each various “top face” (4), you would be left v 24 different ways to position the cube for any given state. This immediately reduces the enormous number of 43 quintillion possible positions that would actually must be experiment to 1,802,166,800,000,000,000 (a mere 4% the the original number). Through factoring in other similarities such as mirrors, this number reduces further, do God’s Number much less complicated to calculate.

Two different “positions” the end of the 43 quintillion possible

God’s Number can likewise be applied for various other twisty puzzles, such as using an initial Rubik’s Cube with certain restraints, or using smaller sized or enlarge puzzles. God’s Number because that a Rubik’s Cube resolved using only quarter turns (where no challenge can it is in rotated more than 90 levels at a time either clockwise or anticlockwise) has been proven much much more recently (2014) to it is in 26 moves.

God"s Algorithm because that 2x2x2 Cubes

God’s Number for the 2x2 puzzle (having only 3,674,160 various positions) has been proven to it is in 11 moves utilizing the fifty percent turn metric, or 14 using the quarter turn metric (half transforms count as 2 rotations). Unfortunately God’s Number has yet to it is in calculated because that the 4x4 cube, or higher.

The Devil"s Number

As we have discussed on the mathematics of the Rubik"s Cube page, every algorithm (permutation) has actually a degree in group theory. Every sequence of moves, if repeated enough times, will return the cube come the initial state. For instance a simple face turn requirements 4 repetitions, the R"D"RD algorithm needs to be used six times, going through 24 states.

Obviously, there"s an algorithm that goes with all 43,252,003,274,489,856,000 feasible positions that the cube. If we would use this algorithm to any kind of random scramble climate it would absolutely go thorugh the addressed state at some point.

The Devil"s algorithm is about about searching for the smallest number of moves essential to visit every place at the very least once. One algorithm, that applied repeatedly to any type of scramble will go back to the addressed state, no necessarily at the end of the the sequence. Devil"s Number is the amount of move in the shortest algorithm that does this.

Imagine that you could solve the Rubik"s Cube knowing just one algorithm. The difficulty is the this would certainly be extremely long. Finding the Devil"s algorithm is lot much harder than finding the optimal solution.

The fact is that us still don"t understand the Devil"s algorithm because that the 2x2x2 cube, in spite of that it has much fewer possible positions. So don"t mean this to be found for the Rubik"s Cube any type of time soon. Unfortunately the numbers room so imaginably high that also the 2x2x2 attempts have actually failed.

Let"s see an instance for the Devil"s algorithm. If we scramble a 2x2x2 cube permitting only fifty percent turns, we deserve to come earlier to the solved place repeating the following: R2 U2 R2 U2 R2 B2 R2.

Fewest move challengein official competitions

In main Rubik’s Cube competitions hold by the human being Cube association (WCA), over there is an occasion called Fewest relocate Count (FMC), which involves taking a random computer system generated scramble and solving the in as few moves together possible. A computer would be able to find the most effective solution possible that takes the the very least amount of moves in seconds, but in this event competitors have 1 hour to try and find the most effective solution that they physical can. The people Record for this occasion went below 20 moves many times. In 2019 Sebastiano Tronto (Italy) discovered a solution on an official competition in 16 moves. Store track that the advancement of FMC documents on the official WCA website here.

To conclude, God’s Number is a fascinating theory. It shows us just how such a straightforward looking puzzle can have over 5 and a half times an ext combinations 보다 there space grains the sand ~ above the Earth, and also it additionally proves that computer systems will always be infinitely better than people at nearly any task.

See more: Are Ed And Lorraine Warren Still Alive Today, The Conjuring 3: Who Are Ed And Lorraine Warren

Computer programs

The Cube explorer program by the German mathematician, Herbert Kociemba is able to find the optimal systems in 20 procedures using the fifty percent turn metric (half transforms count as one move). Test our program which is making use of the very same algorithm. It"s looking for the systems in 20 moves but if the regimen doesn"t return any result below the moment threshold climate it switches come 24 measures which is also very close to the God"s number.