# Algorithm Simplification?

#### speedcuber50

##### Member
Quite simply, how do you do it ?

Are there "laws of the cube", a bit like boolean algebra laws (I simply boolean expressions as well), such as certain sets of moves, four or so in length, that cancel down? I know simple things like RU2R' twice in a row cancels down to nothing, or that RUB'U'R'U=B', but is there more? I would like to know, because I've got a couple of really long algs that I want to reduce to their simplest form.

speedcuber50

P.S. I know this forum is not for speedcubing, but of course the main reason why I want this is to save time !

#### 5BLD

##### Member
RUB'U'R'U=B', but is there more?
how is this true

also most algs I don 't think can be simplified in obvious ways as they are already close to optimal... or they should be.

#### Noahaha

##### blindmod
• Rats_Nobb

#### bobthegiraffemonkey

##### Member
The usual approach is to start with an already shorter alg, then you bypass the need to shorten it. If you ask for solutions to particular things then people will probably be able to help, and most useful alg sets will be documented already somewhere.

#### MaeLSTRoM

##### Member
Puzzle Theory Sub-forum.

On Topic: Algs will be written in their shortest forms for most of the time. If you want shorter algs you either need to learn a different one, or its already optimal and you're stuck with it. If you post the algs you want better ones of in the One Answer Question Thread you will get a quick repsonse with some pretty good algs.

#### qqwref

##### Member
You're not going to "simplify" algs you find, since they'll already be nearly optimal. You can remove rotations and convert double-layer and slice turns into single-layer turns (if you're using a 3x3x3), but not much more than that.

As for short sentences that cancel, there aren't that many. You can cancel two moves next to each other (R R2 = R') and change moves on the same axis (R L = L R). There are also a few simple replacements like this:
M2 S2 = S2 M2
(R2 U2)3 = (U2 R2)3
U2 M2 U2 = D2 M2 D2
R U R' F' U2 = U2 F' L' U L
F U' R' F R F' = U' F R U' R' U = U L' U' L F U'
Plus some more complicated ones on bigger cubes. But yeah, in general, if you find an algorithm, you aren't going to be improving it with simple stuff like this.

#### SirWaffle

##### SHJ
One thing I like to do is assign triggers like R U R' U', L' U' L U, F R' F' R and a few others, numbers. Then I know what trigger to perform. So an algorithm like this:
y2 f' L' U' L U f F' L' U' L U F, I could change to read like this: y2 f' (2) f F' (2) F, The "(2)" being the trigger L' U' L U. In my opinion this makes it much easier to memorize longer algorithms. Not sure if this will help you though.

#### Carrot

##### Member
So far qqwref is the only one with a proper answer in this thread... Guys, show the OP some respect please instead of saying that he is lame for asking this, because it's a pretty interesting topic.

However, I must admit I have nothing on this exact topic, but I have was thinking about the exact opposite problem yesterday. for instance I was wondering:
How would you guys write these simple cases as a commutator?
M
M2
U2
U D

#### sneaklyfox

##### Member
You mean like
T perm is R U R' U' R' F R2 U' R' U' R U R' F'
Call that alg "T" and written has $T (so as not to confuse$F perm as clockwise front face turn)
Then F perm is R' U' F' $T F U R? Or you can even have a special symbol which means undo setup moves or special way to write it. R' U' F'$T !3
!3 means undo first three moves backwards

Probably common move sets or triggers can be given names also. R U R' U' "sexy move" can be notated as :: (random choice of symbol) or R' F R F' "sledgehammer" as ;; and R U' R' as > and R U' R' U' as >> and R U R' as < and R U R' U as <<

An OLL Example:
R' U' ;; !2

Y perm Example:
F R U' R' U' R U R' F' R U R' U' R' F R F'
F >> < ! :: ;;

#### Christopher Mowla

##### Premium Member
How would you guys write these simple cases as a commutator?
M
M2
U2
U D
A commutator cannot be used to generate the exact same position from the move M (because the move M, keeping the the same point of reference as the initial position, does a 4-cycle (odd permutation) of the middle edges and the fixed centers). However, we could represent L' R as a commutator.

M2
[y' z D2 B F' L R' D' U B' F', y2 F2 U' R2 B D2 R2 U2 F L2 U' F2]

U2
[R' U R2 B2 U R' B2' R U' B2 R2' U' R U', U]

U D
[L2 R2 U2 R' D L2 B' R2 F D' F U R' B' D B' U R2, B2 D2 B2 L' R' F2 U2 F2 D2 L R D B2 F2 L2 R2 U']

To the original post, I thought of this before with the motivation to understand how cube explorer shortens algorithms, but I agree with qqwref. The most we can do with equivalent algorithm pieces is to expand the length of an algorithm, since there are a lot more longer equivalent algorithm pieces than there are shorter ones (assuming that we are starting with close to optimal--and optimal--well known algorithms).

#### ducttapecuber

##### Premium Member
Just because an alg is move optimal does not mean it is speed optimal.
This basically means that a 9 move alg may not be as fast as a 13-15 move alg. The 9 move one might contain a lot of F, B, L, R moves which can me hard to go fast, while the 13-15 move alg might contain only R and U moves. This would be much faster to execute.
Hope this makes sense!

Last edited:

#### speedcuber50

##### Member
Essentially, I've found my own algs, and I'm trying to make them shorter.

How?

#### ben1996123

##### Banned
You can't, unless for some reason you have (R2 U2)6 in your alg or something stupid like that.

#### siva.shanmukh

##### Member
R' B2 U' B' U = D B' D' B2 R'

I don't know how one can arrive at this logically, but I found this by comparing two V perms
R' U R' U' B' R' B2 U' B' U B' R B R
R' U R' U' B' D B' D' B2 R' B' R B R

This is how my thought process went from here on.
R' B2 U' B' U R B2 D B D' = Identity (Modifying the above equality by moving all Right hand terms to the left.
So if we have an Identity that may not be simplified by rules mentioned by qqwref earlier, we can come up with equal pairs of algs from these.
Like
R = B2 U' B' U R B2 D B D'
R B2 = U' B' U R B2 D B D'
... so on.
We can even cycle the Identity around like
R' B2 U' B' U R B2 D B D' = B2 U' B' U R B2 D B D' R'

This could give us some equivalent pairs

Now to come up with Identity sequences. I remember starting one thread for this myself in puzzle theory and someone pointed me to Jaap's page which discussed identities. I even tried to find identities on CubeExplorer and it gave quite a few solutions.

So I know of no ruleset that could simplify phrases of scrambles, but there is a way to create some kind of lookup table.
Please add to this. Would like to know what others think.

Similar threads