figure-it-out.md (18734B)
1 <script src="https://cdn.cubing.net/v0/js/cubing/twisty" type="module"></script> 2 3 # Rubik's cube: how to figure it out 4 5 So you decided to try and solve a 6 [Rubik's Cube](https://en.wikipedia.org/wiki/Rubik%27s_Cube). Maybe it 7 is for a bet. Maybe your parents grounded you for playing too much 8 Minecraft and now you have to find an off-line hobby. Maybe you have 9 been fascinated by this toy since you were a kid and now that you have 10 retired from work you finally have the time to try and solve it. 11 12 Of course it is and all you have to do it to learn how to solve 13 this puzzle is asking your favorite search engine (or AI? I guess search 14 engines are *so* 2021...). Sure you can do that, and you will find plenty 15 of tutorials that teach you how to build it up *layer by layer*, and with 16 the help of some pre-mmemorized sequences of moves you can easily learn 17 it in a few hours (or days). Also, there are probably apps that can take a 18 picture of a scrambled cube and tell you how to solve it move by move. 19 20 But that feels a bit like cheating, doesn't it? What if you want to 21 figure it out on your own, without relying on someone else's instructions? 22 23 This is where this page comes in. Here I will try to explain just enough 24 about the Rubik's cube so that you can try and tackle it alone. After 25 explaining some basics about how the cube works as a 3D puzzle, I will 26 introduce a couple of general-purpose techniques to help you move the 27 pieces around, without telling you directly what steps to take. 28 29 So, let's dive in! 30 31 ## How it works 32 33 The first thing you should do to understand how the cube works is taking 34 it all apart and inspect the pieces it is made of and the mechanism 35 holding them together. 36 37 Well actually don't do it, just look at the picture below: 38 39  40 41 As you can see, there are three types of pieces: 42 43 * **The core**, consisting of 3 axes intersecting in the center. Some 44 screws and springs keep the **6 center pieces** attached to it, in such 45 a way that they can spin. This is what makes the faces turn. 46 * **Edge pieces**, with only two colored faces each. When the cube is 47 assembled, they lie between two center pieces. There are 12 of them. 48 * **Corner pieces**, with three colored faces each. When the cube is 49 assembled, each corner piece is adjacent to 3 edge pieces, and it 50 touches 3 center pieces "diagonally". There are 8 corner pieces. 51 52 So far so good. But what does this tell us about solving the cube 53 by turning its sides? 54 55 First of all, the fact that the centers are attached to the core implies 56 that their relative position does not change, ever. In other words, you 57 can think of the **centers as fixed** pieces, and **build the rest 58 around them**. 59 60 Another important thing that is made clear by looking at the disassembled 61 cube is that **you should think about pieces, not stickers** or colors. 62 When naïvely attempting to solve the cube without a clue, many would 63 think about "moving this color there". But what you have to always keep 64 in mind is that you can never move a single colored sticker: the other 65 colored stickers attached to the same piece, be it an edge or a corner, 66 will always move with it. 67 68 Now we are ready to move on to some fundamental techniques. If you have 69 actually disassebled your cube, put it back together *in a solved state*: 70 if you don't, there is a good chance (11 out 12) that you will reassamble 71 it in an **unsolvable state**, just like a 72 [15 puzzle](https://en.wikipedia.org/wiki/15_Puzzle) with the 73 last two number swapped. 74 75 ## Building blocks 76 77 Most methods to solve a Rubik's cube a divided into steps, where: 78 79 * In the first few steps, you put together blocks of pieces. This is 80 also known as **blockbuilding**. These steps are often "intuitive", 81 which means that they do not require memorizing sequences of moves 82 to apply blindly. 83 * In the last few steps, you need to move around a few remaining pieces 84 without destroying the progress made in the previous steps. Most of the 85 time steps like these rely on memorized sequences of moves that are known 86 to only affect the position of certain pieces; but there are alternative 87 approaches, as we will see later. 88 89 So, what do we mean exactly by "block of pieces"? To be precise we could 90 say that two or more adjacent pieces form a block when adjacent stickers 91 of different pieces have the same color. For example, the simplest kind 92 of block is a **pair**, that you can see in the picture below: 93 94  95 96 To be precise, the one above is a coner-edge pair. There are also center-edge 97 pairs, consisting of a center and an edge, but they are rarely referred to 98 as "pairs". In any case, they do fit our definition of "block". 99 100 A more complex example of a block is a **layer**, which is the result of 101 the first two steps of the classic "layer by layer" method. This one is 102 a correctly solved layer: 103 104  105 106 On the other hand, this is **not a layer**: 107 108  109 110 It is worth pausing here to reflect a bit. The last two pictures both 111 clearly show a solved white face, don't they? For a most people, they 112 could look equivalent. But remember what we said earlier: you should 113 think about *pieces*, not *stickers*. In the last picture, the pieces 114 have all white on top, but their side colors do not match (except for 115 the blue-white edge and the blue-orange-white corner). So they do not 116 form a block, which means that their **relative position** is incorrect. 117 By contrast, the second to last picture shows a block: all side colors 118 match, not only the white top. This means that the pieces are in correct 119 relative position with respect to each other. 120 121 With this in mind, you can starting making your own way through 122 the first few steps of your solving method: try to build multiple 123 blocks of pieces and put them together to make even bigger blocks. 124 125 If you want some more hints, Ryan Heise's website contains some nice 126 examples about building blocks in his 127 [fundamental techniques page](https://www.ryanheise.com/cube/fundamental_techniques.html). 128 129 *Note: I have updated this page to use [twizzle](https://alpha.twizzle.net) 130 applets instead of simple pictures. These applets can be played to show the 131 solution. To experiment around with this solution, click on 132 the TW at the bottom right to open them in 133 [twizzle](https://alpha.twizzle.net/). In this way you can also 134 check which moves correspond to the written notation, if you 135 are not familiar with it.* 136 137 ## Commutators 138 139 *In the rest of this page I am going to use the standard 140 [Rubik's cube notation](../notation) to write down sequences of moves. 141 You should familiarize with it at least a bit before continuing. Don't 142 worry, it's very easy.* 143 144 The more blocks you build, the harder it becomes to make progress. The 145 reason for this is that you want to avoid destroying the blocks you 146 have already built, so your options become more and more restricted 147 as you go. This is completely normal. 148 149 The most common speedsolving methods go around this issue by 150 prescribing the use of memorized sequences, somewhat improperly 151 called "algorithms". For example the layer by layer method relies 152 on blockbuilding to build the first layer, but on at least 5 153 "algorithms" to complete the last two layers. The more advanced 154 [CFOP](https://www.speedsolving.com/wiki/index.php/CFOP_method) method 155 uses blockbuilding for the first two layers, but it then requires 156 78 different "algorithms" to complete the last layer. 157 158 Here I am going to outline an alternative, more flexible approach, 159 based on 160 [commutators](https://www.speedsolving.com/wiki/index.php?title=Commutator). 161 They are generally considered an advanced technique, I believe that 162 they are perfectly fine to learn as a beginner. Ryan Heise's page that 163 I linked above has a 164 [section about them](https://www.ryanheise.com/cube/commutators.html), 165 too. 166 167 If you have not done it already, you should have a look at my page on 168 [the Rubik's cube notation](../notation) before continuing. 169 170 ### Corner commutators 171 172 Suppose that you manage, via blockbuilding, to reach the following state: 173 174 <center> 175 <twisty-player experimental-setup-alg="[U, R' D R]" 176 alg="R' D R // Insertion 177 U // Interchange 178 R' D' R // Inverse insertion 179 U' // Inverse interchange"></twisty-player> 180 </center> 181 182 First of all, this would be an amazing achievement! The whole cube is 183 solved except for three corners. The bottom-left corner (only one red 184 sticker visible) is white-green-red, and it should go to the place where 185 the white-red-blue corner is right now. The latter should in turn take 186 the place of the corner on the right whose visible stickers are orange 187 and yellow (the hidden sticker being green). In Mathematical terms, these 188 3 corner form a **permutation cycle of 3 pieces**, or 3-cycle for short. 189 190 Commutators are a general technique to solve 3-cycles of pieces. They 191 can be decomposed in 4 small steps: 192 193 1. **Interchange**: a single move that interchanges two of the three 194 pieces. 195 2. **Insertion**: a sequence of moves (usually 3) that inserts the third 196 piece into the place of one of the other two, without affecting the 197 "interchange" face of the cube in any other way. 198 3. **Inverse interchange**: the inverse of the move done in step 1. 199 4. **Inverse insertion**: the inverse of the sequence of moves done in step 2. 200 201 **Note:** step 1 and 2 can appear in the other order; if they do, steps 202 3 and 4 should also be swapped. 203 204 Let's look at an example. From the position in the picture above, you 205 can interchange the top two corners using the move U. More precisely, U 206 brings the orange-yellow-green corner into the position currently occupied 207 by the white-red-blue corner. The move U' also works, as it moves the 208 white-red-blue corner to the position of the orange-yellow-green one. 209 210 An interchange move is worth nothing without a compatible insertion 211 sequence. In this case, you can use R' D R as insertion: this sequence 212 of 3 moves moves the red-green-white corner to the place currently 213 occupied by the white-red-blue one and, very importantly, **it does not 214 affect any other piece in the U layer**. To put it in another way, 215 **the interchange and the insertion only "clash" on one corner**. 216 217 The last thing to decide before we put all of this together is which 218 one should go first: the interchange or the insertion? This is not hard 219 to figure out: I described both of them as "moving a certain piece into 220 a certain position"; only one of the two moves a piece in its correct 221 final position, and that is the sequence that must go first. In our case 222 it is the insertion, because the red-green-white corner's final position 223 is the one occupied by the white-red-blue one. 224 225 So our commutator looks like this: R' D R U R' D' R' U'. Let's split 226 this up to review it: 227 228 * **R' D R**: the insertion sequence, moving the red-green-white corner 229 to the position of the white-red-blue one. 230 * **U**: the interchange move, moving the orange-yellow-green corner 231 to the position now occupied by the red-green-white one. 232 * **R' D' R**: the inverse of the insertion sequence. To invert a sequence 233 of moves, you have to **read it backwards inverting every single move**. 234 Here we start with R', because it is the inverse of R, the last move of 235 the insertion sequence; then we have D', the inverse of the second move; 236 and finally R, the inverse of the first move of the insertion sequence. 237 * **U'**: the inverse of the interchange move. 238 239 **Note:** looking at the position of the pieces is not enough to 240 determine a correct commutator to permute them. Their **orientation** 241 is also important. For example, consider the following case: 242 243 <center> 244 <twisty-player experimental-setup-alg="[R', U L' U']" 245 alg="R' D R // Insertion 246 U // Interchange 247 R' D' R // Inverse insertion 248 U' // Inverse interchange"></twisty-player> 249 </twisty-player> 250 </center> 251 252 The three corners are permuted in exactly the same way, so everything 253 we said above could be repeated word by word, move by move. However, 254 if you apply the commutator we constructed to this case, you'll get 255 something like this (you can also see this by playing the applet above): 256 257 <center> 258 <twisty-player experimental-setup-alg="[U, R' D' R D R' D' R]"> 259 </twisty-player> 260 </center> 261 262 What's wrong here? Well, obviously the cube is not solved. All the pieces 263 are in their correct position, but two corners are twisted in place! 264 265 To avoid situations like this when creating your commutators, you need to 266 keep track of **which sticker goes where**. I know, I know: I said at the 267 beginning that *pieces* are important, not *stickers*. This is still true, 268 but sometimes it is important to keep track of both. 269 270 Let's highlight the difference between the two 3-cycles. In the first one: 271 272 <center> 273 <twisty-player experimental-setup-alg="[U, R' D R]" 274 alg="R' D R // Insertion 275 U // Interchange 276 R' D' R // Inverse insertion 277 U' // Inverse interchange"></twisty-player> 278 </center> 279 280 1. The red-green-white corner must go to the place of the white-red-blue one, 281 *with the white sticker of the first going to the place of the white sticker 282 of the latter*. 283 2. The white-red-blue corner must go to the place of the 284 orange-yellow-green one, *with the white sticker of the former going to 285 the place of the orange sticker of the latter*. 286 3. The orange-yellow-green corner must go to the place of the red-green-white 287 one, *with the orange sticker of the former going to the place of the 288 white sticker of the latter*. 289 290 While in the second case: 291 292 <center> 293 <twisty-player experimental-setup-alg="[R', U L' U']" 294 alg="U L' U' // Insertion 295 R' // Interchange 296 U L U' // Inverse insertion 297 R // Inverse interchange"></twisty-player> 298 </twisty-player> 299 </center> 300 301 1. The red-green-white corner must go to the place of the white-red-blue one, 302 *with the white sticker of the first going to the place of the* **blue** *sticker 303 of the latter*. 304 2. The white-red-blue corner must go to the place of the 305 orange-yellow-green one, *with the* **blue** *sticker of the former going to 306 the place of the* **green** *sticker of the latter*. 307 3. The orange-yellow-green corner must go to the place of the red-green-white 308 one, *with the* **green** *sticker of the former going to the place of the 309 white sticker of the latter*. 310 311 The main point here is that not only interchange and insertion moves 312 should swap the correct pieces around, but they must also move each 313 "reference sticker" to the position of the next "reference sticker". 314 For example, using the commutator R' D R U R' D' R U' for the second 315 case does not work, because the insertion sequence R' D R moves the 316 white sticker of the red-green-white corner to the position of the 317 red sticker of the white-red-blue one, while it should move it 318 to the position of the blue sticker! 319 320 ### Edge commutators 321 322 So far I have only talked about *corner* commutators, but what if you 323 are also left with some unsolved edges? For example, consider this case: 324 325 <center> 326 <twisty-player experimental-setup-alg="[L' U2 L, E']" 327 alg="E' // Interchange 328 L' U2 L // Insertion 329 E // Inverse interchange 330 L' U2 L // Inverse insertion"></twisty-player> 331 </twisty-player> 332 </center> 333 334 The picture shows a 3-cycle of edges. You might think that the same 335 reasoning can be applied and that you can use commutators to solve 336 edge 3-cycles of edges. This is exactly the case, and this is why this 337 subsection is so short. 338 339 Let's see how to solve the case above. As interchange move, you can use 340 the **inner-layer move** E' (check out the [notation page](../notation) 341 if you are unfamiliar with these). The insertion sequence to be used 342 with it is L' U2 L. Putting everything together, you get 343 E' L' U2 L E L' U2 L. 344 345 ### Commutators with set-up moves 346 347 At this point I have good news and bad news. 348 349 The good news is that commutators are so powerful that you could solve 350 the whole cube using just commutators and at most one single move (this 351 sentence might sound a bit strange, but it is Mathematically correct - 352 the best kind of correct). Although it would not be very efficient, you 353 could avoid blockbuilding altogether and move pieces around 354 only with commutators - this is how advanced 355 [blindsolving](https://www.speedsolving.com/wiki/index.php?title=Blindfolded_Solving) 356 methods work. 357 358 The bad news is that not every 3-cycle can be solved directly with a 359 commutator, at least not one of the form I described above. Sometimes 360 you need to use **set-up moves**, also known as 361 [conjugates](https://www.ryanheise.com/cube/conjugates.html). 362 363 Consider the following case: 364 365 <center> 366 <twisty-player experimental-setup-alg="[L: [R D2 R', U']]" 367 alg="L // Set-up 368 U' // Interchange 369 R D2 R' // Insertion 370 U // Inverse interchange 371 R D2 R' // Inverse insertion 372 L' // Inverse set-up"></twisty-player> 373 </center> 374 375 No matter how much you try, you are not going to find valid interchange 376 and insertion moves as above. The fundamental problem is that you would 377 like to use U (or U', or U2) as an interchange move, but this move affects 378 all 3 of the corners. You might think of using R or F as interchange; they 379 do affect only two of the pieces, but they do not move the the stickers in 380 the correct position: any commutator based on R or F as interchange move 381 would lead not to a solved cube, but to some corners twisted in place. 382 383 So, how can we deal with this case? The solution is to use one or more 384 moves to set up a better case. These moves will be done at the 385 beginning and then undone at the end. 386 387 For example in this case you can start by doing L as a setup move. 388 This has the effect of moving the white-red-green corner out of the U 389 layer, so that you can then use U (or rather, U') as interchange move. 390 The insertion sequence that makes it all work here is R D2 R', and 391 putting it all together you get: 392 393 * Set-up: L 394 * Interchange: U' 395 * Insertion: R D2 R' 396 * Inverse interchange: U 397 * Inverse insertion: R D2 R' 398 * Inverse set-up: L' 399 400 **Note:** in this case the insertion coincides with its inverse. This 401 can happen and there is nothing particular about it. 402 403 ## Conclusion 404 405 With what you have learned so far, you can now try and solve the Rubik's 406 cube on your own, without further help. Granted, it won't be a walk 407 in the park: this short tutorial is not meant to explain everything. I 408 could have given you advice on which blocks to build first or on when to 409 stop building blocks and start using commutators, I could have shown you 410 many more examples, I could have told you how to address tricky cases 411 like permutation parity or pieces twisted in place. But I think it can 412 be more fun to try and figure all of this out by yourself - and if you 413 disagree, just look for a more complete tutorial online. 414 415 Happy cubing!