# How do Rubik's Cube algorithms work?

#### cafeinst

##### Member
Solving the first two layers of a Rubik's Cube is very intuitive. One can watch the algorithms in action and see exactly why they work. However, when using known algorithms to solve the third layer of a Rubik's Cube, they seem to just work by magic, with no explanation. Is there a way to explain why such algorithms work? Are there basic principles for understanding these algorithms?

##### Member
Generally for most algs you can break the algs down into steps which each perform a specific task eg Start with one corner at LUF (corner A) and the other corner at FDR (corner B). Then do:

R'D - twists the B corner
L2 - swaps the B and A corners
D'R - twists the A corner on the way back.

On the other hand, some aldorithms can be explained in a more intuitive way and these are called commutators. They take the form ABA'B' where A' is the inverse of A. These only affect pieces which are at the intersection of A and B (or example, U2 R2 U2 R2 -U2 and R2 are self inverse- only affects the edges which are altered by both the R2 and the U2).

Many algorithms also contain conjugates which are of the form ABA' and this is often used in blindsolving (in old pochman and M2/R2 at least) where certain pieces are moved to be affected by another algorithm which usually does something else for example swapping 2 corners in OP.

Hope this helps!

#### DELToS

##### Member
It's kinda-ish simple-ish how algs work: they scramble something, do something useful, and restore.

#### jaredye

##### Member
Generally for most algs you can break the algs down into steps which each perform a specific task eg Start with one corner at LUF (corner A) and the other corner at FDR (corner B). Then do:

R'D - twists the B corner
L2 - swaps the B and A corners
D'R - twists the A corner on the way back.

On the other hand, some aldorithms can be explained in a more intuitive way and these are called commutators. They take the form ABA'B' where A' is the inverse of A. These only affect pieces which are at the intersection of A and B (or example, U2 R2 U2 R2 -U2 and R2 are self inverse- only affects the edges which are altered by both the R2 and the U2).

Many algorithms also contain conjugates which are of the form ABA' and this is often used in blindsolving (in old pochman and M2/R2 at least) where certain pieces are moved to be affected by another algorithm which usually does something else for example swapping 2 corners in OP.

Hope this helps!
I just watched a video about commuter yesterday and I got interested in learning the theories behind algs. Can you explain how I should break up the U perm (M2 U M U2 M' U M2)? It is in the form of ABA'B' where A=M2U and B=MU', but their intersection is definitely not just 1 piece so it doesn't satisfy the requirement for being a commuter, yet somehow it works.

#### obelisk477

##### Member
Solving the first two layers of a Rubik's Cube is very intuitive. One can watch the algorithms in action and see exactly why they work. However, when using known algorithms to solve the third layer of a Rubik's Cube, they seem to just work by magic, with no explanation. Is there a way to explain why such algorithms work? Are there basic principles for understanding these algorithms?

There are basic principles for understanding commutators and conjugates, but for other algs you just watch what they do.

Consider the basic OLL F R U R' U' F'. A basic thing to check for is to see if at the beginning and end of algs, if the moves undo each other. We see that is the case here - F' undoes F. Which means that these moves must set up the cube in a certain way, so that the middle bit affects the pieces we want it to affect. So what does the middle bit do? R U R' U' takes out an F2L pair and places it in the upper layer, swapping it with a few upper layer pieces. But we don't want to affect the F2L because it's an OLL algorithm. So by starting with an F move, we place LL pieces in the F2L spot that was swapped before, perform R U R' U', which then only affects LL pieces, and undo the F' to restore the first two layers. The F move also mis-orients every edge piece on the F layer. So when the LL edge piece in the slot (after performing F) swaps with another LL edge piece, it remains misoriented in the last layer. The F' at the end misorients the piece that it got swapped with.

We still don't really know what some algs do. There are several theories as to how the <RU> group U-perms actually work, but again, there is some disagreement on this.

#### ch_ts

##### Member
I just watched a video about commuter yesterday and I got interested in learning the theories behind algs. Can you explain how I should break up the U perm (M2 U M U2 M' U M2)? It is in the form of ABA'B' where A=M2U and B=MU', but their intersection is definitely not just 1 piece so it doesn't satisfy the requirement for being a commuter, yet somehow it works.
M2 U //setup
M U2 M' U2 // cycle 3 edges
U' M2 //undo setup

edit: I suppose you could go further like:
M2 U //setup
[M, U2] // cycle 3 edges
U' M2 //undo setup

Last edited:

#### wir3sandfir3s

##### Member
So, here's how I have always looked at Algs (and why I like intuitive way better).
1. So you solve to a certain point, let's say F2L.
2. You recognize a case.
3. First part of the alg: you scramble everything a certain way.
4. You put everything back together so that the scrambled part of the F2L returns to solved, but something in LL is affected, such as OLL.
Basically, you are redoing everything you have already done to get a better outcome...

D

#### Daniel Lin

##### Guest
As people have said above, commutators and conjugates are pretty intuitive. Everything else is magic