Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
28 views36 pages

Rubik

The document explores the connection between group theory and the Rubik's cube, starting with the simpler 2x2 square and progressing to the 2x2x2 cube. It defines the group G generated by specific permutations corresponding to moves on the cube and discusses its properties, including its order and isomorphisms with other groups. The document concludes with the implications of these group structures for understanding the possible states of the Rubik's cube.

Uploaded by

陳某
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views36 pages

Rubik

The document explores the connection between group theory and the Rubik's cube, starting with the simpler 2x2 square and progressing to the 2x2x2 cube. It defines the group G generated by specific permutations corresponding to moves on the cube and discusses its properties, including its order and isomorphisms with other groups. The document concludes with the implications of these group structures for understanding the possible states of the Rubik's cube.

Uploaded by

陳某
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Optional topic: Group theory and Rubik’s cube

Rubik’s cube is a popular puzzle and it is well-known that it is


nicely connected to group theory. I would like to show you this
connection. To simplify the exposition and get the main ideas, we
will start with:
In fact, once you understand the ideas properly, you will have little
difficulties doing
In fact, I want to start with the 2 2 Rubik’s square before I
do the 2 2 2 Rubik’s cube. What is it? If you search the web,
you may find something like this:

https://openprocessing.org/sketch/576328

This is also a nice puzzle game that I had used to teach group
theory more than 10 years ago (without knowing any implemen-
tation on a computer). We can come back to it later. But I do not
regard it as the proper 2-dimensional version of Rubik’s puzzle.
I prefer to regard Rubik’s cube as a cube with its boundary
(i.e. the faces, which are 2-dimensional) painted with colors. There-
fore, its 2-dimensional cousin is a square with its boundary (i.e. the
sides, which are 1-dimensional) painted with color.
In this game, we have 4 possible moves: flip row 1, flip row 2,
flip column 1, and flip column 2.
The goal of the game is to use these moves to bring a scrambled
square to the original states, if it is possible.
To model this game using group theory, let me label the painted
pieces:

Then you see that the move “flip row 1” amounts to the per-
mutation (14)(23), and the move “flip column 2” is (27)(18). The
other two moves correspond to (58)(67), (36)(45). Performing
successive moves amounts applying the corresponding permuta-
tions successively.
Thus we arrive at the following group theoretical problem:
consider

G (14)(23), (27)(18), (58)(67), (36)(45) ,

the subgroup of S8 generated by 4 specific permutations. What


can you say about G? For example, what is G ? How to write an
element of G as a product of these generators?
Let us observe that our group G transforms the 4 “tiles”, which
are squares. I will name them the 1st, 2nd, 3rd, and 4th quadrant.
Let X be the set of these 4 tiles. Then the fact “G transforms the 4
tiles” means that there is a group homomorphism G SX S4 ,
where S X is the group of all bijections from X to itself.
How to fit this observation with our description of G as a sub-
group of S8 ?
One may observe that we can identify each member of X using
the two labeled positions on it. For example, the first quadrant
contains the side position number 1 and number 2. If ω G moves
the first quadrant to the second quadrant, then ω (1), ω (2) must
be the numbering of the two labelled side on the second quadrant,
namely 3, 4 . Thus we have G G, where
! " #$
G ω S8 : ω preserves the partition 1, 2 , 3, 4 , 5, 6 , 7, 8 .

We will prove:
Theorem. The group G is of order 24 4! and G is a subgroup
of order 24. In fact, there is a natural group homomorphism ε :
G S X such that ε G is an isomorphism from G to S X S4 ,
where
" #$
X : 1, 2 , 3, 4 , 5, 6 , 7, 8 .
Remark. (1) You may regard the bigger group G as the group to
represent all possible states of the tiles (imagine that you disas-
semble the puzzle and then reassemble it arbitrarily). The smaller
group G then represents the states achievable from the original
state using the allowed moves (generators of G).
(2) It is fairly easy to prove the second statement directly. Let
us rename the labels 2,3,6,7 to 1 , 4 , 5 , 8 . Then we have

G (14)(1 4 ), (18)(1 8 ), (58)(5 8 ), (45)(4 5 ) .

Then it becomes clear that we can regard G as a subgroup of


