# Rubik's cube group elements and their distance from the solved position

The Rubik's cube group has 6 2 generators (see EDIT). Let's define the "distance" between two positions dist(A,B) as the shortest sequence of generator moves that takes you from A to B. Now if dist(X,Y) = 1, X and Y can't have the same distance from the solved position.

1. How do I prove this?

2. Is this true for all groups?

3. Does this statement have a name, or does it immediately follow from some well-known theorem?

EDIT
As Robert Chamberlain points out in the comments: a minimal generating set of the Rubik's cube group is composed of 2 elements, not 6 as I previously thought.

• I would like to point out that your questions depend not only on the group, but also the choice of generators. If the set of generators is the whole group for example then $\mathrm{dist}(X,Y)=1$ for any $X,Y$ so the statement would not hold. – Robert Chamberlain Feb 16 '17 at 19:47
• There is a notion of parity in the rubik's cube. If you can show that each generator changes the edge parity or that each generator changes the corner parity, then two positions $X,Y$ with $\mathrm{dist}(X,Y)=1$ will have different edge / corner parity which is impossible if they are the same distance from the solved position. As this isn't a full answer I'll leave it to you or someone else to fill the gaps. – Robert Chamberlain Feb 16 '17 at 19:54
• @RobertChamberlain maybe I wasn't clear enough: by "generators" I mean the elements of a minimal set of generators. There are more than one such sets, but all of them have size 6. – UndefinedBehavior Feb 16 '17 at 20:46
• Actually, the Rubik's cube group has a generating set of size 2. For an example of a group and minimal generating set where this doesn't hold, consider $\mathbb{Z}_5$ as generated by $1$ and 'solved position' $0$. $\mathrm{dist}(2,3)=1$ but $2$ and $3$ are both distance $2$ from $0$. You can check this works for any cyclic group of odd order. – Robert Chamberlain Feb 16 '17 at 20:53
• @RobertChamberlain tbh I didn't know that the Rubik's cube is 2-generated. So my previous comment should read: by "generators" I mean the elements of a minimal set of generators. There could be more than one such sets, but all of them have size 2. Anyway your example is not really correct: as the generator is {1} dist(2,0) is 3, not 2, as you have to "apply" the generator "1" 3 times to go from 2 to 0. – UndefinedBehavior Feb 16 '17 at 21:42

This depends crucially on the choice of generating set; in fact, as I'll show below, there are size-2 generating sets both with and without (a version of) your property. The observation you need is this, which has nothing to do with Rubik's cubes:

Lemma: Suppose $G$ is a finite group, $H < G$ is an index-2 subgroup, and $S$ is a generating set of $G$ that is disjoint from $H$. Then no $g \in G$ can be written both as a product of an odd number of generators and as a product of an even number of generators.

Proof: The product of an even number of generators is in $H$, and the product of an odd number isn't.

In fact, conversely, you can see that if some generating set has the property claimed in the lemma, then the set of $g \in G$ that can be written as a product of an even number of generators must be an index-2 subgroup that contains none of the generators. So index-2 subgroups are the only things that can produce these parity restrictions.

In the case of the Rubik's cube group $G$, let $H$ consist of operations that (ignoring orientations) are even permutations of both edges and corners. (This is the only index-2 subgroup of $G$; you can prove this by showing it equals the derived subgroup.) None of the standard six generators are in this subgroup, so the standard generating set has the desired property.

On the other hand, suppose $S = \{g, h\}$ generates $G$. At least one of the two is outside of $H$; say $g$ is. Then if $h \in H$, we get another generating set $\{g, gh\}$ with both elements outside of $H$. Conversely, if $h \notin H$, then $\{g, gh\}$ is a generating set with $gh \in H$. So given that $G$ has some 2-element generating set (which it does), it must have some with the parity property and some without.

I don't think this is easily provable. Here are some thoughts.

Let $G = \{L,R,U,D,F,B\}$ denote the set of generators. Let $S$ denote the solved position. We will think of $X$ as also denoting the element of the Rubik's group that takes you from the solved position to $X$ (similarly for $Y$). Let $n = dist(S,X)$. Because $dist(X,Y) = 1$, we have $$X = g_n \cdots g_2g_1\\ Y = g_{n+1}g_n \cdots g_2g_1 = g_{n+1}X$$ with $g_i \in G$. Now, suppose that $dist(S,Y) = n$. We then have $$Y = h_n\cdots h_2h_1$$ for $h_i \in G$. Thus, we have $$X = g_{n+1}^{-1}h_n\cdots h_2h_1$$ Now, we have $$S = g_n\cdots g_2g_1h_1^{-1}h_2^{-1} \cdots h_n^{-1}g_{n+1}$$ Now, this is what I think is the missing ingredient:

Conjecture: If $k$ is odd, we cannot have $g_k \cdots g_1 = S$ with $g_1 \in S$. That is: all relations on the generators preserve parity of length.

If the above were true, we would have reached a contradiction.

Edit: Based on Chamberlain's link, it suffices to note that any generator switches the "parity" of the edges (and simultaneously, that of the corners). With that, we see that any word of odd length on the generators must switch the parity, and can therefore not be the identity element.