Week 13
Week 13
Permutations
7.2. Example. For any set A, the identity map, 1A , defined by 1A (a) = a for all
a ∈ A, is a permutation of A.
Example. S3 consists of
! ! !
1 2 3 1 2 3 1 2 3
, , ,
1 2 3 1 3 2 2 1 3
! ! !
1 2 3 1 2 3 1 2 3
, , .
3 2 1 3 1 2 2 3 1
Compositions
ρ ◦ π (a) = ρ (π (a))
for all a ∈ A. Further, if ρ and π are bijections then ρ ◦ π is a bijection. Hence the
composition of permutations is a permutation. We record this in the following
7.7. Remark. The product of permutations is, in general, not commutative, mean-
ing that ρπ may be different from πρ.
Thus
! !
1 2 3 4 5 1 2 3 4 5
ρ◦π = ◦
4 2 1 3 5 2 3 4 5 1
!
1 2 3 4 5
= .
2 1 3 5 4
ρ ◦ π 6= π ◦ ρ,
Inverses
Recall, a bijection always has an inverse. The inverse of a permutation written in the
two row manner can easily be found by exchanging the rows, and then reordering
the columns so that the entries on the upper row appear in the correct order.
Solution ! !
−1 4 2 1 3 5 1 2 3 4 5
ρ = = .
1 2 3 4 5 3 2 4 1 5
You can check that your answer satisfies the definition of inverse:
! !
1 2 3 4 5 1 2 3 4 5
◦
4 2 1 3 5 3 2 4 1 5
! !
1 2 3 4 5 1 2 3 4 5
= ◦ = 15 .
3 2 4 1 5 4 2 1 3 5
Permutations 68
Cycles
Proof Assume that permutations σ, τ ∈ Sn are disjoint. We need to show that σ(τ (a)) =
τ (σ(a)) where a ∈ Nn is arbitrary. Since a cannot be both in Move(σ) and in Move(τ ),
one has σ(a) = a or τ (a) = a; without loss of generality, assume σ(a) = a.
We claim that τ (a) is also fixed by σ. This is true if τ (a) = a, since a is fixed by σ.
Otherwise, τ (a) 6= a; the permutation τ is a bijection hence an injection, so, applying
τ to both sides, we obtain τ (τ (a)) 6= τ (a). This shows that τ (a) ∈ Move(τ ), so τ (a) ∈
/
Move(σ), as claimed.
Now, using the assumption a = σ(a), we conclude that σ(τ (a)) = τ (a) = τ (σ(a)).
7.14. Warning. The converse of the proposition does not hold. If σ, τ commute, i.e.,
στ = τ σ, it does not necessarily mean that σ, τ are disjoint. An easy example is: σ
commutes with σ for all σ ∈ Sn , but σ is not disjoint with σ if σ 6= 1n .
i.e.
a1 7→ a2 7→ a3 7→ . . . 7→ ar 7→ a1 ,
then ρ is called a cycle of length r, sometimes called an r-cycle. The r-cycle above
will be denoted by
(a1 , a2 , a3 , . . . , ar ) .
Permutations 69
Remark. We can take r = 1 in the definition to get a 1-cycle, (a1 ). But such a cycle
fixes all elements of Nn and is thus the identity. Hence all 1-cycles equal the identity,
i.e. (a) = 1n for all a ∈ Nn .
7.17. Example. (i) Two permutations seen before were cycles. Namely, ρ, π ∈ S5 ,
!
1 2 3 4 5
ρ= = (1, 4, 3) ,
4 2 1 3 5
and
!
1 2 3 4 5
π= = (1, 2, 3, 4, 5) .
2 3 4 5 1
as seen before. And we can compose cycles written in this notation, remembering to
read from the right. So, in S5 ,
!
1 2 3 4 5
ρ ◦ π = (1, 4, 3) ◦ (1, 2, 3, 4, 5) = ,
2 1 3 5 4
as seen before. Again, we did this by noting that π moved 1 to 2 which ρ then fixed.
Next π moved 2 to 3 which ρ moved to 1. Continue.
Permutations 70
Note that because composition of functions is not commutative this table is not sym-
metric about the leading diagonal (which makes it different to earlier tables we have
seen for (Zm , +) , (Zm , ×) and (Z∗m , ×)).
Factoring permutations
Problem with this Question. In the last section we factored integers into prime
numbers. What is the equivalent of prime numbers for permutations?
Solution
(1) Take the smallest ‘unused’ element in {1, 2, 3, 4, 5, 6} , namely 1. See what π does
to 1 on repeated applications. It sends 1 to 5. Then π sends 5 to 4. Next π sends
4 back to 1. Thus we have a cycle (1, 5, 4).
(2) Next look at the smallest ‘unused’ element, i.e not in the cycles already found. In
this case it is 2. Then we what happens to 2 under repeated applications of π, i.e.
2 7−→ 6 7−→ 2 and so we get another cycle (2, 6).
(3) Repeat by taking the smallest element not in these two cycles. We have only one
such element 3, and we see this is fixed by π, and so we get a 1-cycle (3), which
we know is the identity. When there is at least one non-identity cycle we can omit
the identity (3).
(4) When all elements are ‘used’, i.e. in some cycle, finish.
Permutations 71
Hence
π = (1, 5, 4) ◦ (2, 6) ◦ (3) = (1, 5, 4) ◦ (2, 6) .
So in this way a permutation is factored into cycles, and thus cycles can be considered
an analogue of prime numbers.
It can be proved that each new cycle contains no elements in any earlier cycle. That
is, the new cycle is disjoint from all the earlier cycles.
Proof. No formal proof given, but you should master the factorisation algorithm above.
Order of a permutation
7.20. Definition.
It can be shown by induction that powers satisfy the expected properties of exponents:
finite (the number of all permutations is n!), hence ρj : j ≥ 0 is a finite set. Therefore
we must have repetition, i.e. ∃` > k ≥ 0 for which ρ` = ρk . Pre-multiplying both sides
by ρ−k , we obtain
Remark. The order of a permutation exists, because by Lemma 7.23, it is the least
element of a non-empty set of positive integers.
Let !
1 2 3 4 5 6
π= .
5 6 3 1 4 2
Write π as a product of disjoint cycles. Hence find π 2 , π 3 , π 4 , π 5 , π 6 .
Solution Using the algorithm above to factorise π into disjoint cyces, we obtain
Now, since disjoint cycles commute, we can swap (1, 5, 4) and (2, 6) in the following
calculation:
π 2 = ππ = (1, 5, 4)(2, 6)(1, 5, 4)(2, 6) = (1, 5, 4)(1, 5, 4)(2, 6)(2, 6) = (1, 5, 4)2 (2, 6)2 .
We observe that the permutation (1, 5, 4)2 maps the elements 1, 5 and 4 as follows:
1 7→ 5 7→ 4, 5 7→ 4 7→ 1, 4 7→ 1 7→ 5
Permutations 73
where each arrow is one application of the cycle (1, 5, 4); elements other than 1, 5 and
4 are fixed by (1, 5, 4)2 . We conclude that
(2, 6)2 = 1.
We arrive at
π 2 = (1, 4, 5).
Arguing in the same way, we find
Note, writing π as disjoint cycles makes it easier to compute π k . We found that the
order of π is 6.
Remark. Computing all the successive powers of π until we obtain identity is inefficient
if we only want to find the order of π. What if we had a permutation from S100 ? How
many powers would we have to compute? Can the order be anywhere near 100! (greater
than the number of electrons in observable universe)?
Question. Is there a better way to find the order from disjoint cycles?
We first answer the question for permutations for which the order is easy to find: cycles.
Sketch of proof. To simplify the notation, instead of a cycle (a1 , a2 , . . . , ar ) we will use
the cycle π = (1, 2, . . . , r). Note that π(1) = 2, π 2 (1) = π(2) = 3, etc; using induction,
one shows that π k (1) = 1 + k if k < r. This means that π k 6= 1 if k < r.
On the other hand we have π r (1) = π(π r−1 (1)) = π(r) = 1. Moreover, for all i,
1 ≤ i ≤ r, we have π r (i) = π r (π i−1 (1)) which equals π i−1 (π r (1)) = π i−1 (1) = i. This
shows that π r = 1. Hence r is the least positive integer with this property, that is, the
order of π.
7.27. Remark. One should be aware that powers of a cycle may not be cycles: e.g.,
(1, 2, 3, 4)2 = (1, 3)(2, 4).
Permutations 74
7.28. Proposition. If the order of ρ is d then, for any m ∈ Z, ρm = 1 if, and only if,
d | m.
ρm = ρdq ρr = (ρd )q ρr = 1q ρr = ρr .
We are almost ready to state the result about the order of an arbitrary permutation. It
depends on the following
To see this, write k = f q + r where 0 ≤ r < f , them each mi divides k and f hence
divides their linear combination r = k − f q. So r is a common multiple, but f is the
least positive common multiple, yet r < f . Hence r cannot be positive. The only
remaining possibility is r = 0 so that f | k.
π = π1 ◦ π2 ◦ .... ◦ πm
π k = (π1 ◦ π2 ◦ .... ◦ πm )k .
Since the permutations on the right hand side are disjoint the compositions commute,
so they can be moved around to give
Remark. Although the Theorem is true for any set of disjoint permutations, in practice,
given a permutation π we decompose it into a product of disjoint cycles.
Solution We need to find positive integers a, b, c, ... that sum to 12 but for which
lcm (a, b, c, . . . ) is as large as possible. Just search to find 12 = 3 + 4 + 5, when
lcm (3, 4, 5) = 60. So, for example
Solution CAREFUL, the cycles are not disjoint! We have to write this as a product
of disjoint cycles. The way we do this is similar to factorising a permutation given in
two-row notation. We start with 1 and note that an element is not moved by a cycle or
a product of cycles where it does not appear. So, for example,
(2,3,6)◦(6,7) (1,2,4,6,8)
1 −−−−−−−→ 1 −−−−−−→ 2
Finally, 5 is fixed by π so will not appear in the decomposition into disjoint cycles. We
obtain
π = (1, 2, 3, 8) ◦ (4, 6, 7),
now a composition of disjoint cycles. The order is lcm (4, 3) = 12.
Binary Operations
Question, why, earlier in the course did we call (Sn , ◦), the set of permutations on n
elements under composition, the Symmetric Group on n elements?
∀a, b ∈ S, a ∗ b ∈ S.
Permutations 77
∀c, d ∈ C, c ∗ d ∈ C.
7.35. Example.
7.36. Example. Z20 is closed under ×20 . But {[4]20 , [8]20 , [12]20 , [16]20 } ⊆ Z20 is also
closed, we can draw up a table
A binary operation may (or may not) satisfy the following important properties.
7.37. Definition.
∀a, b ∈ S, a ∗ b = b ∗ a.
∀a, b, c ∈ S, (a ∗ b) ∗ c = a ∗ (b ∗ c) .
∀a ∈ S, e ∗ a = a and a ∗ e = a.
7.39. Example. {[4]20 , [8]20 , [12]20 , [16]20 , ×}. This binary operation is commutative
and associative. Looking back at the table above we see that the identity is [16]20 .
This last example is important, it shows that we get identities different to 1 and 0!
7.40. Lemma. Suppose that ∗ is a binary operation on a set S and that (S, ∗) has an
identity. The identity is unique.
If, in the multiplication table for (S, ∗) , we can find an element whose row (and whose
column) is identical to the heading row (respectively heading column), then we have
found the identity.
a ∗ b = e and b ∗ a = e.
The problem here is that 6 = 2 × 3 is composite. We have got round this in two ways in
this course. First we can look at (Zp , ×) with p prime, when every non-zero element has
an inverse. The second way it to look at (Z∗m , ×) where we have simply thrown away all
the elements that don’t have an inverse!
If, for an i ∈ S we can look in its row in the multiplication table and find the identity
in column j, say, and find in row j the identity in column i then i and j are inverse to
each other. If we can do this for every i ∈ S then every element will have an inverse.
7.44. Lemma. Assume that the binary operation ∗ on S is associative. Assume that
(S, ∗) has an identity e and a ∈ S has an inverse. Then the inverse is unique.
Permutations 80
b = b ∗ e = b ∗ (a ∗ c) since c is an inverse of a,
= (b ∗ a) ∗ c by associativity,
= e∗c since b is an inverse of a,
= c.
Groups
7.45. Definition. Given a set G and binary operation ∗ on G we say that (G, ∗) is a
group if, and only if,
∃e ∈ G : ∀a ∈ G, e ∗ a = a ∗ e = a,
We say that (G, ∗) is a commutative or abelian group (after Niels Abel) if, and only
if, it is a group and ∗ is commutative.
Recall that in the course we showed that Z∗n is closed under multiplication. This was
done by taking [a]n , [b]n ∈ Z∗n and showing that
What is important here is not the value of the inverse but that the product [a]n [b]n has
an inverse. For this implies [a]n [b]n ∈ Z∗n as required for closure.
(x ∗ y)−1 = y −1 ∗ x−1 .
(x ∗ y) ∗ y −1 ∗ x−1 (x ∗ y) ∗ y −1 ∗ x−1
=
using ∗ is associative
x ∗ y ∗ y −1 ∗ x−1
=
again using ∗ is associative
= (x ∗ e) ∗ x−1
= x ∗ x−1
= e.
So (x ∗ y)∗ y −1 ∗ x
−1 = e. It is similarly shown that y −1 ∗ x−1 ∗(x ∗ y) = e. Together