the permutation group of 1, 4, 5, 8 (the group simply permutes
1 , 4 , 5 , 8 in the same way it permutes 1, 4, 5, 8 ). Then we
see that it is the full symmetric group of 1, 4, 5, 8 because the
latter is known to be generated by (14), (45), (58) (Artin Exercise
7.5.1 or Fraleigh Exercise 10.39).
The group G n,m . It is best that we study groups like G in gen-
eral, because we will need something similar again when we begin
to talk about the group of the true Rubik’s cube. So let us con-
sider a partition P1 , . . . , Pn of a set X P1 Pn such that
Pj m for i 1, . . . , n. We want to consider the subgroup
G n,m of S X (which is isomorphic to Snm ) consisting of permuta-
tions perserving this partitiion. Then the G we have encountered
is simply G 4,2 .
To work systematically, we will use X I J with I
1, . . . , m and J 1, . . . , n instead of X 1, . . . , nm . The
partition member P j is then (1, j), (2, j), . . . , (m, j) .

Pa = ((,
1
,
--
-, (m , , )]
X =

in = &( u),,
-
- -

-
(m
,
/]
Now consider ω G n,m S X . Say ω (i, j) (a, b). Then ω
must map (1, j), . . . , (m, j) bijectively to (1, b), . . . , (m, b) ,
and there is a permutation ϑ j Sm such that ω (k, j) (ϑ j (k), b))
for k 1, . . . , m. Furtheremore, the rule j b is given by a
ermutatich
partition ϖ Sn (i.e. b ϖ( j)). To give ω is exactly to give
(ϑ1 , . . . , ϑn , ϖ).
More precisely, we can associate an element ω(ϑ1 ,...,ϑn ,ϖ) of G
associated to (ϑ1 , . . . , ϑn , ϖ) by the rule:
ω(ϑ1 ,...,ϑn ,ϖ) (i, j) (ϑ j (i), ϖ( j)).
~
Then (ϑ1 , . . . , ϑn , ϖ) ω(ϑ1 ,...,ϑn ,ϖ) is a bijection from (Sm )n Sn
to G n,m .
This bijection is not an isomorphism of groups! To see this,
let us compose the permutations ω(ϑ1 ,...,ϑn ,ϖ) and ω(ϑ1 ,...,ϑn ,ϖ ) :

ω(ϑ1 ,...,ϑn ,ϖ) ω(ϑ1 ,...,ϑn ,ϖ ) : (i, j) (ϑϖ ( j) (ϑ j (i)), ϖ(ϖ ( j))).
-
Fil, (1)I
Thus this composition is equal to ω(ϑ1 ,...,ϑn ,ϖ ) with ϑ j ϑϖ ( j) ϑ j ,
ϖ ϖ ϖ.
If the formula for ϑ j were simply ϑ j ϑ j , then the bijection
would be an isomorphism of groups. But it is not. Anyway, the
situation is only a slight twist of the most straightforward con-
struction of the direct product.
The wreath product. Let A be a group, and denote by An the
direct product of n copies of A. The wreath product An ⊋ Sn is the
group whose underlying set is An Sn , with product given by

(a1 , . . . , an , ϖ).(a1 , . . . , an , ϖ ) : (aϖ (1) a1 , . . . , aϖ (n) an , ϖ ϖ ).

(It is routine to verify that this description indeed gives a group).


