0% found this document useful (0 votes)
259 views

Cycles in Permutations

1. A permutation is an arrangement of elements of a set into a one-to-one correspondence with another set (often the set of integers from 1 to n). It can be represented by a matrix or as a composition of disjoint cycles. 2. Random permutations can be generated by randomly selecting the elements of the permutation matrix or by having people randomly choose seats around tables to form cycles. 3. Stirling numbers of the first kind count the number of permutations that can be decomposed into a given number of cycles. They have properties related to factorials and binomial coefficients.

Uploaded by

shubhro roy
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)
259 views

Cycles in Permutations

1. A permutation is an arrangement of elements of a set into a one-to-one correspondence with another set (often the set of integers from 1 to n). It can be represented by a matrix or as a composition of disjoint cycles. 2. Random permutations can be generated by randomly selecting the elements of the permutation matrix or by having people randomly choose seats around tables to form cycles. 3. Stirling numbers of the first kind count the number of permutations that can be decomposed into a given number of cycles. They have properties related to factorials and binomial coefficients.

Uploaded by

shubhro roy
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/ 12

Cycles in permutations

Maths Beyond Limits — September 16–18, 2020 — Łukasz Bożyk

Throughout the classes we will distinguish two kinds of problems:


∀i — to be solved during i-th class, ∃i — suggested for i-th τ (homework).

Elevator riddle. We are given an (n + 1)-floor building with floors num-


bered from 0 (ground floor) to n. A mathematician is in an elevator on the
last floor and pursues the following strategy until he gets to the ground floor:
if he is on the k-th floor, he chooses a lower floor (from 0 to k − 1) at random
and takes the elevator there.

(a) Find the average number of elevator rides.

(b) Find the average number of the last floor visited before the ground floor.

1. What is a permutation?

Permutation of an n-element set (for short: n-permutation) is any assignment


of exactly one element of this set to every its element.

Permutation can be also considered as an ordering of the set, i.e. an assign-


ment to its elements the numbers of positions from the set {1, 2, . . . , n}. This
is the set n-permutations are often considered over (and will be henceforth
unless stated otherwise); another convenient way is to take {0, 1, . . . , n − 1}.

Matrix notation of a permutation σ of the set {1, 2, . . . , n} is an arrangement


of the form !
1 2 3 ... i ... n
,
σ(1) σ(2) σ(3) . . . σ(i) . . . σ(n)
where σ(i) is the element assigned by σ to i. This permutation can be shortly
and uniquely encoded with the bottom row of the matrix above, i.e. an n-term
sequence in which every number from 1 to n appears exactly once.

For example, 9-permutation ( 14 22 31 43 57 68 76 89 95 ), which (considered as a func-


tion) maps 1 to 4, 2 to 2, 3 to 1, etc. can be shortly encoded as 421378695.
If the mapping is denoted by an arrow, we can also write

1 → 4 → 3 → 1, 2 → 2, 5 → 7 → 6 → 8 → 9 → 5,

which gives motivation to look at n-permutations in a different way.


A cycle of permutation σ containing element i is a maximal sequence of
mutually different terms
(i, σ(i), σ(σ(i)), σ(σ(σ(i))), . . .)
and any of its cycle shifts. In the presented example there are three cycles:
(1, 4, 3), (2) and (5, 7, 6, 8, 9), where k-element cycles can be written in k
ways, e.g. (1, 4, 3) = (4, 3, 1) = (3, 1, 4). A one-element cycle is called a fixed
point of a permutation.

Cycle notation of a permutation σ shows decomposition of σ into disjoint


cycles (possibly omitting fixed points), where every cycle starts with its least
element and the cycles are sorted increasingly with respect to their least
elements. For instance (1, 4, 3)(2)(5, 7, 6, 8, 9) or (1 4 3)(5 7 6 8 9) is a cycle
notation of the permutation given in the example.

The permutations treated as compositions of cycles can be interpreted as


