Electrifiedby vlvd.net

Cube Group Theory: The Maths Behind a Cube's Moves

Cube group theory is the maths that treats every move of a cube puzzle as one member of a group: a set of moves you can combine, undo and repeat by fixed rules. It explains why turning one face four times does nothing, why the order of two turns matters, and why the cube has exactly 43,252,003,274,489,856,000 positions. This post walks through those ideas in plain words, from Wikipedia's article on the Rubik's Cube group, with a few checks you can do by hand.

If you want a cube to try the turns on, Evolved 2048 puts the 2048 puzzle on a cube you twist and turn in the browser, and it shows what happens when moves stop following the group rules.

What cube group theory means

In maths, a group is a set with one way of combining its members. Here the members are cube moves. A move is not one turn but the effect of any sequence of turns. Two sequences that leave the cube in the same state count as the same move.

The combining is "do this, then do that". Do R, then do U, and the result is one move of the group, written RU. Wikipedia's article on the Rubik's Cube group puts it this way: each element of the group corresponds to a cube move, the effect of any sequence of rotations of the cube's faces. Any position can be written too, as the move that takes the solved cube to it.

So a scramble is not a mess. It is one element of a fixed, finite group, and solving is finding the element that undoes it.

The four rules a group must follow

A set of moves is a group only if four rules hold. The cube passes all four.

  • Closure: two moves in a row make another move. R then U is the move RU.
  • Identity: there is a move that changes nothing. Wikipedia calls it the empty move, E, and notes that LLLL is the same as E.
  • Inverse: every move can be undone. R' undoes R, and RRR is the same as R'.
  • Associativity: how you bracket a sequence does not matter, only the order of the turns. (RU)F is the same as R(UF).
Table of the four group rules with a face turn example for each, plus FR not equal to RF

The four group rules, each with a cube example from Wikipedia's article.

Note what is not on the list: swapping two moves. The rules never promise that RU equals UR, and on a cube it does not.

Six generators make every move

The cube's faces are named with Singmaster notation: F for front, B for back, U for up, D for down, L for left and R for right. A letter alone is a clockwise quarter turn of that face. A prime, as in F', turns it counter-clockwise, and a 2, as in F2, turns it twice. Our cube notation post covers the letters in more detail.

The six quarter turns F, B, U, D, L and R are the group's generators. Every move of the group is some string of them. That is a striking fact: six simple turns, repeated and mixed, reach every one of more than 43 quintillion positions.

To make this exact, Wikipedia labels the 48 facets that are not centres with the numbers 1 to 48. Each face turn then moves those labels around, so it is a permutation of 48 things. The cube group is the set of permutations you can build from the six face turns. The 6 centre facets turn in place but never move, which is why they fix each face's colour.

How big the group is

The group has 43,252,003,274,489,856,000 elements. In prime factors that is 227 × 314 × 53 × 72 × 11. Each element is a position you can reach from solved, and no others are reachable by turning. Where that number comes from, piece by piece, is in our cube permutations post.

Group theory also explains a rule players feel in their hands. Wikipedia describes the moves that only twist corners or flip edges, leaving every piece in its place. All but one corner can be twisted freely, and all but one edge flipped freely, but those choices fix the last one. That is why a single corner never twists alone, as our corner twist post shows.

The order of a move

The order of a move is how many times you repeat it before the cube comes back to where it started. A single face turn has order 4: LLLL is the empty move. A half turn such as R2 has order 2.

Longer sequences can have much larger orders. The largest order of any element of the cube group is 1260. Wikipedia gives one example: R U2 D' B D'. Repeat that five-turn sequence 1260 times from solved and the cube is solved again, and not once before.

Here is a check you can do with any cube in your hand:

  1. Start from solved. Turn R once and look at the right face's neighbours.
  2. Turn R three more times. The cube is solved again: four quarter turns are the identity.
  3. Now turn R three times from solved, and compare with one R'. The cube looks the same both ways, because RRR is R'.
  4. Last, do F then R, and note the front face. Undo it with R' then F'. Now do R then F, and compare. The front face looks different: FR and RF are not the same move.

Non-abelian: why order matters

A group where every pair of moves can be swapped is called abelian. The cube group is non-abelian. Wikipedia's example is the same one from the check above: FR is not the same as RF.

This is the heart of why the cube is hard. If every pair of turns could be swapped, you could sort a scramble into "all the R turns, then all the U turns" and cancel them. Because turns do not commute, the order of each turn carries information, and a solver has to undo moves in reverse order.

Only two moves commute with every other move. Together they make the group's centre: the identity, which changes nothing, and the superflip, which flips all 12 edges in place. Our superflip post shows what that position looks like.

Why 2048 twists on a cube are not a group

Evolved 2048 uses the same shape: six faces of nine squares, 54 in all. You slide the front face so equal tiles merge, twist a row or column to carry tiles round from the other faces, and turn the whole cube, aiming for a 2048 tile.

Its twists look like face turns, but they break the inverse rule. In the game, key 1 twists the front's top row to the right face, and Shift and 1 twists it the other way. Each twist counts one move and adds a new tile. So 1 then Shift and 1 does not give you the empty move back: the row comes back, but two new tiles have landed on the board, one after each twist. A twist and its reverse cost two moves and never cancel the way R and R' do.

Whole-cube turns are closer to the maths. Shift and Left brings the right face to the front, which is a y turn in cube notation, and the game says "Turning is free": it adds no tile and counts no move. Try pressing Shift and Left four times and see whether you are back at the same front face. More on those keys is in turn the whole cube in 2048.

Frequently asked questions

Is the Rubik's Cube a group in maths?

Its moves are. Each element of the Rubik's Cube group is a cube move, and the moves follow the four group rules: closure, identity, inverse and associativity.

How many elements does the cube group have?

It has 43,252,003,274,489,856,000 elements, one for each position reachable from solved by turning.

What is the largest order of a cube move?

The largest order is 1260. One example from Wikipedia is R U2 D' B D'.

Why is the cube group called non-abelian?

Because not every pair of moves can be swapped. FR and RF leave the cube in different states.

Get started

Group theory says every cube move can be undone. A 2048 cube adds a tile with each move, so every twist is a choice you keep. Turn the cube to look around for free, then twist only when it brings a tile next to its match.

Play Evolved 2048: it is free and plays in your browser on a computer or a phone.

The 2048 puzzle on a Rubik's cube, and past 2048.

Visit evolved2048.vlvd.net
Evolved 2048 on desktop
Evolved 2048 on tablet
Evolved 2048 on phone
0 likes

Comments

No comments yet.

or make an account to comment.