Sum
j what we have done so far into:
We can now summarize
Theorem. The group G n,m is isomorphic to Smn ⊋ Sn . In particular,
its order is (m!)n n! and this number divides (nm)!.
Theorem. The group G is isomorphic to S24 ⊋ S4 .
A centralizer. We will do one more computation with symmetric
groups before we return to the Rubik’s cube. This will be used
crucially.
Recall that the centralizer of an element g in a group G is
x G : xg gx ,
which is evidently a subgroup of G. The computation we want to
consider now is: what is the centralizer of a product of n disjoint
m-cycles in Snm ? eg centilises of 1123) (556) (789/(20 12) in Sir
.
,
1,

As before, it is better to work with S X instead of Snm , where


X I J . Then we can assume that our product of n disjoint
m-cycles is g c1 cn , where c j is the m-cycle:

c j : (1, j) (2, j) (m 1, j) (m, j) (1, j).

Theorem. The centralizer of g (given above) in S X Snm is iso-


morphic to Cmn ⊋ Sn , where Cm is the cyclic subgroup of Sm gen-
erated by the m-cycle c (1, 2, . . . , m).
P ROOF. Denote the centralizer of g in S X by C. By the con-
jugation formula we gave in Week 4 Notes, page 10 (or Artin
7.5), it is easy to see C G n,m Smn ⫅̸ Sn . Under the iso-
n
morphism G n,m Sm ⫅̸ Sn , the element g C corresponds
to (c, . . . , c) Smn . So it suffices to compute the centralizer of
(c, . . . , c) in Smn ⫅̸ Sn .
It is easy to see that every element of Cmn ⊋ Sn commutes with
(c, . . . , c). Conversely, Assume (a1 , . . . , an , ω) C. Then since
((e, . . . , e, ω 1 ) C, we have (a1 , . . . , an , ω) (e, . . . , e, ω 1 )
C, i.e. (a1 , . . . , an , e) C. The last condition is equivalent to:
ai c cai for all i. It is an easy exercise to show that the centralizer
of c in Sm is c . This proves the theorem.

The 2 2 2 Rubik’s cube group. The 2 2 2 Rubik’s cube


has 6 sides, and each side consists of 4 color tiles. All together
there are 24 tiles in 24 positions, which we label with 1, 2, . . . , 24.
Let us imagine we disassemble the cube (into 8 pieces) and then
reassemble it arbitrarily. Say the tile in position i goes to position
ε (i), then ε is a permutation of 1, 2, . . . , 24 . The set of permu-
tations ε S24 that can be obtained this way obviously form a
subgroup of S24 . We denote it by G.
The playing of the 2 2 2 Rubik’s cube involves 6 basic
moves (rotating one of the 6 sides by 90 degrees clockwise), which
can be regarded as an element of G. Let G denote the subgroup of
G generated by these 6 elements, and call it the 2 2 2 Rubik’s
Each basic move > an elect (a . an
,
BS
as --, an
Is
cube group. This is what we are most interested in.
WIS : Git + an
= 0 in
Es
Theorem. The group G is isomorphic to C38
⫅̸ S8 , of order 3 8
8!,
and the subgroup G is of index 3 in G, of order 37 8!.

In other words, by applying the 6 basic movies successively


to the original state of the Rubik’s cube, the number of different
states (color patterns) we can achieve is 37 8!, one third of all the
possibilities (obtained by diassembling and reassembling).
Recall that C83 ⫅̸ S8 is a specific subgroup of S I J S24 , where
8
I 1, 2, 3 , J 1, . . . , 8 . To identify G with C3 ⫅̸ S8 , we
need to label the 24 tiles on the 2 2 2 Rubik’s cube (henceforth
simply the cube) using I J in a suitable way as follows: assign a
label j J to the 8 vertices of the cube arbitrarily. The three tiles
adjacent to vertex j are then labeled (1, j), (2, j), (3, j) so that if
you look at the cube from the outside, in the direction of vertex j,
The series of groups C, "XS =
Ex Sw
is almost as easy
to handle as the series So
1
! n(n )
-

(Sul
-- -
+

=
·
= n
3
(xn 3)(3n 6)
- -- -

3 m)
-

3n

ItXS)
·

=
= .

%So

i
:
in
·
Example of multiplying &

I
-
1 13
12 1 , 1 , 0 , 1 ,
0
, ,
,
· order of elements ofXSn :

homo
is group
B
a

AxSE Su 919 % -an p)


=

subgr ,
a
an-jan EA in a

[19--
id)
:
an
=> ker9 =
,

,
(a-yan id) (ba bn id)
A because
--

, ,
, ,

= Labe arbr,
--
,
anby ,
id)
,

(a) --, an 9) such that ord(p)


m
So in
=
:
g =
,

= ge A
then have game
if in addition A =
Es we

X*
,

<g) satisfy e
=

since every xAn(A =

4 5 6 5 8
10 12 153
Possible order of elements of So [1 =
2 3 , , . , ,

26.
. , . , ,

31 8 12, 157033 6 24 30

of ESXSg
, -.,
elements
10
,
of
,
,
2.
possible
%
--

order
,
= , ,
=
Some subgroups of I" x So

subgroup (this is
beng on prevpage)
Tx Se
- a

Su
Sle e p) :
BeSn] =

H ,
p)
= --

B)(e
,
·
, - .
e,
(e e,
.
.

"denity
---
,

of Ky ,
.. O
ie
-(e .
-
e
-.. pp) ,

: XSn >
-
Es
anifmeareusa
p
(o
·

+
a , +--
a ... -- an

plac ---
-
92
,
9) =

homo.
group
amp)p(a -aup)
is
Claim
a
p
p(a
--, an p))
= - -
,