ways for n people to sit around some tables, where two such arrangements
are considered equivalent iff everyone has the same right neighbor in both of
them. Each table corresponds to a cycle and the right neighbor of i to σ(i).
1 2 5
7 9

4 3
6 8

The number of n-permutations is equal to n! := 1 · 2 · 3 · . . . · n (n factorial).


Indeed, every permutation is uniquely determined by a series of choices for
consecutive σ(i). Value σ(1) can be chosen in n ways, σ(2) — in n − 1 (from
the numbers different from σ(1)), σ(3) — in n − 2 ways etc., finally there
are two choices for σ(n − 1) and only one choice for σ(n) (the one unused
number). We also put 0! = 1.

The method of choosing a permutation described above is connected with


the matrix notation — we basically choose the bottom row. There is also
a method concerning cycle notation; we will present it via sittings around
tables. Suppose that people numbered from 1 to n are subsequently choosing
a place to sit. The person i can either open a new table (constructing a new
cycle), or put their chair directly to the right of one of already sitting i − 1
people (prolonging one of the existing cycles); there are i choices altogether.
Thus the total number of possible sittings equals n! (as different sets of choices
yield different sittings).
The permutation described in the example could have therefore be chosen in
the following manner: person 1 opened the first cycle (there was no choice for
them), person 2 also chose a new table, person 3 sat to the right of 1, person 4
— to the right of 1 (taking place between 3 and 1), person 5 opened third
cycle, and 6, 7, 8, 9 had their chairs put to the right of 5, 5, 6, 8, respectively.

Exercise 1. Give the matrix and the cycle notation for the permutation
illustrated below.
6 9 12 8
7 13
4 10
2 11
3 1 5 14

Who did person 7 choose to sit to the right of (if the cycle scheme of permu-
tation choice is considered)?

Exercise 2. (a) Consider the set {0, 1, . . . , 9} and a mapping σ, which


assigns to d the last digit of the number 7d. Check that σ is a permutation
and find its cycle decomposition.

(b) Consider the set of residues modulo 9 and functions f , g, h defined on it


in the following way:
f g h
x 7→ 2x + 1 mod 9, x 7→ 3x + 1 mod 9, x 7→ 4x + 1 mod 9.
Determine, which functions are permutations of the given set and find their
cycle decompositions.

(c) For which integers a, b is f (x) = ax + b mod m a permutation of the set


of residues modulo m?

2. Random permutations

The methods of choosing a permutation described before can be easily mo-


dified to obtain methods of selecting them at random, i.e. in such a way that
each possible choice of a n-permutation is equally probable (so the probability
1
equals n! ).

In the case of matrix notation we start with drawing σ(1) (each possible
value with chance n1 ), then we draw σ(2) from among the remaining numbers
1
(chance n−1 for each of them), etc. Each n-permutation has then a chance
of being chosen equal to n1 · n−1
1
· . . . · 21 · 1 = n!
1
.
We similarly modify the scheme with tables: i-th person (or generally i-th
element) with equal probability 1i chooses one of i options: either takes a
seat right to one of already sitting i − 1 people (joins an existing cycle), or
sits by an empty table (opens a new cycle). Every arrangement (so every
permutation) has probability of obtaining: 1 · 21 · . . . · n−1
1
· n1 = n!
1
.

∀1 2.1. (a) What is the probability that element 1 is a fixed point of a random
n-permutation?
(b) What is the average number of fixed points in an n-permutation?

∀1 2.2. (a) What is the probability that elements 1 and 2 are in the same cycle
of a random n-permutation?
(b) What is the probability that elements i and j (1 6 i < j 6 n) are
in the same cycle of a random n-permutation?

∀1 2.3. (a) What is the probability that a random n-permutation contains


exactly one cycle?
(b) How many n-permutations are composed of exactly one cycle?
(c) Let 1 6 k 6 n. What is the probability that every cycle of a random
n-permutation contains an element not greater than k?

∀1 2.4. What is the average number of cycles in an n-permutation?

3. Stirling numbers of the first kind

Definition. Number of n-permutations decomposing into exactly k cycles


