# Rubik's Cube

I decided that it was long past time that I learn how to solve a Rubik's cube. I didn't have one on hand, so I decided to simulate one and put it here.

I found this tutorial by Cubastic easy to understand and follow. I set up the simulation so that it is easy to follow the tutorial. In particular, I put the yellow face on top. Also, I let you flip the z-axis for the step where the cube is flipped upside down.

From a mathematical point of view, the Rubik's cube is an example of a group. Groups are a mathematical construct with a minimal set of axioms, and appear absolutely everywhere in mathematical research.

In algebraic terms, groups are a set of symbols that you can combine in pairs to get other symbols in the set. There is an identity symbol, \(e\) that leaves a symbol unchanged when paired with it, and every symbol has an inverse symbol, that when combined together, results in the identity symbol.

In the case of the Rubik's cubes, the group is the set of move sequences. One combines two move sequences to create a new move sequence in the obvious way, by chaining one sequence after another. The identity move sequence is simply the empty move sequence where you just don't touch the cube and leave it alone. It's clear that all move sequences have an inverse sequence, whereby each move is undone in reverse.

The Rubik's cube group is a large group, and you could probably never hope to imagine all of the distinct move sequences.

If you know group theory, you can immediately deduce some facts about the Rubik's cube. For example, if you repeat a move sequence over and over, eventually you get back to where you started. In the Cubastic tutorial, this fact is used at one step to cycle cube segments in a finite orbit until they land in the desired location.