wis :

plumianp)(a! . ,

an as --- an
-- an Ba a
,
...

a ,

=api) LHS
=
RHS
subgroup, of index 3
.
· her(p) is a
the tiles (1, j), (2, j), (3, j) are in the clockwise order. (There are
three ways of doing so for each j. Just choose one for each j).

(The labelling on the left is allowed while the one on the right is not).
Now we can prove the first statement of the theorem. Identify
G with a subgroup of S I J as above, and let g be as in the cen-
tralizer theorem (with m 3, n 8). Then it is easy to see that
gx xg for all x G. On the other hand, G obviously have order
38 8!. So G has to be exactly the centralizer of g.
Lemma. Define p : Cmn ⊋ Sn Cm by
p(a1 , . . . , an , ω) a1 an . Then p is a surjective group homo-
morphism.
This is proved by a routine verification.
Lemma. For any y Cmn ⊋ Sn , p(ygy 1 ) p(g), for all g
Cmn ⊋ Sn .
Lemma. Let f : G Cmn ⊋ Sn be the isomorphism obtained
above, via labelling the 24 tiles using I J . Let f 1 : G Cmn ⊋ Sn
be the isomorphism obtained by using another labelling. Then
f 1 (g) f (xgx 1 ) for some x G.
Lemma. f (G) ker( p), where f is as in the preceding lemma.
P ROOF. It suffices to prove f (g) ker( p) for each g among the
6 generators. Let g be one of the generator. According to the
preceding lemmas, it suffices to verify f (g) ker( p) using any f
arising from an admissible labelling. fe(x) fu(f x[')
=

similar to Su.

eleme
for
Another way K** So
some
is
JESX
to actually construct
anison
If W Sx Su
.

= n =
,

is to choose a encumbents
way of
=
actually constantismGS diff is S
For example, consider g to be the basic move of turning the
red side clockwise in the picture below:

What is f (g) C38 ⊋ S8 ? Assume that we are labeling the


vertices on the red side with j, k, l, m. Now we may choose to
label the red tiles as (1, j), (1, k), (1, l), (1, m). It is then easily
seen that f (g) is of the form (e, e, e, e, e, e, e, e, ω) and hence
f (g) ker( p).
f

= G - XSS
Lemma. f (G) maps surjectively to S8 under the natural homo-
morphism C38 ⊋ S8 S8 .
P ROOF. Since G is generated by 6 explicit generators, the image
of f (G) in S8 is generated by 6 elements that we can easily write
down, and each is a 4-cycle. The remains of this lemma is a nice
exercise.
To prove the theorem, we will in fact prove the following more
precise result (which describes the group G, not merely giving its
order):
Theorem. f (G) ker( p).

This theorem follows easily from the next lemma, whose proof
is fairly easy.
Lemma. Assume m is a prime and n > 1. There are exactly four
subgroups H of Cmn ⊋ Sn satisfying that H maps surjectively to Sn .
The complete list is:
Cmn ⊋ Sn ,
e n ⊋ Sn ,
ker( p),
the subgroup (a, . . . , a, ε ) Cmn ⊋ Sn : a Cm , ε Sn .
A consequence. The order of an element of G is among

1, 2, . . . , 8, 10, 12, 15 2, 4, . . . , 16, 20, 24, 30 .


is
P ROOF. This follows from: the order of an element of S8 is among
1, 2, . . . , 8, 10, 12, 15 .
Notice that these numbers are failry small compared with the
group order 37 8! 8.8 108 .
Variations of the 3 3 3 Rubik’s cube. Now we will start to
analyze the 3 3 3 Rubik’s cube. But in fact there are slightly
different realizations of the puzzle. We need to be specific about
this so that we have a well-defined group to deal with.
Rubik cubes with pictures. The most difficult 3 3 3 Rubik’s
cube looks like this:
Imagine the central piece containing Van Gogh’s nose is ro-
tated by 90 degrees. This makes no difference on an ordinary cube
whose central pieces is pure colored. But it represents a different
state in this picturesque cube. For simplicity I won’t consider this
type of cubes.
Different sets of basic moves. I will consider the following as basic
moves.
Some people prefer to include the inverse of these as basic
moves. This doesn’t change the group theory (but it effects the
counting of how many moves are used to solve a puzzle).
A more serious problem is: do you want to consider rotating a
middle layer as a basic move? This would be a move that relocates
the central pieces, while all our basic moves fix the central pieces.
Therefore this choice will change the group theory. For simplicity
I will stick with my choice of 6 basic moves.
The corner-only puzzle and the edge-only puzzle.

You can rip off the color stickers of the non-corner pieces (or
the non-edge pieces) and get a new puzzle game. I strongly recom-
mend you play and solve these puzzles before you do the Rubik’s
cube puzzle (in its classical form). In fact, we are going to study
the group theory of these two puzzles first.
The group theory of the corner-only puzzle. You would soon
realize that the game play and the group theory of the corner-only
version of the 3 3 3 Rubik’s cube is identical to those of the
2 2 2 Rubik’s cube. So we already understand this. In particular,
the puzzle has 38 8! possible states but only 1/3 of them can be
played out (without disassembling the puzzle).
The group theory of the edge-only puzzle. There are 24 colored
tiles that are being moved around by the 6 basic moves. So the
game can be regarded as computing within a subgroup G generated
by 6 elements of S24 .
We now can make a series of observation, each is very similar
to what we have seen in the study of the 2 2 2 Rubik’s cube.
The group G is contained in a larger group G representing
all possible states (obtained by disassembling and reassem-
bling the cube).
The 24 tile positions naturally fall into 12 pairs, correspond-
ing to the 12 edges of the cube.
We can label the tile positions as t1 , t1 , . . . , t12 , t12 so that ti
and ti are tile positions adjacent to the same edge. Then the
element (t1 t1 ) (t12 , t12 ) (a product of 12 disjoint transpo-
sitions) commutes with every element of G.
The group G is exactly the centralizer of the above elements.
It is isomorphic to S212 ⊋ S12 , of order 212 12!.
The subgroup G of G, regarded as a subgroup of S212 ⊋ S12 ,
maps surjectively onto S12 .
The group G can be identified with ker( p), where p : C212 ⊋
S12 C2 is the map we defined before (noticing S2 C2 ).
We remark that everything in the previous page can be ob-
tained by pure thinking, except that the surjectivity of G S12
would requires a bit calculation, which is fun to work out on an
actual Rubik’s cube.
The group theory of the 3 3 3 Rubik’s cube. Let us denote
the group of the corner-only puzzle by G C , so G C 37 8!. Let
us denote the group of the edge-only puzzle by G E , so G E
211 12!.
Recall that G C is generated by 6 specific elements, correspond-
ing to the 6 basic moves. Denote them by gC,1 , . . . , gC,6 . Simi-
larly, G E is generated by 6 elements, denoted by g E,1 , . . . , g E,6 .
Naturally, we assume that the basic move corresponding to gC,i
also corresponds to g E,i .
Recall also we have the bigger groups G C and G E .
The direct product G G C G E represents all the possible
states of the 3 3 3 Rubik’s cube (obtained by disassembling
and reassembling). The group G of the 3 3 3 Rubik’s cube can
be defined to be the subgroup of G generated by the following 6
elements:

(gC,1 , g E,1 ), . . . , (gC,6 , g E,6 ).

Obviously, G is a subgroup of G C G E .
Define two homomorphisms sgnC , sgn E : G 1 as fol-
lows: sgnC is the composition
sgn
G GC GE GC C38 ⊋ S8 S8 1,

and sgn E is the composition


sgn
G GC GE GE C212 ⊋ S12 S12 1.
The map G 1 given by g sgnC (g) sgn E (g) is also a
homomorphism, to be denoted by sgnC E .
Theorem. G (G C GE) ker(sgnC E ), hence it is of order
1
12
38 8! 212 12!.

Remark. The group order is 5.2 1020 . The Rubik’s cube was
originally advertised as having “over 3,000,000,000 combinations
but only one solution”. The statement was impressive but it is a
serious understatement.

The containment is easy: for each generator gi : (gC,i , g E,i ),


the image of gC,i in S8 is a 4-cycle, and the image of g E,i in S12 is
also a 4-cycle. Therefore, sgnC E (gi ) ( 1)( 1) 1.
To prove the containment , the key is to show that the image
of G under the map G S8 S12 is

(ε, ϑ ) S8 S12 : sgn(ε ) sgn(ϑ ) .

This follows from a well-known result of Galois (Artin 7.5.4, Fraleigh


15.15), together with a few lines of simple and conceptual argu-
ments. The theorem is easy after this key step.

You might also like