is called a Stirling number of the first kind and denoted
" #
n
.
k
n 0
Moreover we put 0 = 0 for n > 1 and 0 = 1.
3 4 4 7
Exercise 3. Calculate (directly from the definition): 1 , 3 , 2 , 4 .

∀1 3.1. Prove that:


n
" # " # ! " #
n n n X n
(a) = (n − 1)!, (b) = , (c) = n!.
1 n−1 2 k=0
k
" #
n
∃1 3.2. Find a formula for in a form of a polynomial of variable n.
n−2

" # " # " #


n+1 n n
∀1 3.3. Prove that for every 1 6 k 6 n: =n + .
k k k−1

combined with boundary conditions 00 = 1,


 
The
n
above recurrence relation
n
0  = 0 for n > 1 and k = 0 for k > n, allows for a systematic calculation
of nk for consecutive n (resulting in so called Stirling triangle).
k 0 1 2 3 4 5 6
n
0 1 0 0 0 0 0 0
1 0 1 0 0 0 0 0
2 0 1 1 0 0 0 0
3 0 2 3 1 0 0 0
4 0 6 11 6 1 0 0
5 0 24 50 35 10 1 0
6 0 120 274 225 85 15 1

7
Exercise 4. Write down the next row, i.e. find k for 0 6 k 6 7.

n
" #
X
k n
∃1 3.4. Prove that for n > 2: (−1) = 0.
k=1
k

∃1 3.5. Prove that:

n
!" #" # " # !
X n k n−k n a+b
(a) = ,
k=0
k a b a+b a
m
" # " #
X n+k n+m+1
(b) (n + k) = ,
k=0
k m
n
" # " #
X k n! n+1
(c) = .
k=m
m k! m+1
∀2 3.6. Prove that for every n > 1 and x ∈ R holds
n n
" #
Y X n k
(x + k − 1) = x .
k=1 k=1
k

Algebraic interpretation of the symbol nk from the previous exercise allows


 

to find alternative solutions to many other problems.

Exercise 5. Solve as many problems from this script as possible using the
identity from the previous problem, choosing adequate value for x.
n
X 1
Definition. The sum Hn := is called n-th harmonic number.
k=1
k

∀2 3.7. (a) Fix a cycle of length k. To how many different n-permutations does
it belong?
(b) How many different cycles of length k and elements from the set
{1, 2, . . . , n} are there?
(c) What is the total number of cycles in all n-permutations?
(d) Prove that n-permutation has Hn cycles on average.
" #
n+1
∃2 3.8. Prove that = n!Hn .
2

4. The Transition Lemma

Sometimes instead of the classical cycle notation another is worth considering:


such that the least elements of the cycles (each positioned at the beginning)
appear in a decreasing order (and we do not omit fixed points). For instance,
9-permutation (1 4 3)(5 7 6 8 9) is encoded as (5 7 6 8 9)(2)(1 4 3).

The key feature of the notation described above is that we can omit the
brackets and it remains unique. The structure of cycle decomposition can be
then encoded with use of ‘ordinary’ ordering of elements. Existence of this
particular bijection is called the transition lemma.

Exercise 6. (a) Which 9-permutation would be with use of the described


method encoded as 974658213?

(b) Prove the described property, i.e. that after omitting the brackets they can
be uniquely added (allowing for reconstruction of the initial permutation).
∀2 4.1. Prove directly (not having used previous problems) that
n
" # " #
X n n+1
k = .
k=1
k 2

∃2 4.2. Prove that:


n n
" # ! " # " #
X n k n+1 X n k
(a) = , (b) 2 = (n + 1)!.
k=m
k m m+1 k=0
k

∃2 4.3. (a) In how many n-permutations does element 1 belong to a cycle of


length k?
(b) Prove that the average sum of squares of lengths of a random
n-permutation is equal to 21 n(n + 1).

∀2 4.4. Let 1 6 k 6 n. What is the probability that all elements not greater
than k of a random n-permutation belong
(a) to the same cycle;
(b) to k different cycles?

