Chapter 2

Chapter 2
Permutations & Permutation Statistics
(2.1) Denition
the set
Let
Sn
be the set of all permutations
π = (π1 , . . . , πn ) = π1 · · · πn
{1, . . . , n}.
π ∈ Sn we identify the inverse permutation π −1
αi = j ⇔ i = πj , e.g.
For any
where
π −1 = (4, 5, 2, 3, 1);
π = (5, 3, 4, 1, 2),
A
of
permutation statistic
is a function
α3 = 2,
as
π −1 = (α1 , . . . , αn )
3 = π2
f : Sn → Z.
2.1 Descents & the Eulerian Polynomial
2.1.1.)
(2.2) Denition
at position
i
if
(
πi > πi+1 .
π = (π1 , . . . , πn ) ∈ Sn , we
descent set of π ∈ Sn is
For
The
Des(π) = {i : πi > πi+1
and
say that a
descent
occurs
1 ≤ i < n}
and the number of descents is
des(π) = | Des(π)|
(2.3) Example
If
π = 1234,
If
π = 54321,
(
2.1.2.)
then
π = 5243176,
then
Des(π) = {1, 3, 4, 6}
and
des(π) = 4.
Des(π) = ∅, des(π) = 0.
then
(2.4) Remark
1234567
If
Des(π) = {1, 2, 3, 4}, des(π) = 4.
♦
0 ≤ des(π) ≤ n − 1.
(2.5) Proposition
2.1.3.)
The number of permutations in Sn with k descents equals
the number of permutations in Sn with n − 1 − k descents,
(
|{π ∈ Sn : des(π) = k}| = |{π ∈ Sn : des(π) = n − 1 − k}|
27
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
Proof (Using complement operation).
Given
π = (π1 , . . . , πn ) ∈ Sn ,
dene
f : Sn → Sn
f (π) = f (π1 , . . . , πn ) = (n + 1 − π1 , . . . , n + 1 − πn )
i ∈ Des(π), then πi > πi+1 ⇒ −πi < −πi+1 ⇒ n+1−πi < n+1−πi+1
i 6∈ Des(f (π)). In a similar way, if i ∈ Des(f (π)), then i 6∈ Des(π).
Notice that if
and thus
i ∈ Des(π) ⇔ i 6∈ Des(f (π))
So
des(π)+des(f (π)) = n−1. Since f (f (π)) = π , the map f
Sn . Hence
is a involution, and therefore
a bijection, on
|{π ∈ Sn : des(π) = k}| = |{π ∈ Sn : des(f (π)) = n − 1 − k}|
= |{π 0 ∈ Sn : des(π 0 ) = n − 1 − k}|
Proof (Using the reverse operation).
Given
π = (π1 , . . . , πn ) ∈ Sn ,
dene
f : Sn → Sn ,
r(π) = (πn , . . . , π1 ) := (π10 , . . . , πn0 )
Notice that if i ∈ Des(π), then πi > πi+1 which gives πi+1 < πi
⇒ πn+1−(n−i) <
0
0
πn+1−(n−i+1) ⇒ πn−i
< πn−i+1
and thus n − i 6∈ Des(r(π)). Similarly,
i ∈ Des(π) ⇔ n − i 6∈ Des(r(π))
So a permutation
Since
r
π with k descents gets mapped to a permutation with n−1−k descents.
is an involution, it is a bijection and so the two sets
{π ∈ Sn : des(π) = k},
{π ∈ Sn : des(π) = n − 1 − k}
have the same size.
(2.6) Example
If
π = 25341,
then
•
•
•
•
f (π) = 41325.
f
−→
•
•
•
•
•
•
(f reects the picture along the horizontal middle axis.)
If
π = 21534,
then
(2.7) Denition
r(π) = 43512.
♦
Let
A(n, k) = |{π ∈ Sn : des(π) = k − 1}|,
dened for
28
0 < k ≤ n.
The numbers
A(n, k)
are called
Eulerian numbers.
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
(2.8) Example
S1 = {(1)}, A(1, 1) = 1.
A(2, 1) = 1, A(2, 2) = 1
S2 = {12, 21},
For S3 :
π
des(π)
123
0
132
1
213
1
231
1
312
1
321
2
A(4, 1) = 1,
Also
(2.9) Remark
A(4, 2) = 11,
N, k ≤ n
A(3, 2) = 4,
A(4, 3) = 11,
A(4, 4) = 1.
A(n, k) = A(n, n − k + 1)
The symmetry
(2.10) Proposition
A(3, 1) = 1,
Hence:
2.1.4.)
A(3, 3) = 1.
♦
is due to proposition (2.5).
Dene A(0, 0) = 1 and A(n, 0) = 0 for n > 0. For n, k ∈
(
A(n, k + 1) = (k + 1)A(n − 1, k + 1) + (n − k)A(n − 1, k)
Proof.
π ∈ Sn
There are 2 ways to form
(i) insert
(ii) insert
n
n
into
into
π 0 ∈ Sn−1
π 0 ∈ Sn−1
with
with
des(π) = k
with
from
π 0 ∈ Sn−1 :
des(π 0 ) = k − 1 and make new descent.
des(π 0 ) = k and do not make new descent.
0
A(n − 1, k) perms π 0 = π10 · · · πn−1
∈ Sn−1 with des(π 0 ) = k − 1.
0
0
0
0
We may insert n between πi and πi+1 so long as πi < πi+1 and in this way form a new
descent; or we can insert n as a prex. There are (n − 2) − (k − 1) + 1 = n − k places to
put n. So this means we can form our new perm in (n − k)A(n − 1, k) ways.
Case (i):
Case (ii):
There are
The same as case (i), except we are not creating a new descent. There are
0
A(n − 1, k + 1) perms π 0 = π10 · · · πn−1
∈ Sn with des(π 0 ) = k . To not form a new descent,
0
0
0
0
0
we can put n after π or insert n between πi and πi+1 such that πi > πi+1 . Number of
places to put n is k + 1. Number of ways is (k + 1)A(n − 1, k + 1).
Hence,
A(n, k + 1) = (k + 1)A(n − 1, k + 1) + (n − k)A(n − 1, k)
(2.11) Denition
For all
n ≥ 0,
the polynomial
An (x) =
n
X
A(n, k)xk
k=0
is called the
nth Eulerian polynomial.
An (x) =
n
X
k=1
For
A(n, k)xk =
n≥1
X
we can write
xdes(π)+1
π∈Sn
29
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
(2.12) Example
A0 (x) = 1
A1 (x) = x
A2 (x) = x + x2
A3 (x) = x + 4x2 + x3
A4 (x) = x + 11x2 + 11x3 + x4
(2.13) Proposition
2.1.5.)
For all n ≥ 1,
(
An (x) = (x − x2 )A0n−1 (x) + nxAn−1 (x)
Proof.
From proposition (2.10) we have
A(n, k + 1) = (k + 1)A(n − 1, k + 1) + (n − k)A(n − 1, k)
i.e.
A(n, k) = kA(n − 1, k) + (n − (k − 1))A(n − 1, k − 1)
Thus
n
X
A(n, k)xk =
k=1
n
X
k(An − 1, k)xk +
k=1
n
X
=x
n
X
(n − (k − 1))A(n − 1, k − 1)xk
k=1
kA(n − 1, k)xk−1 + nx
k=1
n
X
A(n − 1, k − 1)xk−1
k=1
− x2
n
X
(k − 1)A(n − 1, k − 1)xk−2
k=2
= xA0n−1 (x) + nxAn−1 (x) − x2 A0n−1 (x)
= (x − x2 )A0n−1 (x) + nxAn−1 (x)
(2.14) Proposition
2.1.6.)
For all n ≥ 0,
(
An (x) = (1 − x)n+1
+∞
X
in xi
i=0
Proof.
Use induction. For
n = 0, A0 (x) = 1
(1 − x)
1
+∞
X
i=0
30
0 i
and
i x = (1 − x)
+∞
X
i=0
xi =
1−x
=1
1−x
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
Suppose,
An (x) = (1 − x)n+1
+∞
P
in xi .
From prop. (2.13)
i=0
An+1 (x) = x(1 − x)A0n (x) + (n + 1)xAn (x)
"
#
+∞
+∞
X
X
n
n i
n+1
n+1 i−1
= x(1 − x) −(n + 1)(1 − x)
i x + (1 − x)
i
x
i=0
i=1
+ (n + 1)xAn (x)
= −(n + 1)(1 − x)n+1
+ (1 − x)n+2
+∞
X
i=0
+∞
X
in xi+1 + (n + 1)(1 − x)n+1
+∞
X
in xi+1
i=0
in+1 xi
i=1
n+2
= (1 − x)
+∞
X
i
n+1 i
x = (1 − x)
n+2
i=1
+∞
X
in+1 xi
i=0
Hence by the principle of induction, the result is true for all
(2.15) Proposition
2.1.7.)
(
Let
A(x, z) =
+∞
X
An (x)
n=0
Then
A(x, z) =
Proof.
n.
zn
.
n!
1−x
1 − xez(1−x)
By proposition (2.14)
A(x, z) =
+∞
X
n=0
+∞
+∞
n=0
i=0
X
zn X
An (x)
=
(1 − x)n+1
i n xi
n!
= (1 − x)
= (1 − x)
+∞ X
+∞
X
((1 − x)iz)n
i=0 n=0
+∞
+∞
X X
i
x
n=0
i=0
= (1 − x)
+∞
X
zn
n!
xi
((1 − x)iz)n
n!
i (1−x)iz
xe
i=0
n!
!
+∞
X
= (1 − x)
(xe(1−x)z )i
i=0
1−x
=
1 − xez(1−x)
31
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
2.2 Cycle structure & left-to-right maxima
A permutation
π ∈ Sn
may be written in terms of its cycles
1→4→1 2→3→7→2 5→6→5
π = 4371652
We write
π = (14)(237)(56).
(2.16) Denition
This representation is not unique, e.g.
π = (372)(65)(14).
Let
ci (π) = #
cycles of length
i
in
π
and
c(π) = c1 (π) + c2 (π) + · · ·
(2.17) Example
For
π = 4371652,
c1 (π) = 0
c(π) = c2 (π) + c3 (π)
c2 (π) = 2
=2+1=3
c3 (π) = 1
c4 (π) = 0
2(2) + 3(1) = 4 + 3 = 7
.
.
.
(2.18) Remark
Note that
c1 (π) + 2c2 (π) + 3c3 (π) + · · · = n
(2.19) Denition
4371652
is
type
(0, 2, 1, 0, 0, . . .).
Let us dene a
The
of
π
is the vector
standard representation
of
(c1 (π), c2 (π), . . .),
π
e.g. the type of
by requiring
(i) each cycle is written with its largest entry rst
(ii) cycles are written in increasing order of their largest elements.
(2.20) Example
π = 4371652 = (14)(237)(56)
= (41)(723)(65)
satises (i)
= (41)(65)(723)
satises (i)&(ii)
So
π̂ = 41|65|723
(2.21) Remark
32
Notice that we can recover
π
from
π̂
easily:
From left-to-right mark each maximum element seen so far
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
insert brackets before each marked point
(2.22) Example
π̂ =)(31)(542)(7)(86)(9)
123456789
π = (3 5 1 2 4 8 7 6 9)
(2.23) Denition
maxima
of
maxima of
π
Given
πi > π j
if
π = π 1 · · · π n ∈ Sn
j < i. We write
for all
πi
is a
left-to-right
π.
(2.24) Example
•
•
•
π = 2 1 5 4 7 3 6,
•
LRmax(π) = 3
••••
π = 4 3 2 1 5 6 7 8,
(2.25) Proposition
The map
LRmax(π) = 5 .
If π ∈ Sn and π̂ is the standard representation of π , then c(π) =
LRmax(π̂).
Proof.
we say that
LRmax for the number of left-to-right
π → π̂
is a bijection. If
π
has
k
cycles, then
π̂
will have
k
left-to-right
maxima.
The number of
st
1 kind, hence:
π ∈ Sn
with
k
cycles is given by the unsigned Stirling number of the
(2.26) Proposition
|{π ∈ Sn : c(π) = k}| = |{π ∈ Sn : LRmax(π) = k}| = c(n, k)
2.3 Excedances & weak excedances
(2.27) Denition
i
i
Given
π = π 1 π 2 · · · π n ∈ Sn
excedance of π if πi > i,
weak excedance of π if πi ≥ i.
is an
is a
The number of excedances of
π
we say that
is denoted
π
is denoted
exc(π) and the
number of weak excedances of
wexc(π).
(2.28) Example
Let us look at
1234567
If
π = 6̄7̄32514,
then
exc(π) = 2, wexc(π) = 4.
S4
π
exc(π)
wexc(π)
π
exc(π)
wexc(π)
π
exc(π)
wexc(π)
π
exc(π)
wexc(π)
1234
0
4
2134
1
3
3124
1
2
4123
1
1
1243
1
3
2143
2
2
3142
2
2
4132
1
2
1324
1
3
2314
2
3
3214
1
3
4213
1
3
1342
2
3
2341
3
3
3241
2
3
4231
1
3
1423
1
2
2413
2
2
3412
2
2
4312
2
2
1432
1
3
2431
2
3
3421
2
2
4321
2
2
33
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
X
q exc(π) = 1q 0 + 11q 1 + 11q 2 + q 3 = 1 + 11q + 11q 2 + q 3
π∈S4
X
q wexc(π) = 0q 0 + 1q 1 + 11q 2 + 11q 3 + 1q 4 = q + 11q 2 + 11q 3 + q 4
π∈S4
(2.29) Proposition The number of π = π1 · · · πn ∈ Sn with wexc π = k equals the
number of π ∈ Sn with exc π = n − k.
•
•
•
•
•
•
◦
180
•
•
Given π = π1 · · · πn ∈ Sn ,
π = 1432
−→
0
0
let rc(π) = (n + 1 − πn , . . . , n + 1 − π1 ) = (π1 , . . . , πn ). It is easy to see πi ≥ i ⇔
0
πn+1−i
< n + 1 − i. So i is a weak excedance of π i n + 1 − i is not an excedance of
π 0 = rc(π).
Proof.
Idea:
(2.30) Proposition
(1)
(2)
|{π ∈ Sn : exc π = k}| = |{π ∈ Sn : wexc π = k + 1}| = A(n, k + 1)
= |{π ∈ Sn : des π = k}|
Proof.
Let
π = (a1 · · · ai1 )(ai1 +1 · · · ai2 ) · · · (aik−1 +1 · · · an )
be the standard representation of
π
and
π̂ = a1 · · · ai1 ai1 +1 · · · ai2 ai2 +1 · · · an
Immediately we have
a1 , ai1 +1 , . . . , aik−1 +1 are the largest
a1 < ai1 +1 < ai2 +1 < · · · < aik−1 +1
elements of their cycles
Notice that:
If
If
π(ai ) 6= ai+1 , then ai < ai+1
ai < ai+1 , then
(i.e.
i 6∈ Des π̂ ).


 ai+1 > ai
