The Unapologetic Mathematician

Mathematics for the interested outsider

Rubik’s Group and the solution to the cube

Okay, we’re ready to find the structure of Rubik’s group. We’ve established the restrictions stated in my first post. Now we have to show that everything else is possible.

The main technical point here is that we can move any three edge cubies to any three edge cubicles, and the same for corners. I don’t mean that we can do this without affecting the rest of the cube. Just take any three cubies and pick three places you want them to be, and there’s a maneuver that puts them there, possibly doing a bunch of other stuff to other cubies. I’ll let you play with your cubes and justify this assertion yourself.

A slightly less important point is that we only need to consider even permutations of corners or edges. We know that the edge and corner permutations are either both even or both odd. If they’re odd, twist one side and now they’re both even.

Now, let’s solve the edge group. The maneuver
has effect (+fr)(+br), flipping two edge cubies, while the maneuver
has effect (fr\,br\,fl), performing a cycle of three edges. This is all we need, because 3-cycles are enough to generate all even permutations, and one 3-cycle gives us all of them. Similarly, being able to flip two edges gives us all edge flips with zero total flipping.

How does this work? First, forget the orientation of the edges and just consider which places around the cube they’re in. This is some even permutation from the solved state, so it’s made up of a bunch of cycles of odd length and pairs of cycles of even length. Consider an odd-length cycle (a_1\,a_2\,...\,a_k). If we compose this with the 3-cycle (a_k\,a_{k-1}\,a_{k-2}), we get (a_1\,a_2\,...\,a_{k-2}). This is again an odd-length cycle, but two shorter. If we keep doing this we can shrink any odd cycle down to a 3-cycle. On the other hand, we have the composition (a_1\,a_2\,a_3)(a_2\,a_3\,a_4)=(a_1\,a_2)(a_3\,a_4), so we can build a pair of 2-cycles from 3-cycles. We can use these to shrink a pair of even-length cycles into a pair of odd-length cycles, and then shrink those into 3-cycles. In the end, every even permutation can be written as a product of 3-cycles.

And now since we can move any three cubies anywhere we want, one 3-cycle gives us all of them. Let’s pick three — say ub, br, and df — and a maneuver m that sends ub to fr, leaves br alone, and sends df to fl. Such a maneuver will always exist, though it may mess up other parts of the cube. Now conjugate e_3 by M. We know what conjugation in symmetric groups does: it replaces the entries in the cycle notation. So the maneuver me_3m^{-1} has the effect (ub\,br\,df), and we can do something similar to make any 3-cycle we might want. So we can make any even edge permutation we want, and adding a twist makes the odd permutations.

The same sort of thing works for edge flips. Take any pair of edges you want to flip, move them to fr and br, flip them with e_F, and move them back where they started. We can make any flips we need like this.

Together what this says is that the edge group of the Rubik’s cube lives in the wreath product of S_{12} and \mathbb{Z}_2: twelve copies of \mathbb{Z}_2 for the flips, permuted by the action of S_{12}. Specifically, the edge group is the subgroup with total flip zero. We call this group E, and we know E\subseteq S_{12}\wr\mathbb{Z}_2 as a subgroup of order 2.

A very similar argument gives us the corner group. The maneuver
has the effect (+urf)(-dlb), twisting two corners in opposite directions, while
has the effect (urf\,ubr\,lfd), performing a 3-cycle on the corners. Conjugations now give us all 3-cycles, and these make all even corner permutations, and turning one more face makes all corner permutations. Conjugations also can give us all corner twists with zero total twist. This gives the corner group C\subseteq S_8\wr\mathbb{Z}_3 as a subgroup of order 3.

Putting these two together we get the entire Rubik’s Group G\subseteq E\times C as a subgroup of order 2. Here it’s a subgroup because we can only use maneuvers with the edge and corner permutations either both even or both odd, not one of each.

This result gives us an algorithm to solve the cube!

  • First, pick the colors of the face cubies to be on each side.
  • Then write out the maneuver that will take the scrambled cube to the solved one in cycle notation. If the edge and corner permutations are odd, twist one side and start again — now they’ll both be even.
  • Now write the edge permutation as a product of 3-cycles, and make each 3-cycle by conjugating e_3 by an apropriate maneuver.
  • Do the same for the corner permutation, using c_3 as the basic piece.
  • Write down how each edge and each corner needs to be flipped or twisted. Make these flips and twists by conjugating e_F and c_T.

That’s all there is to it. It’s far from the most efficient algorithm, but it exploits to the hilt the group theory running through the Rubik’s Cube. You should be able to apply the same sort of analysis to all sorts of similar puzzles. For example, the 2\times2\times2 cube is just the corner group on its own. The Pyraminx uses a simpler, but similar group. The Megaminx is more complicated, but not really that different. It’s just group theory underneath the surface.

March 21, 2007 Posted by | Group theory, Rubik\'s Cube | 4 Comments

Flag varieties

As another part of preparing for the digestion of the E_8 result, I need to talk about flag vareties. You’ll need at least some linear algebra to follow from this point.

A flag in a vector space is a chain of nested subspaces of specified dimensions. In three-dimensional space, for instance, one kind of flag is a choice of some plane through the origin and a line through the origin sitting inside that plane. Another kind is just a choice of a plane through the origin. The space of all flags of a given kind in a vector space can be described by solving a certain collection of polynomial equations, which makes it a “variety”. It’s sort of like a manifold, but there can be places where a variety intersects itself, or comes to a point, or has a sharp kink. In those places it doesn’t look like n-dimensional space.

Flag varieties and Lie groups have a really interesting interaction. I’ll try to do the simplest example justice, and the rest are sort of similar. We take a vector space V and consider the group SL(V) of linear transformations T:V\rightarrow V with \det(T)=1. Clearly this group acts on V. If we pick a basis \{b_1,b_2,...,b_n\} of V we can represent each transformation as an n\times n matrix. Then there’s a subgroup of “upper triangular” matrices of the form
\left(\begin{array}{cccc}1&a_{1,2}&\cdots&a_{1,n}\\ 0&1&\cdots&a_{2,n}\\\vdots&\vdots&\ddots&\vdots\\ 0&0&\cdots&1\end{array}\right)
check that the product of two such matrices is again of this form, and that their determinants are always 1. Of course if we choose a different basis, the transformations in this subgroup are no longer in this upper triangular form. We’ll have a different subgroup of upper triangular matrices. The subgroups corresponding to different bases are related, though — they’re conjugate!

Corresponding to each basis we also have a flag. It consists of the line spanned by the first basis element contained in the plane spanned by the first two elements, contained in… and so on. So why do we care about this flag? Because the subgroup of upper triangular matrices with respect to this basis fixes this flag! The special line is sent back into itself, the special plane back into itself, and so on. In fact, the group SL(V) acts on the flag variety “transitively” (there’s only one orbit) and the stabilizer of the flag corresponding to a basis is the subgroup of upper triangular matrices with respect to that basis! The upshot is that we can describe the flag variety from the manifold of SL(V) by picking a basis, getting the subgroup of upper triangular matrices U, and identifying elements of SL(V) that “differ” by an element of U. The subgroup U is not normal in SL(V), so we can’t form a quotient group, but there’s still a space of cosets: SL(V)/U.

So studying the flag variety in V ends up telling us about the relationship between the group SL(V) and its subgroup U. In general if we have a Lie group G and a subgroup B satisfying a certain condition we can study the relation between these two by studying a certain related variety of flags.

March 21, 2007 Posted by | Atlas of Lie Groups | 2 Comments