Lockbox riddle. There are n locked boxes and n keys, each matching a
different lock. The keys are put in the boxes randomly (in each box there is
exactly one key). We can force opening of exactly k boxes (e.g. by cutting the
locks), where 0 6 k 6 n. Then we might get access to some keys allowing for
opening other locked boxes, keys from which would allow to open yet other
ones etc.

∀2 4.5. What is the probability that (after cutting k locks) we will succeed to
open all the boxes?

Plane riddle. In a plane there are n seats (n > 2), each on a ticket of
exactly one passenger. The first n−1 passengers enter the plane and take their
seats at random (independently on a seat number on their tickets). When the
last passenger enters the board: if his seat is free he takes it, otherwise he
asks the passenger sitting on the taken seat to switch place to the one they
have on their ticket. Then the other passenger stands up, goes to their seat
and the procedure is repeated (he sits if his seat is free and asks for switching
seats otherwise). This goes on until someone sits on the empty place.
∃2 4.6. (a) What is the probability that the passenger who was first to enter
the plane would have to switch seats?
(b) What is the average (expected) number of passengers who would
have to switch seats?

5. Structure of cycle decomposition

∀2 5.1. (a) Let 21 n < k 6 n. How many n-permutations contain a cycle of


length k?
n n
(b) Let m+1 <k6 m , where 1 6 m 6 n. In how many n-permutatiions
is the longest cycle of length k?

Prisoners riddle. Head officer of a prison offered the following deal to


100 prisoners (numbered from 1 to 100). In his office he had put a collection
of 100 boxes (numbered from 1 to 100) in which he had located numbers of
prisoners (each in exactly one box) at random.

The prisoners enter the office one after another and everyone is allowed to
open and look into exactly 50 boxes (of their own choice and in whatever
order they want); then the boxes are locked again. If every prisoner succeed
to find their number, all of them can go free, otherwise (if at least one of
them does not find their number) — they remain imprisoned forever. Before
the first prisoner enters the office they have time to discuss the strategy, but
then they loose any possibility of communication with each other.

For instance if they agree to choose boxes randomly, then one particular
prisoner will succeed with chance 12 , so all of them will be set free with
1
probability 2100 ≈ 8 · 10−31 . . .

∀3 5.2. Provide a strategy giving the prisoners over 30% chance to be set free.

∃3 5.3. (a) Suppose that the head officer did not put the numbers at random
but he deduced the prisoners’ strategy and located the numbers da-
stardly. How does it affect the chances of the prisoners?
(b) Suppose now that the head officer is gracious and allowed the first
prisoner not only to see the contents of all boxes, but also to swap the
numbers in two of them (of his choice). How does it affect the chances
of the prisoners?
∀3 5.4. Let (mk )sk=1 be nonnegative integers such that sk=1 kmk = n. Prove
P

that the number of n-permutations which have exactly mk cycles of


length k equals
s
Y 1
n! mk m !
.
k=1
k k

∀3 5.5. Let p be a prime number.


(a) Prove that if 2 6 k 6 p − 1, then kp is divisible by p.
 

(b) Prove that (p − 1)! + 1 isdivisible by p.


p
(c) Prove that if p > 3, then 2 is divisible by p2 .
(d) Deduce the following theorems from previous parts:
Wilson’s theorem
An integer n > 2 is prime iff n | (n − 1)! + 1.
Wolstenholme’s theorem
If p > 3 is prime, then the numerator of the fraction Hp−1 (written in
the reduced form) is divisible by p2 .

k
" #
n n! X Y 1
∃3 5.6. Prove that = , where ri > 1.
k k! k
r
i=1 i
P
ri =n
i=1

∃3 5.7. (a) How many (2m)-permutations have all the cycles of even length?
(b) Let n = km. Prove that the number of n-permutations having only
cycles of length divisible by k is equal to

n! m−1
Y
m
(ki + 1).
k m! i=1

6. Derangements and fixed points

Definition. An n-permutation with no fixed points is called an n-derange-


