Open In App

Algorithm to solve Rubik’s Cube

A Rubik’s Cube is an interesting puzzle invented by ‘Erno Rubik’ which has 43 quintillion possible configurations. But with the use of certain algorithms, it can be solved easily. There are many variations of the Rubix cube nowadays but the most basic one is the 3x3x3 Rubik’s cube.

A 3x3x3 Rubik’s cube is made by joining 21 pieces: 1 principle piece with three axles, 8 corner pieces (corner solid shapes) with three tones, and 12 edge pieces (edge 3D squares) with two tones.



Note-
Centerpieces are always at their original position only.



Basic Rotations Of Rubik’s Cube:

Beginners Method:
The easy solution to solve a Rubik’s cube is to follow the approach to first solve the bottom layer, then the middle layer, and then finally the top layer.

Below are the steps to solve a Rubik’s cube-
Step 1: First choose a centerpiece of any color (say white) and then make a white cross by bringing all the four edge pieces adjacent to the white center.

Step 2:  Match colors of all four centerpieces of the lateral face with the edges of the bottom layer one by one and sending the matched pairs in opposite directions and then bringing them again to make a cross of white.

After matching all the layers, the cube will look like this-

Step 3: Set corners of the bottom layer by first matching the correct corner matching its desired color. Then apply the algorithm R U R’ U’ and repeat the same algorithm till the bottom corner piece is set at its correct position as shown below

After setting all the corners, the cube will look like this-

Step 4: Make the second layer by matching all four edges at the lateral faces. First, match the color of the top layer edge with its center layer and observe the other part of the piece i.e top facing color.

After applying this to all other pieces, the cube will look like this-

Step 5: Make the yellow cross on the top layer by applying the simple algorithm  F R U R’ U’ F’  1-3 times as shown below.

Step 6: Now match any one edge of the top layer with the centerpiece in the middle layer, and then apply the algorithm F R U R’ U’ F’ until all the edges are matched.

Step 7:  Now to match all the corner pieces on the top layer, first see the corner which is already being matched and keep it as the front face and towards the right. If none of the corner pieces are in the right place, you can hold the cube in any orientation with the unmatched pieces on top and apply the algorithm U R U’ L’ U R’ U’ L.

After applying this algorithm 1-3 times the cube will look like-

Step 8: In the final step keep yellow as the front face and start from any corner apply the algorithm U R’ U’ R until the corner arranges correctly, then rotate the top layer to bring another disarranged corner on the top right side and repeat U R’ U’ R algorithm again to arrange it, and so on. After arranging all the corner pieces, just move the yellow facing layer 1-2 times if needed to completely solve your cube.      

With this final step, the Rubik’s cube is finally solved.

Also Read – How to Solve a 4×4 Rubik’s Cube

Article Tags :