Discrete Mathematics MAA103 – Bachelor – Year 1
Course webpage: https://moodle.polytechnique.fr/course/view.php?id=17566
Instructor: Hasnaa Zidani (HZ) (housnaa.zidani@polytechnique.edu)
Instructor: Guillaume Dujardin (GD) (guillaume.dujardin@polytechnique.edu)
Tutorial Assistants:
– Ana Fernandez Baranda (groups 1&7, ana.fdz25@gmail.com)
– GD, HZ and Alexopoulos Konstantinos (groups 3&6, guillaume.dujardin@polytechnique.edu, housnaa.zidani@polytechnique.
edu and konstantinos.alexopoulos@polytechnique.edu)
– Emmanuel Kammerer (groups 4&5, emmanuel.kammerer@polytechnique.edu)
– Adriano Prade (groups 2&8, adrianoprade99@gmail.com)
Week 5, March 14th: Permutations
1 Basic exercises
Exercise 1. Fix an integer n ≥ 3.
1. Find two permutations σ, τ ∈ Sn such that σ ◦ τ = τ ◦ σ.
2. Find two permutations σ, τ ∈ Sn such that σ ◦ τ ̸= τ ◦ σ.
Solution of exercise 1.
1. Take σ = τ = Id.
2. Take σ = (1, 2, 3) and τ = (1, 2) in the cycle representation. Then
σ ◦ τ = (1, 2, 3) ◦ (1, 2) = (1, 3), τ ◦ σ = (1, 2) ◦ (1, 2, 3) = Id.
Exercise 2.
1. List all the elements of S4 which are 3-cycles.
2. Fix two integers 2 ≤ k ≤ n. How many different k-cycles of Sn are there? Justify your answer.
Solution of exercise 2.
1) The 3-cycles of S4 are (1, 2, 3), (1, 3, 2), (1, 2, 4), (1, 4, 2) (1, 3, 4), (1, 4, 3), (2, 3, 4), (2, 4, 3).
There are 8 of them.
2) A k-cycle of Sn may be constructed by first a choice of the k elements of its support ( nk
choices), and then by an ordering of these k elements (k! choices). However, in this construction,
every k-cycle is counted k times. Therefore the total number is
n n!
(k − 1)! × = .
k k(n − k)!
Remark. For n = 4 and k = 3, we get 8 3-cycles in S4 , which is consistent with the first
question.
1
Discrete Mathematics MAA103 – Bachelor – Year 1
Course webpage: https://moodle.polytechnique.fr/course/view.php?id=17566
2 Important exercises
!
1 2 3 4 5 6 7 8
Exercise 3. Consider the permutation σ =
3 5 4 8 7 6 2 1
1. Compute σ −1 .
2. Write σ as a product of cycles with disjoint supports.
3. Write σ 2 in table notation and in cycle notation.
4. Compute σ 2023 .
Solution of exercise 3.
1. We read the “table” representation of σ upwards:
!
−1 1 2 3 4 5 6 7 8
σ = .
8 7 1 3 2 6 5 4
2. We have σ = (1, 3, 4, 8)(2, 5, 7).
3. We can either use the “table” representation, or the cycle representation. In view of the next
question, lets use the cycle notation. Then
(1, 3, 4, 8)2 = (1, 3, 4, 8)(1, 3, 4, 8) = (1, 4)(3, 8), (2, 5, 7)2 = (2, 5, 7)(2, 5, 7) = (2, 7, 5).
Notice that cycles with disjoint supports (and more generally permutations with disjoint sup-
ports) commute.
Hence
σ 2 = (1, 4)(3, 8)(2, 7, 5)
and !
2 1 2 3 4 5 6 7 8
σ = .
4 7 8 1 2 6 5 3
4. We use the cycle representation and observe that
(1, 3, 4, 8)3 = (1, 8, 4, 3), (1, 3, 4, 8)4 = Id, (2, 5, 7)3 = Id.
Since 2023 ≡ 3 mod (4) and 2023 ≡ 1 mod (3), we get that
σ 2023 = (1, 3, 4, 8)2023 (2, 5, 7)2023 = (1, 3, 4, 8)3 (2, 5, 7) = (1, 8, 4, 3)(2, 5, 7).
2
Discrete Mathematics MAA103 – Bachelor – Year 1
Course webpage: https://moodle.polytechnique.fr/course/view.php?id=17566
Exercise 4.Let n ∈ N∗ , and σ ∈ Sn be a permutation. We call i(σ) the index of σ defined as the smallest
integer k ∈ N∗ (if it exists) such that
σk = σ
| ◦ ·{z
· · ◦ σ} = Idn .
k times
1. In this question, we assume n = 6, σ1 = (2, 4, 5) and σ2 = (1, 3). Compute, if it exists, i(σ1 ), i(σ2 )
and i(σ1 ◦ σ2 ).
2. Assume that σ = (x1 , · · · , xp ) is a p−cycle with 2 ≤ p ≤ n. Show that σ p = Idn and ∀k ∈
{1, · · · , p − 1}, σ k ̸= Idn . Deduce i(σ) .
3. Let σ ∈ Sn be an arbitrary permutation. We consider the sequence (τk )k∈{1,··· ,n!+1} defined by
∀k ∈ {1, · · · , n! + 1}, τk = σ k = σ
| ◦ ·{z
· · ◦ σ} .
k times
(a) Show that there exists two different integers l < m such that τl = τm .
(b) Deduce that there exists k ∈ N∗ such that σ k = Idn . Deduce that i(σ) always exists for any σ.
(c) Show that i(σ) ≤ n! .
Solution of exercise 4.
1. We compute σ12 = (2, 5, 4), σ13 = Id6 , σ22 = Id6 . From which we deduce that i(σ1 ) exists and
is equal to 3, i(σ2 ) exists and is equal to 2. For the composition, we remark that σ1 and σ2
having disjoint supports commute. Therefore, calling σ3 = σ1 ◦ σ2 = (1, 3)(2, 4, 5), we get
respectively σ32 = σ12 ◦ σ22 = σ12 = (2, 5, 4), σ33 = σ13 ◦ σ23 = σ2 = (1, 3), σ34 = σ14 ◦ σ24 = σ1 ,
σ35 = σ15 ◦ σ25 = σ12 ◦ σ2 = (2, 5, 4)(1, 3), and eventually σ36 = σ16 ◦ σ26 = Id6 . Therefore, i(σ3 )
exists and is equal to 6.
2. Since σ = (x1 , · · · , xp ), we have σ(xi ) = xi+1 for i ∈ {1, · · · , p − 1}, σ(xp ) = x1 and σ(k) = k
for k ∈/ {x1 , · · · , xp }. The application of σ corresponds to a shift of the index of xi by 1. We
therefore deduce that σ p (xi ) = xi while σ p (k) = k for k ∈ / {x1 , · · · , xp }, or in other words that
σ = Idn . Now, let us take k ∈ {1, · · · , p − 1}, we have σ k (x1 ) = xk+1 ̸= x1 and therefore
p
σ k ̸= Idn . This is sufficient to deduce that i(σ) exists and is equal to p.
3. (a) We consider the set of permutations T = {τ1 , · · · , τn!+1 } that consists of n! + 1 permu-
tations. Since the cardinality of Sn is n!, by the pigeonhole principle, at least two per-
mutations of T are equal. This exactly means that there exists two numbers l and m in
{1, · · · , n! + 1} such that l ̸= m and τl = τm . Since l and m are different, we may further
assume l < m (by inverting the roles of l and m if it were not the case).
(b) Being a permutation, τl = σ l is a bijection with inverse σ −l = (σ −1 )l Composing the
3
Discrete Mathematics MAA103 – Bachelor – Year 1
Course webpage: https://moodle.polytechnique.fr/course/view.php?id=17566
equality τl = τm with σ −1 leads to
σ m−l = Idn .
which is the desired property with k = m − l ≥ 1. We also deduce that i(σ) exists and is
smaller or equal to k.
(c) Eventually, noticing that l and m belong to {1, · · · , n! + 1} we deduce that
k = m − l ≤ (n! + 1) − 1 = n! .
Being smaller than k, we also have i(σ) ≤ k ≤ n! as desired.
Exercise 5. Fix an integer n ≥ 1 and a permutation π ∈ Sn . Show that the function f : Sn → Sn defined
by f (σ) = σ ◦ π for every σ ∈ Sn is a bijection.
Solution of exercise 5. We first check that f is one-to-one. Let σ, σ ′ ∈ Sn be such that f (σ) = f (σ ′ ).
Then σ ◦ π = σ ′ ◦ π. By composing by π −1 on the right, we get that σ ◦ π ◦ π −1 = σ ′ ◦ π ◦ π −1 .
Therefore σ = σ ′ , so that f is one-to-one.
We next show that f is onto. Let τ ∈ Sn be a permutation. Then f (τ ◦ π −1 ) = τ ◦ π −1 ◦ π = τ .
This shows that τ has at least one preimage by f , so that f is onto.
We conclude that f is a bijection.
Exercise 6. Fix an integer n ≥ 2, a permutation σ ∈ Sn and consider a p-cycle c = (a1 , a2 , . . . , ap ). Show
that σ ◦ c ◦ σ −1 = σ(a1 ), . . . , σ(ap ) .
Solution of exercise 6.First, it is a simple matter to see that σ ◦ c ◦ σ −1 (k) and (σ(a1 ), . . . , σ(ap )(k)
take the same value for k ∈ {σ(a1 ), . . . , σ(ap )}. If k ̸∈ {σ(a1 ), . . . , σ(ap )}, then σ −1 (k) ̸∈ {a1 , . . . , ap },
so that c ◦ σ −1 (k) = σ −1 (k). It follows that
σ ◦ c ◦ σ −1 (k) = σ ◦ σ −1 (k) = k = (σ(a1 ), . . . , σ(ap )(k).
This completes the proof.
3 More involved exercises
Exercise 7.
Fix an integer n ≥ 2 and consider the circular permutation c = (1, 2, . . . , n − 1, n). Find all
the permutations σ ∈ Sn that commute with c (that is σ ◦ c = c ◦ σ).
Solution of exercise 7. First notice that every permutation σ of the form σ = ci with i ≥ 0 commutes
with c.
Conversely, assume that σ ∈ Sn commutes with c. Then σ ◦ cσ −1 = c. But by exercise 6,
4
Discrete Mathematics MAA103 – Bachelor – Year 1
Course webpage: https://moodle.polytechnique.fr/course/view.php?id=17566
σ ◦ c ◦ σ −1 = (σ(1), σ(2), σ(3), . . . , σ(n)). Therefore c = (σ(1), σ(2), σ(3), . . . , σ(n)). This implies that
there exists an integer i such that 1 ≤ i ≤ n and σ(1) = i, σ(2) = i + 1 mod (n), . . . , σ(n) = i + n − 1
mod (n). Therefore σ = ci−1 .
This shows that the permutations σ ∈ Sn that commute with c are the permutations ck with
k ≥ 0.
Exercise 8. Fix integers 1 ≤ k ≤ n. If σ ∈ Sn is a permutation and 1 ≤ k ≤ n, we say that k is a record
of σ if for every 1 ≤ i ≤ k − 1 we have σ(i) < σ(k). Show that the number of permutations of Sn having k
cycles in their cycle decomposition (including cycles of length one) is equal to the number of permutations
of Sn having k records.
Hint. Try to find a bijection!
Solution of exercise 8.
Start with a permutation σ ∈ Sn . Consider its cycle decomposition, written
in such a way that each cycle starts with its largest element, and such that the cycles are ordered in
increasing order of their first elements (and we write cycles having only one element in this writing).
For example, if σ = (1, 4)(3, 9)(2, 7, 5) ∈ S9 , we write σ = (4, 1)(6)(7, 5, 2)(8)(9, 3). Then let f (σ) be
the permutation obtained in table notation by erasing the parentheses. With the previous example,
this gives !
1 2 3 4 5 6 7 8 9
f (σ) = .
4 1 6 7 5 2 8 9 3
In order to show that f is a bijection, we explicitly construct its inverse function. More precisely,
if π is a permutation written in table notation, let g(π) be the permutation in cycle notation obtained
by inserting an opening parenthesis at the beginning, a closing parenthesis at the end, and a “)(”
before every record, except the first. For example, if
!
1 2 3 4 5 6 7 8 9
π=
4 1 6 7 5 2 8 9 3
with records in red, we get g(π) = (1, 4)(3, 9)(2, 7, 5).
By construction, it is a simple matter to see that f (g(σ)) = g(f (σ)) = σ for every σ ∈ Sn . This
implies that f is a bijection and that g is its inverse bijection.
In addition, by construction σ has k cycles (including those with one element) if and only if f (σ)
has k records. This implies the desired result.
Remark. The number s(n, k) of permutations of Sn having k cycles is called the Stirling number
of the first kind.
Exercise 9. Let n be an odd integer and σ ∈ Sn . Show that 4 divides
Qn
i=1 (σ(i)
2 − i2 ).
Solution of exercise 9. Start with writing
n
Y n
Y n
Y
(σ(i)2 − i2 ) = (σ(i) − i) · (σ(i) + i).
i=1 i=1 i=1
5
Discrete Mathematics MAA103 – Bachelor – Year 1
Course webpage: https://moodle.polytechnique.fr/course/view.php?id=17566
The idea is to show that each one of these two big products contain at least one even term. To this
end, observe that ni=1 σ(i) = ni=1 i, so that ni=1 (σ(i) − i) and ni=1 (σ(i) + i) are both even (the
P P P P
first sum is zero). But these terms have an odd number of terms (since n is odd). Hence in both of
these sums, at least one term is even. This completes the proof.
Exercise 10.Fix an integer n ≥ 1 and consider in the vector space Rn , the subspace (hyperplane) H
defined by H = {(x1 , . . . , xn ) ∈ Rn : x1 + x2 + · · · + xn = 0}. Denote by (ei )1≤i≤n the canonical basis
of Rn . For every σ ∈ Sn , let fσ : Rn → Rn be the endomorphism such that fσ (ei ) = eσ(i) for every
1 P
1 ≤ i ≤ n. Set p = n! σ∈Sn fσ .
1. Show that p is a projector, that is p ◦ p = p (hint: You may use the result of exercise 5).
2. Find ℑp and ker p.
Solution of exercise 10.
1. First note that p is an endomorphism as a linear combination of endomorphisms. Then write
X 2
2 1 1 X
p = 2 fσ = fσ ◦ fσ′ .
n! n!2
σ∈Sn σ,σ ′ ∈Sn
But fσ ◦ fσ′ = fσ◦σ′ and the map σ 7→ σ ◦ σ ′ is a bijection from Sn to itself. It follows that for
fixed σ ′ ∈ Sn ,
X X
fσ◦σ′ = fσ .
σ∈Sn σ∈Sn
Therefore
X X
2 1 X 1 X n! X
p = 2 fσ◦σ′ = 2 fσ = 2 fσ = p.
n! ′ n! ′ n!
σ ∈Sn σ∈Sn σ ∈Sn σ∈Sn σ∈Sn
This shows that p is a projector.
2. First note that for fixed 1 ≤ i, j ≤ n, there are (n − 1)! permutations σ such that σ(i) = j. It
follows that for 1 ≤ i ≤ n,
n n
1 X 1 X 1 X 1X
p(ei ) = fσ (ei ) = eσ(i) = · (n − 1)! ek = ek .
n! n! n! n
σ∈Sn σ∈Sn k=1 k=1
Therefore, setting
n
1X
u= ek ,
n
k=1
we have
ℑp = Vect(p(e1 ), . . . , p(en )) = Vect(u).
6
Discrete Mathematics MAA103 – Bachelor – Year 1
Course webpage: https://moodle.polytechnique.fr/course/view.php?id=17566
To find ker p, if x = x1 e1 + · · · + xn en ∈ Rn , write
n
X n
X n
X
p(x) ⇐⇒ xk p(ek ) = 0 ⇐⇒ xk u = 0 ⇐⇒ xk = 0 ⇐⇒ x ∈ H,
k=1 k=1 k=1
where H = {(x1 , . . . , xn ) ∈ Rn : x1 + x2 + · · · + xn = 0}.
We conclude that p is the projection on Vect(u) parallel to H.
4 Fun exercise (optional)
Exercise 11. The names of 100 mathematicians are placed in 100 wooden boxes, one name to a box, and
the boxes are lined up on a table in a room. One by one, the mathematicians are led into the room;
each may look in at most 50 boxes, but must leave the room exactly as she found it and is permitted
no further communication with the others. The mathematicians have a chance to plot their strategy in
advance, and they are going to need it, because unless every single mathematician finds her own name
all will subsequently lose their funding. Note that these mathematicians have an extraordinary memory,
and are able to memorize the order of passage of all their colleagues. Find a strategy for them which has
probability of success (mathematics survive) exceeding 30%.
1
Remark. If each mathematician examines a random set of 50 boxes, their probability of success is 2100
(each mathematician that opens 50 boxes at random among 100 has a probability 21 to find her name),
which is very very small.
Solution of exercise 11. See https://en.wikipedia.org/wiki/100_prisoners_problem.