ment. Denote the number of n-derangements by Dn ; also put D0 = 1.

Exercise 7. Calculate (directly from the definition) Dk for k = 1, 2, 3, 4, 5.

n n
! !
X n X n
∀3 6.1. Prove that Dn−k = k Dn−k .
k=0
k k=0
k
∃3 6.2. Prove that if n > 2, then Dn = (n − 1)(Dn−1 + Dn−2 ).

n
X (−1)k
∃3 6.3. Prove that: (a) Dn = n! · , (b) Dn = nDn−1 + (−1)n .
k=0
k!

The power series representation of the exponential function, i.e. the fact that
for every real x holds

X xn
ex = ,
n=0
n!
where e ≈ 2.71828 is the base of natural logarithm, allows to deduce from
the first part of the previous problem that Dn ≈ n!/e.

∀3 6.4. There are n people at a party, each having a hat. When leaving, every
person took a random hat. What is the probability that at least one
person took their own hat? How can this probability be approximated
for large n?

∃3 6.5. How many n-permutations do not contain any cycle of length k? Argue
that for large n this number is approximately equal to e−1/k .

∃3 6.6. Prove that the number of n-derangements decomposing into exactly k


cycles is equal to
k
!" #
X n n−i
(−1)i .
i=0
i k − i

7. One combinatorial identity

n
" #
X n n−k
∀3 7.1. Prove that 2 = (2n − 1)!!.
k=1
k

∀3 7.2. Consider the following experiment. Choose an n-permutation at ran-


dom and then paint each of its cycles red or blue (independently for
each cycle the chances for both colours are 21 ).
(a) What is the probability that exactly k elements will be painted red?
(b) Prove that
n
! !
X 2k 2n − 2k
= 4n .
k=0
k n − k
Answers to exercises 3.1. (a) In how many ways can the cycle notation be
chosen? (b) How many cycles of length 2 would it be?
1. Matrix form: (c) Right-hand side equals n!, so we should count all
the n-permutations; with respect to what?

1 2 3 4 5 6 7 8 9 10 11 12 13 14

9 5 10 3 11 4 2 14 1 6 13 7 12 8 ; 3.2. It is convenient to write the formula with use
of binomial coefficients in the first place, and then
transform it into a polynomial. How many cycles of
cycle form: particular lengths can an (n−2)-cycle n-permutation
have?
(1 9)(2 5 11 13 12 7)(3 10 6 4)(8 14);
3.3. The number of possible choices of an (n + 1)-
permutation of the set {0, 1, . . . , n} can be counted
to the right of 5 (and then 11, 12, 13 between them). independently in two cases: according to whether 0 is
or is not a fixed point.
2. (a) (0)(1793)(2486)(5). (b) Functions f and h:
f = (013764)(25)(8), h = (015348672); g is not a 3.4. It may be helpful to divide all the n-per-
permutation (as e.g. g(0) = g(3)). (c) For all pairs mutations into pairs with the property that within
(a, b) such that NWD(a, m) = 1. Then each pair one permutation has an even, and the other
one has odd number of cycles. E.g. such pairs that the
number of cycles differs by 1.
f (x) = f (y) ⇐⇒ m | a(x − y) ⇐⇒ m | x − y,

3.5. (a) In a restaurant there are a + b tables, by


so if f (x) = f (y), then x = y, hence f is injective. which n people are to be seated. Exactly a tables are
On the other hand, if NWD(a, m) = d > 1, then in hall A and exactly b tables are in hall B. How to
m/d mod m 6= 0 and count such sittings? (b) The permutations of the set
{0, . . . , n + m} can be counted with respect to the
a number of the greatest element, which is not a fixed
f (m/d) = m · + b mod m = b = f (0), point. (c) The (m + 1)-cycle permutations of the set
d {0, . . . , n} can be counted with respect to how does
the cycle containing 0 look like.
so f is not a permutation.
3   3 3 3.6. It suffices to compare coefficients of terms xk
3. (a) = 2, 4 = 6, 4 = 4
+ = 11, on both sides. The right one is rather clear. For the
7 17 3
7
 5
