Rubik’s Cube Secret: Algorithms Work

20161202_115557_resized
One of Tyler’s many Rubik’s cubes

Anyone who stops by my office will notice that I have many puzzles laying around my desk. There are blocks, rings, metal puzzles, wood puzzles, and my favorite, Rubik’s cubes of all sizes. I really enjoy the Rubik’s cube and it is often regarded as something only a few people are able to solve. To learn to solve this puzzle requires many hours of practice to reliably solve it every time.

I first learned how to solve the cube in high school when a friend of mine was solving one and when I tried, I could hardly get a few colors together. At first, I thought that it couldn’t be that hard, as it has been proven that from any position a maximum of 20 moves can solve any cube position. Little did I realize that there are approximately 43 quintillion possible different combinations of a cube and the puzzle is more difficult than it looks! After playing with the cube for hours and only hardly solving one side, I had my friend help me with the solution. There are different ways to solve the cube but I use a reliable method in which I complete the cube in a few steps. The secret I use is algorithms.

An algorithm is a set of instructions that when followed will produce a predictable outcome every time. Algorithms are common to both the software development I do each day and Rubik’s cubes. When writing code, algorithms follow a set of instructions to manipulate data in order to solve a specific problem. For the Rubik’s cube, this means that the instructions are turns of the cube and the predictable outcome is solving one part of the puzzle. I use about 7 different algorithms when solving the Rubik’s cube. The trick to these instructions is that each algorithm does not mess up the work of the previous one. In this way, it is possible to first solve one side of the cube, then the middle layer, and finally finish the top while not changing what has already been put in place. Using this method of a set of algorithms, I personally average about 2 minutes to solve each puzzle.

After learning how to solve the regular 3x3x3 cube, you can move on to larger cubes such as the 7x7x7, which happens to be the largest cube in my collection. The cubes with the odd number of pieces on a side are easier for me to solve, as the even ones require learning a few extra algorithms that the odd ones do not require. The way that I solve the bigger cubes is to first use a few algorithms to make the cube into a large 3x3x3 and then solve it like a normal 3x3x3. Once you learn how to solve a larger cube, you could solve any size cube. With the same set of algorithms it is possible to solve something such as a 99x99x99 or even larger if these could be made.

I hope this has revealed some of the mystery about the Rubik’s cube and how it is solved. It is a great feeling of accomplishment solving this puzzle. There are many resources online that will give a detailed description on each algorithm and how to solve the cube step by step. I hope you enjoy this puzzle as much as I do. Happy solving!