\[ \newcommand{\supp}[1]{\textrm{supp}(#1)} \newcommand{\fix}[1]{\textrm{fix}(#1)} \newcommand{\stab}[1]{\textrm{stab}(#1)} \]

Techniques to Build Rubik's Cube Algorithms

I usually solve a Cross then First 2 Layers by intuitive methods and then use Conjugates and Commutators to solve the last layer in a mostly intuitive manner. This webpage should include everything you need to devise your own algorithms for solving the last 2 layers of a Rubik's cube from a mathematical perspective. Don't just take my algorithms as cannon, use the ideas to develop your own algorithms.

Notation:

Socks and Shoes:

( Socks and Shoes ) $(XY)'=Y'X'$
What this theorem says is the inverse of a composite operation where both component operations are invertible is equal to the inverse of each component operation in the opposite order. So given a long list of moves, reverse the order and invert each one (just like removing your socks and shoes). e.g. $$ (R'DRLD'L'R'DR)'=R'D'RLDL'R'D'R $$ Note $(\varphi')'=\varphi$ and $(X2)'=X2$ for every $X \in \{R,L,U,D,F,B\}$ and every invertible algorithm $\varphi$. It's noteworthy that other puzzles do not necessarily have the $(X2)'=X2$ property and that all algorithms performed by legal turns of the cube are invertible.

Group Action

You can consider the action of twisting the side of a cube as acting on different objects. For example you can act on the following:

Conjugation:

Many cubers treat conjugation in a fairly colloquial manner. They think, do a setup move, do something useful, then invert the setup Note this is the same thing as saying $$ XYX'=Y^X $$ Where $X$ is the setup, $Y$ is the something useful and $X'$ inverts the setup.This structure is a common occurrence in mathematics such as in change of basis for a vector space or similar matrices. Basically, what it allows you to do is keep the same structure as $Y$ while changing it's shape by $X'$.

The following theorem is a formalization of that observation:
( Conjugation Preserves Cycle Structure ) Given $f=(a_1,a_2, \ldots, a_m)$ and $\sigma$ a permutation $f^\sigma=(a_1\sigma', a_2\sigma', \ldots, a_k\sigma')$
Let $f=(a_1,a_2, \ldots, a_m)$ and $\sigma$ be a permutation. First consider the action of $f^\sigma$ on $x \not\in \{a_1\sigma',a_2\sigma', \ldots, a_m\sigma'\}$. Then $x\sigma \not\in \{ a_1, a_2, \ldots, a_m\}$ and thus $$ \begin{align} xf^\sigma &=(x\sigma) f \sigma'\\ &= (x\sigma) (a_1,a_2,\ldots,a_m) \sigma'\\ &= (x\sigma) \sigma'\\ &= x \end{align} $$ Then if $x \in \{a_1\sigma',a_2\sigma', \ldots, a_m\sigma'\}$. Then for some integer $1\le j \le n$ we have $a_j\sigma'=x$. By applying the inverse $x\sigma=a_j$. Consider the action of $f^\sigma$ on $x$: $$\begin{align} (a_j\sigma')f^\sigma &= xf^\sigma \\ &=(x\sigma) f \sigma'\\ &= (a_j) (a_1,a_2,\ldots,a_m) \sigma'\\ &= (a_p)\sigma' \end{align}$$ Where $p = \begin{cases}1 & j=m \\ j+1 & \text{otherwise}\end{cases}$. Therefore $f^\sigma=(a_1\sigma',a_2\sigma', \ldots, a_m\sigma')$.
If $f$ is the product of disjoint cycles $f=c_1c_2\cdots c_n$ where each $c_i=(c_{i1},c_{i2},\ldots,c_{ik_i})$. Then to see conjugation preservers the cycle structure insert $\sigma'\sigma$ (which is the identity) between each cycle: $$ \begin{align} f^\sigma &=\sigma f \sigma'\\ &= \sigma c_1 c_2\cdots c_n \sigma'\\ &= (\sigma c_1 \sigma')(\sigma c_2\sigma')\cdots (\sigma c_n \sigma')\\ &= c_1^\sigma c_2^\sigma \cdots c_n^\sigma \end{align} $$ Then each $c_i^\sigma=(c_{i1}\sigma',c_{i2}\sigma',\ldots,c_{ik_i}\sigma')$. So $f^\sigma$ will have the same cycle structure as $f$.

Other important examples of conjugation:

Commutator Examples:

Inverting Commutators and Conjugates:

It's worth remembering how to invert commutators and conjugates. You can get them both from socks and shoes.

$3$-cycles:

One thing you can notice in the examples of commutators is if you follow certain pieces like the edges in The Sexy Move $[R,U]$ they are a $3$-cycle. That is, considering the action on edge blocks only sexy move has this cycle structure $(a,b,c)$ where $a$ is the green-red edge, $b$ is the white-red edge and $c$ is the blue-white edge. But sexy move is not a $3$-cycle when acting on all blocks because it moves corners also

Suppose we have an algorithm $f$ on the Rubik's cube. We will call $\fix{f}=\{x \mid xf=x\}$ that is all the objects fixed by $f$. Usually we will be thinking of the objects as blocks, but we can think of them as stickers or edges or any other object the Rubik's cube acts on. The support is the complement of the set of fixed points $\text{supp}(f)=\{x \mid xf \neq x\}$.

( $3$-cycle theorem ) If $f$ and $g$ are algorithms on the Rubik's cube with $\supp{f}$ and $\supp{g}$ intersecting in exactly one element, then the commutator $[f,g]$ is a 3-cycle.

In practice this is trickier to do that just commuting two adjacent moves on the cube, they all intersect in $3$ elements! Akk! But conjugation rescues us here.

Examples

Permutations Fixing the Last Layer:

If a group $G$ acts on set $\Omega$ and $ X \subseteq \Omega$ then the stabilizer of $X$ is $\stab{X}=\{g \in G \mid (X)g=X\}$. Note this only sends the set to the set, things can be permuted inside the set. We also denote the complement $X^C=\{ x \in \Omega \mid x \not\in X\}$. A permutation $f$ is said to fix $X$ pointwise if $xf=x$ for all $x \in X$. That is, $X \subseteq \fix{f}$.
( Last Layer Commutators ) If $f \in \stab{X}$ and $g$ fixes $X^C$ pointwise then $[f,g]$ also fixes $X^C$ pointwise. That is if $X$ is the last layer, taking the commutator of an algorithm that stabilizes the last layer and a last layer twist results in an algorithm that fixes the first two layers pointwise.
Note since $f \in \stab{X}$ that $f \in \stab{X^C}$ and $f' \in \stab{X} \cap \stab{X^C}$ also. Let $x \in X^C$ then $f(x)=y$ for some $y \in X^C$. Since $g$ pointwise fixes $X^C$ we have $g(x)=x$ and $g(y)=y$. Then $$ \begin{align} x[f,g]&=xfgf'g'\\ &=ygf'g'\\ &=yf'g'\\ &=xg'\\ &=x\\ \end{align} $$ Therefore, $[f,g]$ pointwise fixes $X^C$. Note $[f,g]'=[g,f]$ will also fix $X^C$ pointwise.

Examples:

Notes:

Thanks: