# Understanding Rubik's cube [duplicate]

I learnt how to solve a 3x3 Rubik's cube 10 years ago. Every now and then, I picked up a cube, scrambled it, and solved it for fun. I used to work on speed-solving, and memorised lots of formulae for it. However, now I'd like to go a different way: I'd like to solve cubes using the minimal amounts of formulae.

### F2L (First Two Layers)

For experienced players, it is clear that with F2L-methods one can solve the first two layers without memorizing any formulae, simply by forming bottom cross, building the 'pillars', and installing the pillars.

### Top Cross

I cannot see clearly why the formulae [R'U'F'UFR] (center->bar->L->cross) work, but I have an explanation for it: There are several ways to uninstall and reinstall the pillars that we have installed in the F2L method. By observing what the reinstallations do to the top face, at the end of the day one can write down those that help form the top cross.

### Top Face

The formulae [RU'L'UR'U'L] are similar to the above, but it 'reinstalls' two pillars at the same time.

### Last layer

This is what I really cannot see/understand. I don't even know how people came up with these formulae..

## Questions

1. Does anyone know how people came up with the formulae for the last layer?
2. How to better see how the "reinstallations" work for the top face. I know this question is very vague; I am just giving a shot to see if someone has a good way to look at them.

Thank you!

## marked as duplicate by user21820, YuiTo Cheng, cmk, José Carlos Santos, The CountJul 2 at 0:52

• There are quite a lot of different methods for solving the last layer. You need to (a) position the corners correctly, (b) position the edges correctly, (c) orient the corners correctly, and (d) orient the edges correctly -- but these four tasks can be attacked in 24 different sequences, and at least half of the possible sequences seem to have their proponents. So when don't specify a particular method and you just say "last layer" and "these formulae", it is impossible to tell which particular combinations you're talking about here. – Henning Makholm Jun 21 at 23:13
• (I do dbac myself, which doesn't win any speedcubing competitions but seems reasonably rememberable to me. The cool kids seem to follow entirely different paths, and at competition level they might have practiced hundreds of combinations that do two of the steps at the same time from particular starting points). – Henning Makholm Jun 21 at 23:21
• Some algorithms for the last layer were found by computer search. Some were found by accident. Most of them use some kind of symmetry, like: do a sequence of moves ABC etc., then another one XYZ, now invert the first sequence: C'B'A'. The idea is to undo some of the mess you did with ABC, but not all, because of XYZ. This leaves only a few changes to the cube, which is exactly what each algorithm does. – Wood Jun 22 at 0:26
• Mathologer has a good video on YouTube on how to create algorithms. – Cheerful Parsnip Jun 22 at 5:54
• Take a look at Solving Rubik's cube and other permutation puzzles, which gives a full mathematical treatment of most permutation puzzles. It's trivial to write a computer program to solve any Rubik's cube last-layer state, and some people memorize such sequences, but there is no understanding in doing that. – user21820 Jul 1 at 10:37

I'd like to solve cubes using the minimal amounts of formulae.

If you don't care about speed (but do care about keeping in your head what you're doing), you can reasonably get it down to five:

1. Something to cycle three corners, such as $$[F',UBU']= F'UBU'FUB'U'$$.

This, done on different sides in different orientations, lets you get the corner pieces in the right locations one by one.

2. Something to cycle three edges, such as $$F^2RL'U^2R'L$$.

This plus conjugations lets you put edges in the right place one by one.

3. Something to twist two corners, such as $$[RUR'U'RUR',D]$$.

4. Something to flip two edges, such as $$[R'LD^2RL'FDU'R,U]$$.

5. Something to correct if you find you need an odd permutation of the edges or corners so (1) and (2) does not suffice ... such as $$U$$.

If you don't even care about whether you can keep the administration in your head, you can in principle get down to two operations, and then you don't even need to ever reorient your cube between them: see here. But that's not really realistic as a method, so it becomes more a question how far you're willing to go in the name of fewer formulas, than of approaching a mathematical limit.

• Thank you! But could you please explain the definition of [XYZ..]? – Student Jun 22 at 12:36
• @Student: $[X,Y]$ is standard notation for the commutator $XYX^{-1}Y^{-1}$ (where $X^{-1}$ means the inverse combination of $X$). Note that there are always two parts inside the brackets, separated by a comma. – Henning Makholm Jun 22 at 12:50
• I see... I wonder why conjugates and commutators work so well in this type of cube puzzles... – Student Jun 22 at 12:55
• @Student: The way I think about commutators is that if each of $X$ and $Y$ upset only part of the cube, then everything that is touched only by $X$ is going to be undone by $X^{-1}$ later, and similarly for $Y$. The net effect of $XYX^{-1}Y^{-1}$ takes place only in the region of the cube that is touched by both $X$ and $Y$. This allows us to construct something with a small clean result out of an $X$ or $Y$ that leaves a lot of mess. – Henning Makholm Jun 22 at 13:05
• (In particular, if the touched areas of $X$ and $Y$ have only a single piece in common, their commutator will be an easily predictable 3-cycle. This can be an effective way of constructing basic building block for solving a new permutation puzzle). – Henning Makholm Jun 22 at 15:47

In this video, I show how to solve the entire cube using variations of "The formulae [RU'L'UR'U'L]" you mentioned. (Except that we include the move U to complete the sequence.) I also explain in the video how/why that sequence works. There are a few instances when you need to conjugate (use premoves/setup moves) before a variation of The Niklas Commutator (the algorithm above --with the added U move at the end --can be rewritten as [R, U' L' U], which is a commutator. It is called the Niklas commutator.) is used to solve some situations. Then those premoves/setup moves are undone afterwards.

If you are interested in learning even more about the scope of commutators, see my post here. More specifically, we can (in theory) solve every position with a single commutator + one move such as R or R2. So if you are actually talking about a "formula" which can represent the form of a solution to any position, then there is the formula. That is, [X,Y] + R or R2 can solve any 3x3x3 Rubik's Cube scramble.

But I am more inclined to think that you were asking about a move sequence. Well the video above demonstrates that direct variations (and conjugations) of one eight move commutator is sufficient to tackle the cube.

As far as answering how people came up with original sequences, this old answer of mine is in agreement with Wood. Furthermore, in the past, I went out of my way to decompose (and/or derive) well-known last layer speedcubing algorithms. See the links I provide in this post. This may "simulate" the type of logic which was used to find the algorithms.

And for what it's worth (expanding on the logic of how they found the algorithms), I don't know if you solved the 4x4x4 yet, but if you have, this guide was probably published in the 80's. One of the last figures on the last page shows the single edge flip case with this caption.

I'm not sure exactly when it was (no later than 1998) that this 25 90 degree rotation algorithm was found to fix that case directly. It was most likely found by a computer, but here is my (human) derivation of it. (Part 1, Part 2)

Well, I took the above challenge seriously (despite that I didn't see this particular guide before I did what I am about to state) and eventually found this 18 90 degree rotation algorithm by hand (in 2016). So in essence, I used a similar logic to what I showed above for 3x3x3 algorithms as I did for finding the above 18 move algorithm. So if there is a human logic base, besides accidentally finding it and/or using a computer, this should put up quite a case that my own logic process is the same that theirs was (since it is very fruitful and is not dependent on computer searches). I mean, you can (I eventually did) conduct a computer search to find the 18 move algorithm I did, but it wasn't how I originally found that 18 move algorithm, for example.

• Thank you for your explanation and effort! I don't know why someone votes your answer down, but I like it! – Student Jun 22 at 12:26
• I am now convinced that based on try-error, computer-search, and most importantly the notion of conjugation $gxg^{-1}$ is the key to find algorithm. – Student Jun 22 at 12:27
• However, abstract algebra (while powerful) is not intuitive enough. Maybe what I should have phrased: Is there a way to solve the last layer/face as intuitive as solving the first two layers? – Student Jun 22 at 12:35
• "Maybe what I should have phrased: Is there a way to solve the last layer/face as intuitive as solving the first two layers?" As you know, when solving the first two layers, you have a lot of freedom because a lot of pieces are not solved. When you get to the last layer, every move sequence you use will solve additional pieces (or get the pieces into a better position to be solved with the next sequence) while having to restore previously solved pieces. Therefore last layer algorithms naturally have a "different job" than algorithms for the first and second layers. – Christopher Mowla Jun 22 at 15:18
• The only way the "inuitiveness" of the last layer algorithms will be equal to that of the first two layers is if the first two layers is solved in a SIMILAR WAY in which the last layer is. This may mean that you would have to use a MORE COMPLICATED procedure to solve the first two layers, but it also means that you will be able to use a less-complicated procedure to solve the last layer. Now this "more complicated" procedure may not require more complicated moves. However, it WILL require a more involved LOGIC. – Christopher Mowla Jun 22 at 15:18