2
 3
 3
7
1 4 1 left one: let 0 = a1 < a2 < . . . < ak 6 n; how many
= ·5·3+ + = 735. k-cycle n-permutations are there such that a1 , a2 ,
4 1 2 2 1 3 1
. . ., ak are the least elements of the cycles?

4. The next row: (0, 720, 1764, 1624, 735, 175, 21, 1).
3.7. (a) The remaining elements should be permuted
somehow. (b) Choose k elements and arrange them in
5. E.g.: 3.1. (a) Coefficient of x equals (n − 1)!. (b)  a cycle. (c) Using previous points count all the cycles
n
Coefficient of xn−1 equals 1+2+. . .+(n−1) = 2
. with respect to their length k. (d) Divide the answer
in the previous point by n!.
(c) x = 1. 3.4. x = −1. 4.2. (b) x = 2. 7.1. x = 1
2
.
3.8. The recurrence from problem 3.3. can be used.
6. (a) (9)(7)(4658)(2)(13) or equivalently (13)(4658). Also the permutations of the set {0, 1, . . . , n} can
(b) Consider the following procedure: highlight the be counted with respect to the length of the cycle
first term and then every term which is least than without 0.
each of the highlighted so far. The highlighted elements
are then the first terms of the cycles, so the opening 4.1. RHS stands for 2-cycle permutations of the set
brackets can be put directly before them. {0, 1, . . . , n} (each consisting of a cycle with 0 and a
cycle without 0). LHS stands for permutations of the
7. (D1 , D2 , D3 , D4 , D5 ) = (0, 1, 2, 9, 44). set {1, . . . , n} with one highlighted cycle. An appro-
priate bijection can be pointed with help of the trans-
ition lemma (encoding non-highlighted cycles from
Hints to problems the LHS with one of the cycles from the RHS so-
mehow).
2.1. (a) Exactly when in the first step of ‘matrix
drawing’ 1 is chosen. (b) Every element has the sa- 4.2. (a) Similarly as in the previous problem, but
me probability for being a fixed point (and this is the this time k-cycle n-permutations with m highligh-
number of fixed points that this element ‘contributes’ ted cycles are to be counted. (b) Also similarly:
to the permutation on average). now we highlight some number of cycles (for k-cycle
n-permutation each cycle is either highlighted, or
2.2. (a) Exactly when in the second step of ‘cycle not).
drawing’ person 2 sits to the right of person 1. (b)
For each pair the probability will be the same. 4.3. (a) How does the alternative cycle notation for
such permutation look like? (b) How many, on avera-
2.3. (a) In ‘cyclic drawing’ nobody but 1 can open ge, does adding the k-th element (during ‘cycle dra-
a new cycle. (b) This number divided by n! is the wing’) ‘contribute’ to the sum of squares of cycle
answer in the previous point. (c) As in (a), but this lengths? The previous point may turn out useful.
time no element greater than k can open a new cycle.

2.4. What is the average raise in number of cycles in


i-th step of ‘cycle drawing’ ?
4.4. In both cases one of the methods might be to 6.2. In a derangement σ of length n holds either
consider ‘cycle drawing’ of an n-permutation. Alter- σ(σ(1)) = 1, or σ(σ(1)) 6= 1. In how many ways
natively: how does the ‘bracketless’ cycle notation of the rest of the structure of a derangement can be
these specific kinds of permutations look like? Look obtained in each of these cases?
at the order only among numbers not greater than k.
6.3. (a) Principle of Inclusion-Exclusion for sets Ai
4.5. Let σ(i) be the number of the lockbox the key to of those σ that σ(i) = i may turn out useful. (b)
which is placed in the block number i (where boxes Make use of the previous part.
with numbers not greater than k are forced open).
How to formulate the riddle using σ? What follows 6.4. Use the previous problem and the remark just
from the solution of problem 2.3. (c)? after it.

