Solving the Rubik's Cube
Growing up, I never learned nor sought to explore the solution to a Rubik’s Cube; the puzzle simply didn’t pique my interest. Recently, however, I picked it up again and was extremely motivated to solve it. Something clicked in my brain and it became a tractable problem. However, I didn’t want to just look up and memorize the solution, but instead organically discover a solution.
Here, I will detail my process (retrospectively) for solving the cube. To figure out each step, I started by figuring out what permutations I could make that left the rest of the cube in tact. Then I determined out how useful those permutations were to the intermediate goals.
Note, I replace white (the more common color) with purple for the rest of the document because it is easier to see.
First Layer: Purple Cross + Corners
Since the rest of the cube can be freely altered, this step is relatively straightforward. I had learned these steps when I was much younger, and the intuition returned quickly. My methods for solving the first layer perfectly matched the popular methods found online and will not be rehashed here.
Second Layer: Edge Pieces
This step is where I started from complete scratch, having never solved before. My method ended up being exactly what’s described online, but I will include a brief description here to highlight my intuition for this step.
In order to change the other layers, we need to temporarily affect the purple layer. To make that change useful, we need to fix the purple layer in a different way than we originally messed it up. In other words, we need to find a permutation that doesn’t affect the purple layer. To do this, I replaced a purple corner and tried to put it back in a different way.
After finding that permutation, I looked at what happened to the edge pieces during that operation. I saw that the edge under the purple corner got moved to the bottom face, and similarly an edge from the bottom face came up to take its place. Now I just needed to make sure that edge was in the right spot when I did the permutation, and the edges fell into place.
Note, by adding one move to the permutation, we can align the red to its face. We intuitively view the permutation as rotating the edge. If none of the needed edge pieces were on the bottom layer or if the edge piece was flipped, then I did the operation on an edge I still needed to move it to the bottom layer, then began the process again.
Third Layer: Corner Positions
This step is where my methods diverge from popular online solutions, likely due to requiring a high move count. They are optimized for my intuition, not for the fastest solution. I initially tried to solve the yellow cross first, and successfully found several permutations that created the cross. But then I was stuck on re-orienting the corners.
So, next I tried manipulating just the corners regardless of the yellow edges. Using the exact same principles as above, I replaced a purple corner and tried to get it back in a different way. I came up with the following permutation.
This method may look a bit convoluted, but lets try to break down why this works. First, note we are only moving two layers of the cube and in such a way that no solved (dark grey) cubes are moved out of place, except for the red-blue edge! Try these movements yourself and see how quickly your sequence of moves is restricted. Now pay close attention to how the purple square moves around. The whole permutation essentially rotates the purple corner completely around so that it can be put back in place. Noticing these restrictions in movement made it easier to find a sequence of moves to rotate the purple cube around. Now at the end of the permutation the edge piece is in the wrong place. We can use the same algorithm we found above to put the second layer edge back in place.
Putting the two steps together we have the following:
Once I found this purple face preserving permutation, I noticed that it swaps two corners! So once I solved the second layer, I identified which corners need to be swapped and performed this algorithm. Most of the time, only two corners needed to be swapped, so I only needed to do it once. Sometimes it needed to be repeated to swap 3 corners. I note here, that this is normally the longest step for me.
Third Layer: Corner Rotations
Next, I wanted to get all the corners rotated correctly because I had already found some permutations that permuted the edges without rotating or affecting the corners. For this step, I quickly found a permutation that rotated the corners in peculiar way, but the challenge became to figure out the correct starting condition to get all the faces simultaneously. Below is the permutation.
Again, to figure this out, I started by coming up with a way to move the purple corner around. In fact, I actually discovered this method before figuring out how to swap corners. The key with this method was focusing on preserving the red-blue edge piece this time (as opposed to the above method where we let it get moved).
Now this was relatively simple to find, but tracking the corners to figuring out the needed starting condition was quite difficult. I noticed that as long as I ensured the top right corner was the only yellow face correct when starting, then repeating this algorithm would eventually work. I’ve included a fiew of the example cases here.
Example: Starting condition requires method two times and rotating in between (moving yellow back to top right before starting method again)
Example: Starting condition has 2 yellows correct.
This method always works, but as you can see the move count can drastically increase given different starting conditions. But it is simple to remember because it’s always the same intuitive movement.
Third Layer: Edge Flipping and Edge Cycling
Next I found two methods to flip edges and rotate edges around without affecting the other corners or faces. For these methods, I used a similar strategy of focusing on a purple edge piece. I tried to replace the purple edge piece and then put it back in a different way. This surprisingly lended itself to a lot of different options. The first one I found flipped two edge pieces.
The next permutation’s is less obvious; it cycles the edges around and rotates some of them. Note is it keeps the front face cube in place, and cycles the other edges around it as a tri-cycle. You’ll quickly notice it is the same method as the previous except the purple cube rotates twice in the middle, and thus has less steps at the end.
Now the difficult part is to figure out how to use these methods together to get all the edges. I then noticed a special case with the cycle method. When the starting condition is an H, then after cycling, it’s still an H!
Moreover, we can create an H, by flipping two edge pieces, rotating once, the flipping two edge pieces! From the H, we cycle the edges using the second method until all the edges are on the correct face. Then we perform the first method again twice, and the cube is solved. This last process is shown below.
- Move 1-17: Edge flipping
- Move 19-36: Edge flipping - H formed
- Move 37-48: Edge cycling
- Move 49-65: Edge flipping
- Move 67-84: Edge flipping - Solved
While this can require a ton of moves, it is always repeatable and works in any initial cube state. Sometimes, method 2 needs to be repeated twice, but it’s always method 1 then 2 then 1. If you ever get lost in the method, they both only require that you follow the purple edge and continue its trajectory intuitively back into place.
Comparing to other methods
Obviously, the more developed solutions are a balance between move count and ease of teaching. While my method tends to require more moves, I’ve found the underlying intuition in each of the steps simlpifies the method and helps prevent getting lost.
In the process of solving the cube, I actually discovered the conventional solution all the way until the last step, and I couldn’t orient the corners. So I went back to the drawing board and started with the corners, leading me to a completely different solution. Though some of my algorithms can be repurposed for similar operations such as making the yellow cross.