aj > ai
π(ai ) =
,


ai ≥ ai
π(ai ) ≥ ai .
i = n, then π(an ) ≥ an .
i.e.
If
So
(ai < ai+1
or
i = n) ⇔ π(ai ) ≥ ai
i.e.
n − des π̂ = wexc π
34
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
The bijection
π → π̂
k + 1 weak excedances is
(n − (k + 1)) = n − 1 − k descents, which
with k descents = A(n, k + 1). This proves
tells us the number of permutations with
the same as the number of permutations with
is the same as the number of permutations
step
(2).
From the previous proposition we have
|{π ∈ Sn : exc π = n − k}| = |{π ∈ Sn : wexc π = k}|
= A(n, k) = A(n, n + 1 − k)
= A(n, 1 + (n − k))
i.e.
|{π ∈ Sn : exc π = k}| = A(n, k + 1)
and step
(1)
is proved.
(2.31) Remark
X
th
q wexc π = An (q),
the n
Eulerian polynomial
π∈Sn
and
X
An (q)
q
q exc π =
π∈Sn
Any statistic that has the same distribution as
Thus,
exc
and
wexc
des
is called an
Eulerian statistic.
are Eulerian statistics.
2.4 Inversions & the Major index
(2.32) Denition
of
π
if
i<j
and
(2.33) Example
Given
πi > πj .
If
π = π1 · · · πn ∈ Sn
we say the pair
The number of inversions of
π = 314526,
π
(πi , πj ) is an inversion
inv(π).
is denoted
then
(3, 1), (3, 2), (4, 2), (5, 2)
are the inversions of
(2.34) Question
π.
So
What is
inv π = 4.
X
♦
q inv π ≡ fn (q) ?
π∈Sn
For
n = 2, S2 = {(1, 2), (2, 1)}
and thus
f2 (q) = 1 + q .
35
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
For
For
n = 3:
π
inv π
123
0
132
1
213
1
231
2
312
2
321
3
n = 4,
f3 (q) = 1 + 2q + 2q 2 + q 3 = (1 + q)(1 + q + q 2 )
giving
we have
f4 (q) = 1 + 3q + 5q 2 + 6q 3 + 5q 4 + 3q 5 + q 6 = (1 + q)(1 + q + q 2 )(1 + q + q 2 + q 3 )
(2.35) Proposition
(
X
Rodriguez 1839)
For all n ≥ 1,
q inv π = (1 + q)(1 + q + q 2 ) · · · (1 + q + · · · + q n−1 )
π∈Sn
Proof.
0
with π
π ∈ Sn
For homework. Hint: Use induction. Every
∈ Sn−1
and
(2.36) Denition
can be written as
0 ≤ i ≤ n − 1.
Given
π ∈ Sn ,
the
Major index
X
maj(π) =
of
π
π = (π 0 , i)
is
i.
i∈Des π
(2.37) Example
If
π = 12345,
then
(2.38) Remark
set
{0, 1, . . . ,
If
n
2
π = 7314625,
Des π = ∅
and
Notice that for
then
Des π = {1, 2, 5}
and
maj π = 1 + 2 + 5 = 8.
maj π = 0.
π ∈ Sn ,
♦
the statistics
inv
and
maj
take values in the
}.
(2.39) Question
What is
gn (q) =
X
q maj π ?
π∈Sn
g2 (q) = 1 + q,
g3 (q) = 1 + 2 + 2q 2 + q 3 = (1 + q)(1 + q + q 2 ),
...
In fact
X
π∈Sn
q inv π =
X
q maj π ,
for all
n.
π∈Sn
This was rst proven in 1916 by MacMahon. The rst bijective proof was given in 1968
by Foata.
Any statistic that is equi-distributed with
36
inv
(or
maj)
is called
Mahonian.
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
(2.40) Exercise
Try to prove by induction that
X
q maj π = (1 + q)(1 + q + q 2 ) · · · (1 + q + · · · + q n−1 )
π∈Sn
(2.41) The maj-coding of a permutation
0
π 0 ∈ Sn−1 , π 0 = π10 · · · πn−1
, we may
0
0
generate π ∈ Sn by inserting n as a prex, by inserting n between πi and πi+1 for
0
1 ≤ i ≤ n − 2, or inserting n as a sux of π . Label these positions as i = 0, 1, . . . , n − 1
0
0 31 52 43 14 25
from left-to-right, e.g. π =
Given
Sn ∈ π may be described uniquely by a pair (π 0 , i), where π 0 ∈ Sn−1 and
0 ≤ i ≤ n − 1. The surjection ψ : π → π 0 of Sn onto Sn−1 consists of removing n from π ,
So every
ψ(3412) = 312;
[Used in homework involving
To describe the
maj-coding
P
of
ψ(3124) = 312
xinv π .]
π,
we relabel the
n
positions that
n
can be inserted into
as follows:
The
maj-labels
of
π
j = 0 is given to inserting n as a sux of π 0
0
if π has d descents, then from right-to-left we label these j = 1, j = 2, . . . , j = d
0
label j = d + 1 is given to inserting n as a prex of π
from left-to-right label the remaining positions j = d + 2, . . . , j = n − 1
label
Example
π0 =
If the entry
n
of
4
3 5 7̂ 3 2 6 4̂ 2 1 7 6̂ 1 5 0
π ∈ Sn
is in position with
(hat on descents).
maj-label j
in
π0,
then dene
π (n−1) = π 0 = ψ(π)
xn = j
π (n) = π = [π (n−1) , xn ]
Example
For
π = 3724165
π (6) =
In the same way, to
4
above, we have
3 3 2 5 4 2 1 6 6 1 5 0;
π (n−1)
x7 = 3;
there corresponds a pair
π (7) = [π (6) , 3]
[π (n−2) , xn−1 ].
Example
π (6) = 324165
π (5) =
3
3̂ 2 2 4 4̂ 1 1 5 5 0 ;
x6 = 5
37
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
By iteration we obtain a sequence of pairs
[π (n−1) , xn ], [π (n−2) , xn−1 ], . . . , [π (0) , x1 ]
where
π (0)
x1 = 0. (At each step we must maj-relabel
x = (x1 , x2 , . . . , xn ) is called the maj-coding of π .
is the empty permutation and
positions.) The sequence
the
(2.42) Example
π (7) = 3 7 2 4 1 6 5
π (6) =
4
332542166150
x7 = 3
π (5) =
3
3224411550
x6 = 5
=
3
3̂ 2 2 4 4̂ 1 1 0
x5 = 0
π (3) =
3
322110
x4 = 1
π (2) =
2
2110
x3 = 2
1
10
x2 = 1
π
π
(4)
(1)
=
x1 := 0
The permutation
To reconstruct
π
π
has
maj-coding x = (0, 1, 2, 1, 0, 5, 3).
from the
(2.43) Example
If
maj-coding,
π (1) = 1
set
x = (0, 0, 0, 2, 3, 5, 4, 0, 2),
♦
and iterate backwards.
then
π (1) = 1
π (2) = 1 2
π (3) = 1 2 3
.
.
.
π = π (9) = 7 1 5 4 9 2 6 3 8
(2.44) Remark
The number of
In a
maj-coding x = (x1 , . . . , xn ) of π ∈ Sn , we have xi ∈ {0, . . . , i−1}.
maj-codings
(2.45) Proposition
of length
n
is
1 × 2 × 3 × · · · × n = n!
Let ψ be the surjection mentioned above.
(1) For each n ≥ 2 and π 0 ∈ Sn−1 , the generating function for the class ψ −1 (π 0 ) by
the major index is
X
0
q maj π = q maj π (1 + q + q 2 + · · · + q n−1 )
π∈ψ −1 (π 0 )
(2) If x = (x1 , x2 , . . . , xn ) is the maj-coding of π , then maj(π) = x1 + x2 + · · · + xn
(3) If π = [π 0 , xn ], then maj π = maj π 0 + xn .
38
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
Proof.
When
Statement (3) implies statements (1) and (2). So we need only prove (3).
n
is inserted to the right of
π 0 = π (n−1)
(into position with
maj-label
0), we have
maj π = maj[π 0 , 0] = maj π 0 + 0
n is inserted into the descent of π 0 with maj-label xn , where 1 ≤ xn ≤ d = des π 0 , then
the xn descents occurring to the right are shifted 1 position to the right and the other
If
descents remain unchanged, hence
maj[π 0 , xn ] = maj π 0 + 1| + ·{z
· · + 1} = maj π 0 + xn
xn
The same argument holds for
xn = d + 1 .
0
th non-descent of π 0 when π 0 is read from left-to-right (note 1 ≤
πi0 < πi+1
is the k
k ≤ n − d − 2), then the left factor π10 · · · πi0 contains i − k descents and the right factor
0
0
0
0
πi+1
· · · πn−1
contains (d − (i − k) = d − i + k descents. Inserting n between πi and πi+1
with maj-label d + k + 1 increases the major index by
If
(i + 1) + (d − i + k) = d + k + 1 = xn
| {z }
| {z }
new descent
Hence
shifted descents
maj π = maj[π 0 , d+k +1] = maj π 0 +d+k +1 = maj π 0 +xn
for
d+1 < xn ≤ n−1.
To see the generating function of the major index statistic from this
X
X
q maj π =
π∈Sn
q x1 +···+xn
x=(x1 ,...,xn )
xi ∈[[0,i−1]]

=

X

X
q x1  
x1 ∈{0}
x2 ∈{0,1}
q x2  

X

q x3  · · · 
x3 ∈{0,1,2}

X
q xn 
xn ∈[[0,n−1]]
= (1)(1 + q)(1 + q + q 2 ) · · · (1 + q + q 2 + · · · + q n−1 )
2.5 Multisets, Permutations & q-series
(2.46) Denition
(2.47) Example
set
S = {1, 2, 3, 5}.
A
multiset
is a set in which elements may be repeated.
M = {1, 1, 2, 2, 3, 5, 5, 5} = {5, 1, 2, 2, 1, 3, 5, 5}
|M | = 8 for the size of this multiset.
is a multiset on the
We write
A nite multiset (|M |
< +∞)
can be represented by a set
S
and a function
♦
f : S → N0
giving # of repetitions.
39
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
(2.48) Example
and
f,
where
M = {1, 1, 2, 2, 3, 5, 5, 5} is represented by the set S = {1, 2, 3, 5}
f (1) = 2, f (2) = 2, f (3) = 1 and f (5) = 3. We can also write M in the
form
M = {12 , 22 , 31 , 53 }
(2.49) Denition
multiset
of
M,
If
M
is a multiset with pair
(S, f ),
then
M 0 = (S, f 0 )
is a
sub-
if
f 0 (x) ≤ f (x)
for all
x∈S
(2.50) Example
∅ ⊆ {1, 2, 3, 5} ⊆ {1, 1, 2, 3, 5, 5} ⊆ {1, 1, 2, 2, 3, 5, 5, 5}
The number of submultisets of
M = (S, f ) is simply
Y
(f (x) + 1)
x∈S
E.g. the number of submultisets of
M = {12 , 22 , 31 , 53 }
is
(f (1) + 1)(f (2) + 1)(f (3) + 1)(f (5) + 1) = 3 × 3 × 2 × 4 = 72
The set of all multisets
M
(2.51) Example
of a set
S
{a, b, c}
2
|M | = k
with
S
.
k
is denoted
= {aa, ab, ac, bb, bc, cc}
There are 6 multisets of a set with 3 elements that have size 2,
(2.52) Proposition
(
3
= 6.
2
♦
2.5.1.)
n
n+k−1
=
k
k
Proof.
Suppose {b1 , . . . , bk } is a multiset on the set {1, . . . , n}. So 1 ≤ b1 ≤ b2 ≤ · · · ≤
bk ≤ n. Let ai = bi +i−1 for all 1 ≤ i ≤ k . This gives 1 ≤ a1 < a2 < · · · < ak ≤ n+k −1,
i.e. {a1 , . . . , ak } ⊆ {1, . . . , n + k − 1}.
bi → ai denes a map
{1, . . . , n}
{1, . . . , n + k − 1}
→
= {A ⊆ {1, . . . , n + k − 1} : |A| = k}
k
k
This transformation
The inverse map is easily dened by setting
bi = ai − i + 1
fo all
bijection between
(2.53) Corollary
{1, . . . , n}
k
and
2.5.2.)
(
+∞ X
n
k=0
40
{1, . . . , n + k − 1}
.
k
k
xk =
1
(1 − x)n
i.
Hence we have a
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
Permutations of Multisets
Almost all of what we have dened for permutations of a set can be extended to permutations of a multiset in a straightforward way.
If
M = {1, 2, 3, 3},
then the set of all permutations of
M
is
S(M ) = {1233, 1323, 1332, 2133, 2313, 2331, 3123, 3132, 3213, 3231, 3312, 3321}
If
π = 52312155
is a permutation of the multiset
M = {1, 1, 2, 2, 3, 5, 5, 5},
then
Des π = {1, 3, 5}
des π = 3
maj π = 1 + 3 + 5 = 9
inv π = 11
(2.54) Denition
2.5.3.)
(
For
j ∈ N,
dene
(j) = (j)q := 1 + q + q 2 + · · · + q j−1 ;
(0) = (0)q := 1
(j)! = (j)q ! := (1)(2) · · · (j)
n
n
(n)!
=
:=
(a1 )! · · · (am )!
a1 , . . . , am
a1 , . . . , a m q
Setting
q -series
q -factorial
q -multinomial
coefficient
q = 1 in all expressions above recovers the original numbers/factorials/coecients.
We write
n
n
=
k
k q
for
n
k, n − k
(the
q -binomial coeff./Gaussian poly-
nomial).
(2.55) Example
(3) = 1 + q + q 2
(3)! = (1)(2)(3) = (1)(1 + q)(1 + q + q 2 ) = 1 + 2q + 2q 2 + q 3
3
(3)!
(1 + q)(1 + q + q 2 )
=
=
= 1 + q + q 2 = (3)
2
(1)!(2)!
(1) × (1)(1 + q)
3
(3)!
=
= (3)!
(1)!(1)!(1)!
1, 1, 1
(2.56) Exercise
Show that
(2.57) Proposition
(We dene
n
0 q
n
a1 , . . . , am
n
n − a1
am
=
···
a1
a2
am
2.5.4.)
(
For n, k ∈ N0 , k > 0,
n
n−1
n−k n − 1
=
+q
k q
k
k−1 q
q
= 1.)
41
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
Proof.
The right hand side is
(n − 1)q !
(n − 1)q !
n−1
n−k n − 1
+q
=
+ q n−k
k
k
−
1
(k)
!(n
−
k
−
1)
!
(k
−
1)q !(n − k)q !
q
q
q
q
(n − 1)q !
1
q n−k
+
=
(k − 1)q !(n − k − 1)q ! (k)q
(n − k)q
{z
}
|
(?)
(n − k)q + q n−k (k)q
(1 + q + q 2 + · · · + q n−k−1 ) + q n−k (1 + q + · · · + q k−1 )
=
(k)q (n − k)q
(k)q (n − k)q
(n)q
=
(k)q (n − k)q
(?) =
Inserting this into the right hand side equation gives
(n − 1)q !
(n)q !
(n)q
=
=
(k − 1)q !(n − k − 1)q ! (k)q (n − k)q
(k)q !(n − k)q !
(2.58) Proposition
n. Then
(
2.5.5.)
Let M = {1a1 , 2a2 , . . . , mam } with |M | = a1 + · · · + am =
X
q
inv π
=
π∈S(M )
Proof.
n
k q
n
a1 , . . . , am
q
Re-arrange the equation as


X
q inv π0  (a1 )q ! · · · (am )q ! = (n)q !

π0 ∈S(M )
Recall that
X
q inv π = (t)q !
π∈St
Again, this is equivalent to


X


X
q inv π0  
q inv π1  · · · 
π1 ∈Sa1
π0 ∈S(M )


X
q inv πm  =
πm ∈Sam
π∈Sn
equivalent to
X
q inv π0 +inv π1 +···+inv πm =
X
q inv π
π∈Sn
π0 ∈S(M )
π1 ∈Sa1
.
.
.
πm ∈Sam
This equation is what we want to prove.
Consider
φ : S(M ) × Sa1 × · · · × Sam → Sn
φ(π0 , π1 , . . . , πm ) = π
dened by:
42
X
q inv π
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
π1 ∈ Sa1 , . . . , πm ∈ Sam , form a permutation
π ∈ Sn by replacing all the ai occurences of i in π0 by the values
{a1 + · · · + ai−1 + 1, . . . , a1 + · · · + ai−1 + ai }, but in the same order as
they appear in πi .
Given
π0 ∈ S(M )
Example
If
and
n = 8, a1 = 2, a2 = 3, a3 = 3,
then for
π0 = (2, 1, 3, 3, 1, 2, 2, 3) ∈ S({12 , 23 , 33 })
π1 = 21 ∈ Sa1
π2 = 231 ∈ Sa2
π3 = 312 ∈ Sa3
the map will be
42861537
(21331223, 21,
1: 21
The map
φ
231, 312) → (4, 2, 8, 6, 1, 5, 3, 7) ∈ S8
2: 453
3: 867
is a bijection. Also,
inv π0 + inv π1 + · · · + inv πm = inv π
and since
φ
is bijective, the result is true.
2.6 Subspaces of a Vector Space
Let
q = pt
where
p, t ∈ N
and
p
is prime. Let
Fq
(or GF(q)) be a nite eld with
q
elements.
Example
Denote by
If
p = t = 2,
Vn (q)
then
F4
is given by
+ 0 1 a b
× 0 1 a b
0
0 1 a b
0
0 0 0 0
1
1 0 b a
1
0 1 a b
a
a b 0 1
a
0 a b 1
b
b a 1 0
b
0 b 1 a
n-dimensional
the
({0, 1, a, b}, +, ×).
Fnq
vector space
= {(a1 , . . . , an ) : ai ∈ Fq },
|Fnq | = q n
[In what follows, if you do not understand the argument, do it for the case
(2.59)
Proposition
n
.
k q
2.6.1.)
(
The number of k-dimensional subspaces
p = 2, t = 1.]
1
of Vn (q) is
U ⊆ Vn (q) is a subspace i (i) u1 , u2 ∈ U ⇒ u1 + u2 ∈ U ; (ii) a ∈ R, u1 ∈ U ⇒ au1 ∈ U ; (iii)
u1 ∈ U ⇒ −u1 ∈ U .
1
43
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
Proof.
α(n, k) = number of k -dimensional subspaces of Vn (q). A k -dimensional subVn (q) is a collection of k linearly independent vectors (v1 , . . . , vk ) in Vn (q).
Consider forming such a sequence (v1 , . . . , vk ):
Let
space of
Number of ways to choose
qn − 1
Answer:
v1 ?
(any non-zero vector).
Number of ways to choose
v2 ?
Answer: Remove from the set of all non-zero vectors the set
The size of this set is
q − 1,
{av1 : a ∈ Fq , a 6= 0}.
v2 is q n − 1 −
hence the number of ways to choose
(q − 1) = q n − q .
Now we have chosen
upon
(v1 , v2 ).
How many vectors in
Vn (q)
are linearly dependent
{v1 , v2 }?
|{av1 + bv2 : a, b ∈ Fq , a, b 6= 0}| = q 2 − 1
q n − 1 − (q 2 − 1) = q n − q 2 .
n
i−1 .
By the same counting argument, the number of ways to choose vi will be q −q
Therefore number of ways to choose
v3
is
So the number of sequences (not sets, but all
Vn (q)
ok) of k
linearly independent vectors in
is
(q n − 1)(q n − q)(q n − q 2 ) · · · (q n − q k−1 )
(2.1)
k linearly indeVn (q) = Fnq . Number of
Let us now consider an alternative way of counting the number of such
k -dimensional subspace U of
α(n, k). For such a subspace U , with q k vectors in it, we may choose
(v1 , . . . , vk ) linearly independent in U in
pendent sequences. First choose a
ways of doing this is
(q k − 1)(q k − q) · · · (q k − q k−1 )
ways, by using the same reasoning as above. So the number of ways of choosing
vi ∈ Vn (q),
(v1 , . . . , vk ),
and all linearly independent is
α(n, k)(q k − 1)(q k − q) · · · (q k − q k−1 )
Now setting (2.1)=(2.2) gives
(q n − 1)(q n − q) · · · (q n − q k−1 )
(q k − 1)(q k − q) · · · (q k − q k−1 )
(1 + q + · · · + q n−1 ) · · · (1 + q + · · · + q n−k )
=
(1 + q + · · · + q k−1 ) · · · (1 + q)(1)
(n)q · · · (n − k + 1)q
(n)q · · · (2)q (1)q
=
=
(k)q · · · (2)q (1)q
(k)q · · · (2)q (1)q (n − k)q · · · (2)q (1)q
(n)q !
n
=
=
(kq )!(n − k)q !
k q
α(n, k) =
44
(2.2)
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
2.7 Permutations as Increasing Binary Trees
(2.60) Denition
map
T
Let
A = a1 a2 · · · an
be a collection of
n
distinct numbers. Dene a
as follows:
T (∅) = ∅
T (a) = • ,
a∈R
m
v•HHHH
v
v
H
vv
T (V mH) =
T (V )
where
V mH = a1 · · · an
and
m
T (H)
is the smallest entry.
(2.61) Example
1
F
uu• FFFF
uuu
T (9413) =
T (94)
For
π ∈ Sn ,
the map
T (3)
π → T (π)
=
1
1
•@
•@
=
~~ @@@
~~ @@@
3
4 ~~
4 ~~
•
•3
x•
~•
x
~
x
9 ~~
xx
•
T (9)
has all increasing binary trees
2 with labels in
{1, . . . , n}
as its image/range.
(2.62) Example
1
T (12) = •@@@
T (1) = •
T (312) =
T (21) =
@2
2
•
1
•@
~~ @@@
3 ~~
•2
•
T (321) =
~•1
~~
~
•
~•1
~~
~
•
~~
3 ~~
2
•
T (146325) =
1
•@@
@@
•@2
~~ @@@
~
3 ~
•
•5
~~
~
4 ~
•@@
@@
6
•
(2.63) Denition
call the entry
πi
of
For
π
π = π1 · · · πn ∈ Sn ,
let
π0 = 0 = πn+1 .
For all
1≤i≤n
let us
a
rise if πi−1 < πi < πi+1
fall if πi−1 > πi > πi+1
peak if πi−1 < πi > πi+1
2
An increasing binary tree is a tree in which each vertex has 0, 1 or 2 children, and left-right directions
are important.
45
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
valley
if
πi−1 > πi < πi+1
(2.64) Example
π = 146325
rise
peak
rise
valley
fall
peak
0< 1 < 4 < 6 > 3 > 2 < 5 >0
By considering the recursive denition of
if
if
if
if
j
j
j
j
= πi
= πi
= πi
= πi
T,
one will notice that
peak of π, then vertex j in T (π) has no children
is a valley of π , then vertex j in T (π) has left & right children
is a fall of π , then vertex j in T (π) has only a left child
is a rise of π , then vertex j in T (π) has only a right child
is a
(2.65) Question
What statistic on
T (π)
tells us the number
des(π)?
2.8 Standard Young Tableaux
Recall section 1.3:
Young diagrams.
The Young diagram of
λ = (4, 4, 2, 2, 2, 1) ` 15
The number of such diagrams with
(2.66) Denition
which each of the
A
n
n
is
cells/boxes is
p(n).
standard Young tableau (SYT)
{1, . . . , n} and
is a Young diagram in
cells takes a distinct value in
the entries in each column from top-to-bottom are increasing,
the entries in each row from left-to-right are increasing.
(2.67) Example
1
3
6
1
2
4
46
2 4 9
5 7
3 5 6
7 9
8
is
not a SYT
is a SYT
1
∅
is a SYT
(the empty tableau) is a SYT
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
We write SYTn for the set of all such tableaux with
:
SYT1
:
1
SYT2
:
1 2
SYT3
:
1 2 3
SYT4
:
1
2
1 2
3
1 2 3
4
1 2 3 4
1 3
2
4
1 2 4
3
1 4
2
3
What is |SYTn |? (Later.)
(2.69) Question
For
λ ` n,
1 2
3 4
1
2
3
4
1 3
2 4
λ?
let
λ = (3, 1) ` 4
(2.70) Denition
length
1 3 4
2
how many entries of SYTn have shape
f λ = |{T ∈ SYTn : T
So if
1
2
3
1 3
2
(2.68) Question
λ ` n,
cells.
∅
SYT0
1 2
3
4
Given
n
then
fλ = 3
has shape
λ}|
(see the green box in last example).
Given a Young diagram
λ
and a cell (box)
b ∈ λ,
the
hook-
of the cell is
hb = 1 +
+
(2.71) Example
number of cells directly below
b
number of cells directly to the right of
b
For
a
b
λ =
c
ha = 2,
hb = 7,
(2.72) Theorem
hc = 1.
♦
The Hook-length formula)
(
Given λ ` n,
Y
f λ = n!
hb
cell b∈λ
(2.73) Example
Consider
λ =
Thus
fλ =
. Insert hook-lengths in each cell:
4 2 1
1
.
4!
24
=
=3
(4)(2)(1)(1)
8
47
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
5 4 3
If
λ= 4 3 2
3 2 1
, then
fλ =
9!
= 42
(5)(4)(4)(3)(3)(3)(2)(2)(1)
2.9 Robinson-Schensted-Knuth (RSK) correspondence
(2.74) Motivating theorem
X
(Frobenius formula)
(f λ )2 = n!
λ`n
(2.75) Example
f (1,1,1,1) = 1,
f (2,1,1) = 3,
f (2,2) = 2,
f (3,1) = 3,
f (4) = 1
and
12 + 32 + 22 + 32 + 12 = 24
We present a bijection between
Sn
and all pairs
(P, Q) where P, Q ∈ SYTn
and have the
same shape.
(2.76) Denition
Inserting a new element a into a pair of tableaux (P, Q))
(
(P, Q) of the same shape and Q ∈ SYTm for
(P 0 , Q0 ) by inserting a into P and recording where
m,
tableaux
some value
pair
a new box appears in
Given Young
we create a new
Q.
Suppose

p1,1 · · · p1,r(1)

 .

.

.
.
P =
.
.


pk,1 · · · pk,r(k)
If
a > p1,r(1) ,
a
Q.
then insert
corresponding position of
at the end of this row, and insert
E.g. if
If
a=9:
(P, Q) =
p1,j < a < p1,j+1 ,
If
p1,j+1
then replace
3 7 8, 1 2 3
5
4
p1,j+1
by
a
→
m+1
into the
3 7 8 9, 1 2 3 5
5
4
and look at row 2.
is greater than the largest entry in row 2, then place it at the end
Q.
< p2,i+1 .
and record this position in
Otherwise,
p2,i < p1,j+1
down, looking at row 3, etc. etc.
48
Replace
p2,i+1
by
p1,j+1
and bump
p2,i+1
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
(P 0 , Q0 ) = (P, Q) ← a.
This is written
P
is the insertion tableau,
Q
is the recording tableau.
With this notation, the RSK correspondence is easily stated:
(2.77) Denition
Let
(P0 , Q0 ) = (∅, ∅).
Recursively dene
(Pi , Qi ) = (Pi−1 , Qi−1 ) ← πi
where
π = π 1 · · · π n ∈ Sn
(2.78) Example
Let
and
i = 1, . . . , n.
The pair
(Pn , Qn ) =: (P (π), Q(π)).
π = 3 5 2 1 4.
(P0 , Q0 ) = (∅, ∅).
i = 1 : (∅, ∅) ← 3
i=2:
3, 1 ←5
i=3:
3 5, 1 2 ←2
i=4:
2 5, 1 2
3
3
is
is
is
←1
is

i=5:

1 5 1 2
2 , 3 ←4
3
4
(2.79) Denition
Suppose
is
3 , 1 = (P1 , Q1 ).
3 5 , 1 2 = (P2 , Q2 ).
2 5 , 1 2 = (P , Q ).
3
3
3
3


1 5 1 2
 2 , 3  = (P4 , Q4 ).
3
4


1 4 1 2
 2 5 , 3 5  = (P5 , Q5 ) = (P (π), Q(π)).
3
4
Q ∈ SYTn .
D(Q) = {i : i + 1
Dene
is in a row strictly lower than
i
in
Q}
(2.80) Example
1 2
3 5
Q= 4
6
(2.81) Theorem
Proof.
Suppose
D(Q) = {2, 3, 5}
RSK
Suppose π ∈ Sn and π −→ (P (π), Q(π)). Then Des(π) = D(Q(π)).
i ∈ Des π .
We want to show the new box that appears in
(Pi−1 , Qi−1 ) ← πi
is above the box
(Pi , Qi ) ← πi+1 .
Since πi > πi+1 , entry πi+1 is inserted in the 1st row of P (π) and left of πi . If
st
insertion of πi ended in the 1 row, then everything is ne, since πi+1 will have to
st row of Q(π) and
displace some entry of row 1, and the value i will be in the 1
value i + 1 is in a row lower since it displaced some entry.
that appears in
49
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
The entry
a
displaced from the 1
st
from the 1 row by
πi .
st row by
πi+1
is smaller than entry
Therefore, even if the insertion of
the insertion process of
πi+1
has to go on to
πi
b
displaced
nd row,
ends in the 2
at least the row below, and maybe
more.
Repeating this argument for
below that of
a and b instead of πi+1
and
πi , and the 2nd row instead
πi+1 always ends
st
of the 1 row, shows the same result. Either way the insertion of
πi .
The same style of argument holds when
(2.82) Theorem
RSK
RSK
If π −→ (P (π), Q(π)), then π −1 −→ (Q(π), P (π)).
Proof (Xavier Viennot, 1976).
'dot' diagram is an
πi < πi+1 .
n×n
Given
π = π1 · · · πn ∈ Sn draw its 'dot' diagram. The
{(i, πi ) : 1 ≤ i ≤ n}. For example
grid with dots at positions
3 5 2 1 4 has dot diagram
•
•
•
•
•
Let each of these dots be 'active' and set
?
i = 1.
For each active dot, extend rays (lines) north and east until they meet other rays
or meet the perimeter of the diagram. Let
of the diagram and
bi
ai
be the labels on the east perimeter
be the labels on the north perimeter of the diagram
a1 = (1, 4)
b1 = (1, 2)
1 2
•
•
4
•
•
1
•
If there are any
corners in the diagram, then place a dot on these corners
remove all other active dots and rays. Set all these new dots to be active. Let
and return to
?.
3
5
•
•
•
a2 = (2, 5)
And repeating again
50
5
2
b2 = (3, 5)
•
and
i→i+1
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
4
3
•
a3 = (3)
b3 = (4)
Usually we draw the dots and rays in one diagram:
1 2 3 4 5
•
•
•
•
• •
• •
•
5
4
3
2
1
The resulting left justied arrays of numbers give the tableaux of the RSK bijection


P (π) = 

a1


.
.
.




Q(π) = 

am
or
b1

.
.
.



bm
 
b1
1 2
 
Q(π) = b2  = 3 5
4
b3
 
a1
1 4
 
P (π) = a2  = 2 5
3
a3
If we look at the corresponding construction and sequences of labels
π −1 , {a0i , b0i },
then
we nd that due to the symmetry of the operation,
a01 = b1
,
.
.
.
b01 = a1
.
.
.
a0m = bm , b0m = am
Thus

a01
 
b01


b1
 
a1

  .   .   . 
 ,  .  =  .  ,  .  = (Q(π), P (π))
  .   .   . 
a0m
b0m
bm
am


(P (π −1 ), Q(π −1 )) = 

.
.
.
In light of this construction we have:
(2.83) Theorem
(2.84) Corollary
A permutation π ∈ Sn is an involution if and only if P (π) = Q(π).
X
f λ = In , the number of involutions π ∈ Sn
λ`n
51
CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS
Another aspect of RSK correspondence:
RSK (P, Q), the length of the longest increasing subsequence of
(2.85) Theorem If π −→
st
π = length of 1 row of P , and the length of the longest decreasing subsequence of π =
length of 1st column of P .
Application of this fact:
(2.86) Theorem
Erdös-Szekeres)
Any sequence of rs − r − s + 2 distinct numbers
contains either an increasing subsequence of length r or a decreasing subsequence of
length s, r, s ∈ N.
(
Proof.
Any such sequence (x1 , . . . , xrs−r−s+2 ) is order isomorphic to π ∈ Sn where n =
rs − r − s + 2. If π contains no increasing subsequence of length r, then P (π) has at most
r − 1 columns. This means that there are at least
rs − r − s + 2
s(r − 1) r − 2
r−2
rows =
−
= s−
=s
r−1
r−1
r−1
r−1
giving decreasing subsequence of length
52
s.
Same arguments holds for the rest.