4.6. (a) Several cases for n may be checked in or- 6.5. Try Principle of Inclusion-Exclusion for sets Ac
der to conjecture the right answer; maybe compare it of those σ, which contain a fixed cycle c of length
with the solution of problem 2.2. (b), or the trans- k in their decomposition. Take a look at the remark
ition lemma. Consider the permutation that assigns about power series expansion of ex .
the seat number to a passenger. (b) Take a look at
problem 4.3. (a).
6.6. Principle of Inclusion-Exclusion for sets Ai of
those k-cycle σ, which have a fixed point i.
5.1. (a) If a permutation contains such cycle,
then there is exactly one of a kind. So one co-
7.1. RHS is the number of ways to divide a
uld count cycles, not permutations. (b) Principle of
(2n)-element set into pairs. If we consider the set
Inclusion-Exclusion may turn out useful; every such
{1, 10 , 2, 20 , . . . , n, n0 }, then each such division can
permutation contains at most m such cycles.
be associated with some n-permutation in some num-
ber of ways (depending on the number of cycles this
5.2. Prisoners can condition the drawer to be opened permutation decomposes to).
with the content of the one just opened. Part (a) and
an approximate equality 1 − (H100 − H50 ) ≈ 0.31
7.2. (a) What is the probability that a permutation
may turn out useful.
containing exactly i+j cycles will have precisely i red
cycles (having exactly k elements altogether)? Make
5.3. (a) Does not change at all; the prisoners can use of the previous problem. (b) Make use of the pre-
ensure randomness somehow, they do not need it to vious part.
be guaranteed by the director. (b) The probability
reaches 100% — as the first prisoner knows every-
thing, it suffices for him to change the permutation
in such a way that the potential reason of losing is
eliminated.

5.4. Consider all n! arrangements of the elements of


a set {1, 2, . . . , n} into a sequence. Each of them is
Further reading
corresponding some (which?) permutation with pa-
rameters {mk }s in the same number (which?) of • Martin Aigner
k=1 A Course in Enumeration
ways. E.g. first m1 elements can denote the cycles of
length 1 pierwsze m1 , the next 2m2 elements may be (2007) pp. 24–31
corresponding to (put in some order) cycles of length • Arthur T. Benjamin, Jennifer Quinn
2 etc. Proofs That Really Count
(2003) pp. 91–107
5.5. (a) The previous problem can be used. (b) Part
(a) and problem 3.1. (c) can be used. (c) Part (a) and • Miklós Bóna
problem 3.6. for x = −p, n = p can be used. (d) To A Walk Through Combinatorics
prove Wilson’s theorem, having proved the part (b), (2006) pp. 128–149
it suffices to check that for composite n the divisibili-
ty does not hold. In case of Wolstenholme’s theorem • Miklós Bóna
part (c) and problem 3.8. may turn out useful. Combinatorics of Permutations
(2004) pp. 73–127, 213–245
5.6. Similarly as in problem 5.4., a permutation can • Miklós Bóna
be encoded (in a particular number of ways) by a Introduction to Enumerative Combinatorics
sequence of length n with an additional structure im- (2007) pp. 195–253
posed on it. Sequences (ri )k
i=1 are lengths of k cycles
written down in an order. • Richard P. Stanley
Bijective Proof Problems
(2009) pp. 10–18
5.7. (a) How a (2m)-permutation σ with all cycles of
even length can be chosen? There are 2m − 1 possi- • Richard P. Stanley
ble choices for σ(1) (everything but 1), for σ(σ(1)) as Enumerative Combinatorics Vol. 1
well (everything but σ(1)), for σ(σ(σ(1))) (indepen- (2011) pp. 29–37
dently on which of the two options above takes place)
there are 2m − 3 possibilities etc. (b) Just generalize
the reasoning from the previous part.

6.1. Both sides of the equality are equal to n!. LHS is


the total number of all the n-permutations (counted
somehow), RHS is the total number of all fixed points Contact: Łukasz Bożyk
among all the n-permutations (how many of them are
there?). [email protected]

You might also like