09.10.74

 Lectures of Mark Dukes 

Typing and layout by Líney Halla Kristinsdóttir

University of Iceland Spring Term 2008

Contents

1 Enumeration1

1.1 Counting Arguments...... 2

1.2 Elementary Counting Coecients...... 3

1.3 Compositions & Partitions of an Integer...... 7

1.4 The Reection Principle...... 9

1.5 Stirling Numbers...... 10

1.5.1 Stirling Numbers of the 2nd Kind: S(n, k) ...... 10

1.5.2 Signless Stirling Numbers of the 1st Kind...... 12

1.6 Multinomial Coecients...... 14

1.7 Generating Functions I...... 15

1.8 Generating Functions II...... 22

2 Permutations & Permutation Statistics 27

2.1 Descents & the Eulerian Polynomial...... 27

2.2 Cycle structure & left-to-right maxima...... 32

2.3 Excedances & weak excedances...... 33

2.4 Inversions & the Major index...... 35

2.5 , Permutations & q-series...... 39

2.6 Subspaces of a Vector Space...... 43

2.7 Permutations as Increasing Binary Trees...... 45

2.8 Standard Young Tableaux...... 46

2.9 Robinson-Schensted-Knuth (RSK) correspondence...... 48

i 3 Partially Ordered Sets (Posets) 53

3.1 Posets...... 53

3.2 Lattices...... 60

3.3 Modular Lattices...... 62

3.4 Distributive Lattices...... 64

3.5 Incidence Algebra of a Poset...... 64

3.6 The Zeta Function...... 66

3.7 The Möbius Inversion Formula...... 67

3.8 Applications of the Möbius Inversion Formula...... 69

3.9 The Möbius Function of Lattices...... 73

3.10 Young's lattice...... 74

3.11 Linear extensions...... 76

3.12 Rank-selection...... 77

4 Other Things & Some Applications 79

4.1 Unimodality, Log-concavity & Real-rootedness...... 79

4.2 Transfer Matrix Method-Theory...... 82

4.3 Transfer Matrix Method  Applications...... 86

4.4 Transfer Matrix Method  Application to Ising Model...... 89

ii Chapter 1

Enumeration

(1.1) Notation

N = {1, 2, 3,...} Natural numbers N0 = {0, 1, 2, 3,...} C Complex numbers Z = {..., −2, −1, 0, 1, 2,...} Integers R Real numbers Q Set of rational numbers, fractions (1.2) Denition Floor function:

bxc = largest integer ≤ x e.g.

b−1.5c = −2 , b1.5c = 1 b−2c = −2 , b2c = 2

Ceiling function: dxe = smallest integer ≥ x e.g.

d−1.5e = −1 , d1.5e = 2 d−2e = −2 , d2e = 2

Let X be a set. We denote by |X| the number of elements in the set X (card(X) and #X mean the same).

Kroenecker delta function: ( 1 if i = j δij = 0 if i 6= j

1 CHAPTER 1. ENUMERATION

(1.3) Denition Let A and B be (nite) sets. We dene: n o A × B = {a, b} : a ∈ A, b ∈ B Map(A, B) = {all functions f : A → B} Sur(A, B) = {f : A → B, f is surjective (onto)} Inj(A, B) = {f : A → B, f is injective (1-1)} Bij(A, B) = {f : A → B, f is bijective}

1.1 Counting Arguments

Basic Problem Given a set A, we want to determine |A|.

(1.4) Fundamental Theorem of Enumeration (Discovered independently by several anony- mous cavemen) X |A| = 1 a∈A

Generic enumeration problem We are given an innite sequence of sets A1,A2,...,An,... which contain objects satisfying a set of combinatorial/algebraic properties. Determine

an := |An| for general n.

What is an answer? Some instances of enumeration problems:

n  An = subsets of [[1, n]], an = 2  An = permutations of [[1, n]], an = n! complete binary trees with leaves, (2n−2)!  An = n an = n!(n−1)!  An = 'words' on the alphabet {1, 2} that sum to n,

 √ !n+1 √ !n+1 bn/2c 1 1 + 5 1 − 5 X n − k an = √  −  = = Fn+1 5 2 2 k k=0 (Fibonacci numbers).

 An = labelled connected simple graphs on n vertices, " n an = n! × coecient of x in the power series expansion

+∞ !# X 2k(k−1)/2 of Log xk k! k=0

 An = latin squares of size n × n (every row and column is a permutation of [[1, n]]), an = ? (unknown for general n).

2 CHAPTER 1. ENUMERATION

(1.5) Semi-denition An answer is a polynomial time algorithm (in n) for computing an. [Algorithms that are equivalent to the caveman formula are useless.]

(1.6) Methods Rule of sum: If A, B are sets with A ∩ B = ∅, then

|A ∪ B| = |A| + |B|

Rule of product: |A × B| = |A| · |B| Refinement: If n ] An = Bn(k) (disjoint unit) k=0 then X |An| = |Bn(k)| k Generating functions: Let

2 n f(x) = a0 + a1x + a2x + ··· + anx + ···

Find some recursive relation between the ai's (e.g. ai = ai−1 + ai−2, a0 = a1 = 1) and by using it obtain a function equation (e.g. f(x) = 1 + xf(x) + x2f(x)) and solve for f(x). Now Taylor expand this expression for f(x). Bijections: Want to count An. We know the size of Bn. If there exists a f : An → Bn (bijection) then |An| = |Bn| for all n.

1.2 Elementary Counting Coecients

Let N and R be sets vith |N| = n and |R| = r.

(1.7) Proposition The number of mappings f : N → R is

| Map(N,R)| = rn

Proof. Every map f : N → R can be viewed as a word of length n from the alphabet R (e.g. N = {a, b, c},R = {1, 2}, then the word 212 represents the function f(a) = 2, f(b) = 1, f(c) = 2). As there are r possibilities for each of the n letters, there are n r · r ··· r = r such maps.  | {z } n times

(1.8) Example Consider the set of n × n matrices with entries taking values in {−1, 0, 1}. Any such matrix can be thought of as a map

M : {1, 2, . . . , n}2 → {−1, 0, 1}

n2 Hence the number of these is 3 . ♦

3 CHAPTER 1. ENUMERATION

(1.9) Proposition The number of injective maps f : N → R is

| Inj(N,R)| = r(r − 1) ··· (r − n + 1)

Proof. Inj(N,R) is the set of words of length n which contain no two letters the same. If N = {x1, . . . , xn}, there are

r choices for f(x1)

r − 1 choices for f(x2) . .

r − (n − 1) choices for f(xn)

The result follows.  (1.10) Denition The expression

r(r − 1) ··· (r − n + 1) is called a lower factorial or falling factorial of length n. We write

(r)n = r(r − 1) ··· (r − n + 1) (r)0 = 1 for all r ∈ N0

(1.11) Example Let N = {1, 2} and R = {a, b, c, d}, then

| Inj(N,R)| = (4)2 = 4 · 3 = 12 Further, ab ba ca da ac bc cb db ad bd cd dc

Setting r = n in the previous proposition, we have

(1.12) Corollary The number of permutations of a set of size n is

|Sn| = n! = (n)n

(1.13) Proposition The number of n-subsets of an r-set is

r (r) r! = n = n n! n!(r − n)!

Proof. The function ϕ : b1b2 . . . bn → {b1, . . . , bn} maps the set of words on R of length n onto the set of all n-subsets of R. Each n-subset is the image of exactly n! injective maps, obtained by permuting the 's. The result follows from the previous proposition. bi  (1.14) Denition The numbers r,  choose , for , , are called n r n 0 ≤ n ≤ r n, r ∈ N0 the binomial coefficients.

4 CHAPTER 1. ENUMERATION

(1.15) Proposition

n n = = 1 for all n ∈ 0 n N0 n n − 1 n − 1 = + for all n ≥ 2 and 0 ≤ k ≤ n k k − 1 k Proof (Combinatorial).

n = |{A ⊆ {1, . . . , n} : |A| = 0}| = |{∅}| = 1 0 n = |{A ⊆ {1, . . . , n} : |A| = n}| = |{{1, . . . , n}}| = 1 n Let n . The set can be written as An(k) = {X ⊆ [[1, n]] : |X| = k}, k = |An(k)| An(k) the disjoint union of two sets:

those subsets that contain n = {{n} ∪ X : X ∈ An−1(k − 1)}

those subsets that do not contain n = An−1(k)

Since An(k) = {{n} ∪ X : X ∈ An−1(k − 1)}] An−1(k), we have n = |A (k)| = |A (k − 1)| + |A (k)| k n n−1 n−1 n − 1 n − 1 = + k − 1 k 

(1.16) Notation 123 ↔ {1, 2, 3}

(1.17) Example The 3-subsets of {1, 2, 3, 4, 5} are {123, 124, 134, 234, 125, 135, 145, 235, 245, 345} ={123, 124, 134, 234}]{125, 135, 145, 235, 245, 345} ↔{123, 124, 134, 234}]{12, 13, 14, 23, 24, 34} = 3-subsets of {1, 2, 3, 4}] 2-subsets of {1, 2, 3, 4} ♦ 5 4 4 = + ∴ 3 3 2

(1.18) Proposition For all 0 ≤ k ≤ n n  n  = k n − k

Proof (Combinatorial). Let Sn(k) be the set of k-sets of {1, . . . , n}. For A ∈ Sn(n − k), dene f : Sn(n − k) → Sn(k) by f(A) = Sn \ A. The map f is injective & surjective so f is a bijection. Therefore |Sn(n − k)| = |Sn(k)|, i.e.  n  n = n − k k

5 CHAPTER 1. ENUMERATION

(1.19) Theorem (Binomial theorem) Let A be a commutative and n ∈ N0. For all a, b ∈ A, n X n (a + b)n = akbn−k k k=0 Proof. Write (a + b)n =( a + b)(a + b) ··· (a + b) | {z } n times The right hand side is the sum of all products akbn−k where akbn−k appears as many times as we can choose k a's and (n − k) b's from the n factors. The number of ways is n. This is true for all . Here we have the stated formula. k 0 ≤ k ≤ n 

(1.20) Example Let A = Z and a = b = 1, then n X n = 2n k k=0 Let A = Z and a = −1, b = 1, then n X n (−1)k = (−1 + 1)n = 0 k k=0

(1.21) Pascal's Triangle The entry in column of row is equal to n, : k n k n, k ∈ N0 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1 Note the n   th X n sum along n row: = 2n k k=0 n   th X n alternating sum along n row: (−1)k = 0 k k=0 n  2   th X n 2n sum of squares along n row: = k n k=0 m X n + k n + m + 1 hockey stick sum: = , ∀n ∈ k m N0 k=0

6 CHAPTER 1. ENUMERATION

(1.22) Lattice Paths Allowed steps:

[north] = n = (0, 1) and [east] = e = (1, 0)

(5,3) # of lattice paths from (0,0) to (5,3) 1 4 10 20 35 56 taking steps in {n, e} 1 3 6 10 15 21 = # of words of length 5 + 3 = 8 from the 1 23 4 56 alphabet {n, e} with 3 n's and 5 e's 8 8 (0,0)111111 = = = 56 3 5 Note the Pascal's-triangle-pattern on the nodes.

1.3 Compositions & Partitions of an Integer

(1.23) Denition Let n ∈ N.A composition a = (a1, . . . , ak) of n is a sequence of integers a1, . . . , ak ∈ N such that a1 + ··· + ak = n. We write this as (a1, . . . , ak) |= n, a |= n.

(1.24) Example All compositions of n = 4:

(1, 1, 1, 1) (1, 2, 1) (3, 1) (2, 2) (1, 1, 2) (2, 1, 1) (1, 3) (4)

There are 8 compositions of n = 4.

The set of 3-compositions of n = 4 is {(1, 1, 2), (1, 2, 1), (2, 1, 1)}. ♦ (1.25) Proposition There are n−1 -compositions of . k−1 k n

Proof. If a = (a1, . . . , ak) |= n, then a1, . . . , ak ∈ N. Dene

f(a) = {a1, a1 + a2, . . . , a1 + ··· + ak−1} One can easily see that f(a) ⊆ {1, 2, . . . , n − 1} The map f is a bijection between all k-compositions of n and (k − 1)-subsets of . Therefore there are n−1 such compositions. {1, . . . , n − 1} k−1 

(1.26) Proposition There are 2n−1 compositions of the number n.

Proof. A composition of n may have k parts where 1 ≤ k ≤ n. The number of composi- tions of n is n X n − 1 n − 1 n − 1 n − 1 = + + ··· + = 2n−1 k − 1 0 1 n − 1 k=1 7 CHAPTER 1. ENUMERATION

Another proof: n−1 boxes z }| { 1  1  ···  1  1 | {z } n 1's n−1 In each box we can put a `+' or a `:' which gives 2 possibilities. 

(1.27) Denition A partition λ of the integer n is a sequence of integers (λ1, . . . , λk) such that

(i) λ1 + ··· + λk = n, (ii) λ1 ≥ λ2 ≥ · · · ≥ λk ≥ 1. We write

λ = (λ1, . . . , λk) ` n

If λ ` n has αi parts equal to i, then we can write

λ = h1α1 , 2α2 ,...i

1 3 2 (1.28) Example If λ = (4, 4, 2, 2, 2, 1) ` 15 then λ = h1 , 2 , 4 i. ♦

We may also represent a partition in the form of a diagram. The Young diagram of λ = (4, 4, 2, 2, 2, 1) is the left justied collection of boxes:

(1.29) Proposition Given a partition λ ` n. The conjugate partition is the partition whose Young diagram is the reection of the Young diagram of λ. We write conj(λ).

(1.30) Example λ = (4, 4, 2, 2, 2, 1)

λ : conj(λ): @ @ @ @ @ @ @ @ @ @ @ @ i.e. conj(λ) = (6, 5, 2, 2)

Let pk(n) = number of partitions of n into k parts and

p(n) = p1(n) + ··· + pn(n)

(e.g. p(4) = 5 since we have 4, 3 + 1, 2 + 1 + 1, 2 + 2, 1 + 1 + 1 + 1).

8 CHAPTER 1. ENUMERATION

We have

pk(n) = pk−1(n − 1) + pk(n − k) since if λ = (λ1, . . . , λk), λ1 ≥ · · · ≥ λk, either λk = 1 or λk > 1. In the latter case, 0 0 0 0 is a partition of . (λ1 + 1, . . . , λk + 1) ↔ (λ1, . . . , λk) k n − k

1.4 The Reection Principle

(1.31) Problem How many north-east lattice paths (i.e. taking steps in {(1, 0), (0, 1)}) are there from (0, 0) to (a, b), a ≥ b, which do not cross the line y = x?

p = eenneene

Solution. Let us call a path p from (0, 0) → (a, b) good if it does not cross the line y = x. The above path p is good.

Notice that:

|{good paths (0, 0) → (a, b)}|+|{bad paths (0, 0) → (a, b)}| a + b = |{paths (0, 0) → (a, b)}| = (1.1) a If we can determine the number of bad paths, then we have solved the problem.

Consider a bad path:

p = enneeene |{z}

For a bad path p, determine the rst point at which the path touches the line y = x + 1. Reect this initial segment of the path in the line y = x + 1 and call the resulting path f(p). The path f(p) is a path from (−1, 1) → (a, b). There are no further restrictions.

p = nee eeene |{z}

9 CHAPTER 1. ENUMERATION

The map f : {bad paths (0, 0) → (a, b)} −→ {paths (−1, 1) → (a, b)} is a bijection.

Number of bad paths (0, 0) → (a, b) = # paths (−1, 1) → (a, b) = # paths (0, 0) → (a + 1, b − 1) a + 1 + (b − 1) a + b = = a + 1 a + 1

Thus the number of good paths from (0, 0) → (a, b) is

a + b a + b N(a, b) = − from (1.1) a a + 1 (a + b)! (a + b)! = − a!b! (a + 1)!(b − 1)! (a + b)! 1 1  = − a!(b − 1)! b a + 1 (a + b)! (a + 1 − b = a!(b − 1)! b(a + 1) (a + b)! a + 1 − b = a!b! a + 1 a + ba + 1 − b = a a + 1 i.e. a + ba + 1 − b N(a, b) = a a + 1

This is called André's reection principle (D. André, Comptes Rendus, 1887). 

1.5 Stirling Numbers

1.5.1 Stirling Numbers of the 2nd Kind: S(n, k)

(1.32) Denition A partition of a set Xn = {1, . . . , n} is a collection A = {A1,...,Ak} of subsets of Xn such that

 Ai 6= ∅ for all i,  Ai ∩ Aj = ∅ for i 6= j,  A1 ∪ · · · ∪ Ak = Xn

The sets Ai are called the blocks of the partition A.

(1.33) Example A = {{1, 5, 6}, {3, 7}, {2, 4}} = {{3, 7}, {2, 4}, {1, 5, 6}} is a partition of {1,..., 7}. ♦

(1.34) Example All 3-partitions of {1, 2, 3, 4}: 10 CHAPTER 1. ENUMERATION

{{ 1, 2}, {3}, {4}} ↔ {12, 3, 4} { 13, 2, 4} { 14, 2, 3} { 23, 1, 4} { 24, 1, 3} { 34, 1, 2} ♦

Let S(n, k) be the number of k-partitions (partitions into k blocks) of {1, . . . , n}. So S(4, 3) = 6 from previous example. (1.35) Remark  S(n, 0) = 0, for n ≥ 1  S(n, 1) = 1 for n ≥ 1  S(n, 2) = 2n−1 − 1 for n ≥ 2 n  S(n, n − 1) = 2  S(n, n) = 1 (1.36) Remark Notice that the set of all k-partitions of {1, . . . , n} is the disjoint union of the sets ( ) ( ) all k-partitions A of Xn all k-partitions A of Xn ] with {n} as a block where {n} is not a block | {z } | {z } S(n−1,k−1) kS(n−1,k) We have S(n, k) = S(n − 1, k − 1) + kS(n − 1, k)

(1.37) Example All 3-partitions of {1, 2, 3, 4}.  {12, 3, 4} ↔ {12, 3}       {13, 2, 4} ↔ {13, 2} all 2-partitions of {1, 2, 3} S(3, 2)   {23, 1, 4} ↔ {23, 1}  S(4, 3) = 6 ←  all 3-partitions of  {14, 2, 3}  {1, 2, 3}    {1, 24, 3} and 3 blocks in which 4 3S(3, 3)   {1, 2, 34} ↔ {1, 2, 3}  may occur so S(4, 3) = S(3, 2) + 3S(3, 3)

S(n, k): n \ k 0 1 2 3 4 5 B(n) 0 1 1 1 0 1 1 2 0 1 1 2 3 0 1 3 1 5 4 0 1 7 6 1 15 5 0 1 15 25 10 1 52

11 CHAPTER 1. ENUMERATION

The total number of partitions of Xn = {1, . . . , n} is

m X B(n) = S(n, k), n ≥ 1 k=1 and is called the nth Bell number.

1.5.2 Signless Stirling Numbers of the 1st Kind

c(n, k) = number of ways to split {1, . . . , n} into k cycles.

S(4, 2) = 7 c(4, 2) = 11 {1, 234} {1, 2 → 3 → 4 → 2} = {1, 234}, {1, 243} {2, 134} {2, 134}, {2, 143} {3, 124} {3, 124}, {3, 142} {4, 123} {4, 123}, {4, 132} {12, 34} {12, 34} {13, 24} {13, 24} {14, 23} {14, 23}

Obvious things:

c(n, 0) = 0, ∀n ≥ 1 c(0, 0) := 1 c(n, 1) = (n − 1)!, ∀n ≥ 1 c(n, n) = 1 n c(n, n − 1) = , ∀n ≥ 2 2

12 CHAPTER 1. ENUMERATION

(1.38) Proposition For n, k ≥ 1 c(n, k) = (n − 1)c(n − 1, k) + c(n − 1, k − 1)

Proof. Problem sheets.  c(n, k): n \ k 0 1 2 3 4 5 P 0 1 1 1 0 1 1 2 0 1 1 2 3 0 2 3 1 6 4 0 6 11 6 1 24 5 0 24 50 35 10 1 120 (1.39) Denition The signed Stirling numbers of the 1st kind are

s(n, k) = (−1)n−kc(n, k) (1.40) Problem What is X c(n, k) =??? k Answer: n! (see table above). (1.41) Generic problem We wish to write down an expression for

X n F (x) = xk n k k Solution. Know: P 0 k , and F0(x) = k k x = 1 X n + 1 X n  n  F (x) = xk = + xk n+1 k k k − 1 k k P n k−1 P n k x k (k−1)x =x k (k)x z }| { X n X  n  = xk + xk k k − 1 k k X n X n = xk + x xk = F (x) + xF (x) k k n n k k

= (1 + x)Fn(x), ∀n ≥ 0 Thus

Fn+1(x) = (1 + x)Fn(x) 2 = (1 + x) Fn−1(x) . . n+1 = (1 + x) . 

13 CHAPTER 1. ENUMERATION

1.6 Multinomial Coecients

The number of dierent ways to distribute the elements of the set {1, . . . , n} amongst m boxes, such that box Bi contains bi elements is  n  n! = b1, b2, . . . , bm b1!b2! ··· bm! where b1 + ··· + bm = n. (1.42) Example  4  4! = = 12 2, 1, 1 2!1!1! Indeed B1 B2 B3

b1 = 2 b2 = 1 b3 = 1 12 3 4 12 4 3 13 2 4 13 4 2 14 2 3 14 3 2 23 1 4 23 4 1 24 1 3 24 3 1 34 1 2 34 2 1 i.e. there are 12 ways. ♦ (1.43) Example The number of lattice paths from (0, 0, 0) to (2, 3, 4) taking steps {(1, 0, 0), (0, 1, 0), (0, 0, 1)} is equal to taking {1,..., 9} (the total number of steps is 2 + 3 + 4 = 9) and putting 2 elements (steps) in box B1, 3 elements in box B2 and 4 elements in box B3, i.e.  9  9! = = ... 2, 3, 4 2!3!4!

(1.44) Remark n  n  = k k, n − k (1.45) Theorem (Multinomial theorem)   X n b1 b2 bm n x1 x2 ··· xm = (x1 + x2 + ··· + xm) b1, . . . , bm (b1,...,bm)|=n

14 CHAPTER 1. ENUMERATION

1.7 Generating Functions I

2 Let C[[x]] = {a0 + a1x + a2x + ··· : ai ∈ C} be the set of all in x whose coecients take values in C. (1.46) Theorem For f(x), g(x) ∈ C[[x]],

X n X n f(x) = anx and g(x) = bnx n≥0 n≥0 we have X n f(x) + g(x) = (an + bn)x ∈ C[[x]] n≥0 and n X n X f(x) · g(x) = cnx ∈ C[[x]], where cn = akbn−k n≥0 k=0

One can easily check that

2  (C[[x]], +) is an abelian with identity 0 = 0 + 0x + 0x + · · · ∈ C[[x]]; 2  (C[[x]], ·) is a monoid (hálfgrúpa m/hlutleysu) with identity 1 = 1+0x+0x +· · · ∈ C[[x]];  Multiplication is commutative; f(x)g(x) = g(x)f(x);  If f, g ∈ C[[x]], both f(x), g(x) 6= 0, then f(x)g(x) 6= 0. So C[[x]] is a (commutative) integral domain (heilbaugur). (1.47) Theorem (Inverse property of C[[x]]) If f(x) ∈ C[[x]] and f(x)g(x) = 1 for some g ∈ C[[x]], then f −1 exists ⇔ f(0) 6= 0 , f −1 = g.

2 (1.48) Example Consider f(x) = 1 + x + x + · · · ∈ C[[x]]. (1 + x + x2 + ··· )(1 − x) = 1

We have that f(0) = 1 so f −1 exists and is g(x) = 1 − x.

If f(x) = x + x2 + ··· , then

1 = (x + x2 + ··· )g(x) 2 2 = (x + x + ··· )(b0 + b1x + b2x + ··· ) 2 = b0x + (b0 + b1)x + ···

Contradiction. ♦

(1.49) Notation Given f(x) = a0 + a1x + · · · ∈ C[[x]], we write n n [x ]f(x) = an, the coecient of x in f(x)

15 CHAPTER 1. ENUMERATION

(1.50) Denition Given innite sequence +∞ , an ordinary generating {an}n=0 function (o.g.f.) for an is a function f(x) ∈ C[[x]] such that

2 f(x) = a0 + a1x + a2x + ···

(1.51) Example

, 1  an = 1, ∀n ∈ N0 f(x) = 1−x n , 1  an = (−1) , ∀n ∈ N0 f(x) = 1+x n, 2 2 1  an = 2 f(x) = 1 + 2x + 2 x + ··· = 1−2x ♦

In light of theorem (1.46) we have

(1.52) Example Suppose n. Then 1 and 1 . The an = 1, bn = (−1) f(x) = 1−x g(x) = 1+x o.g.f. for the sequence {1 + (−1)n} is

1 1 2 f(x) + g(x) = + = 1 − x 1 + x 1 − x2 Also 1 1 1 f(x) · g(x) = · = = 1 + x2 + x4 + x6 + ··· 1 − x 1 + x 1 − x2 with n n ( if even X X n−i 1 n cn = aibn−i = (−1) = 0 if n odd i=0 i=0

(1.53) Example (Fibonacci numbers) Consider the sequence dened by

a0 = 1, a1 = 1 and an = an−1 + an−2 for n ≥ 2

Let f(x) be o.g.f. for this sequence.

2 2 3 4 f(x) = a0 + a1x + a2x + ··· = 1 + x + 2x + 3x + 5x + ··· +∞ X n = anx n=0 +∞ X = a0 + a1x + anxn n=2 +∞ X n = 1 + x + (an−1 + an−2)x n=2 +∞ +∞ X n−1 2 X n−2 = 1 + x + x an−1x + x an−2x n=2 n=2 +∞ +∞ X k 2 X k = 1 + x + x akx + x akx k=1 k=0 = 1 + x + x(f(x) − 1) + x2f(x)

16 CHAPTER 1. ENUMERATION

Thus f(x) = 1 + xf(x) + x2f(x) i.e. 1 f(x) = 1 − x − x2 is the o.g.f. for the Fibonacci numbers an.

Notice that √ ! √ ! 1 + 5 1 − 5 1 − x − x2 = 1 − x 1 − x 2 2 Using this observation (and a lot of messy algebra) √ √ ! 1 1 1 1+ 5 1− 5 f(x) = √ √ = √ 2 √ − 2 √ 1+ 5 1− 5 5 1+ 5 1− 5 1 − 2 x 1 − 2 x 1 − 2 x 1 − 2 x and thus " √ √ !n √ √ !n# 1 1 + 5 1 + 5 1 − 5 1 − 5 [xn]f(x) = √ − 5 2 2 2 2  √ !n+1 √ !n+1 1 1 + 5 1 + 5 = √  −  5 2 2 the nth Fibonacci number = an, ♦

2 (1.54) Denition Given f(x) ∈ C[[x]] with f(x) = a0 +a1x+a2x +··· the formal derivative of f is

df(x) X = na xn−1 = a + 2a x + 3a x2 + · · · ∈ [[x]] dx n 1 2 3 C n≥1 This derivative may also be written f 0(x) or Df(x).

(1.55) Example Given 2 1 f(x) = 1 + x + x + ··· = 1−x ∈ C[[x]] 1 f 0(x) = 1 + 2x + 3x2 + ··· = ∈ [[x]] (1 − x)2 C

It's straightforward to check that the usual properties of derivatives for polynomials hold for power series in C[[x]]: d   d d f(x) + g(x) = f(x) + g(x) dx dx dx d   d d f(x)g(x) = f(x) g(x) + g(x) f(x) dx dx dx       d   d d 0 0 f g(x) = g(x) f(u) = g (x)f (g(x)) dx dx du u=g(x)

This gives rise to a formal calculus for formal power series in C[[x]].

17 CHAPTER 1. ENUMERATION

0 (1.56) Example Suppose f(x) ∈ C[[x]] and f (x) = 0.

f(x) = a0 + a1x + ··· 0 2 f (x) = a1 + 2a2x + 3a3x + ··· = 0

⇒ a1 = a2 = ... = 0

So , where , i.e. is a constant. f(x) = a0 a0 ∈ C f(x) ♦

0 (1.57) Example If f ∈ C[[x]] and f (x) = f(x), what is f(x)?

0 2 n f (x) = a1 + 2a2x + 3a3x + ··· + (n + 1)an+1x + ··· 2 n = a0 + a1x + a2x + ··· + anx + ··· = f(x) Thus

an = (n + 1)an+1, ∀n ≥ 0 which gives 1 1 1 1 a = a = a = ... = a n+1 n + 1 n n + 1 n n−1 (n + 1)! 0 i.e. 1 a = a , ∀n ≥ 1 n n! 0 and thus

+∞ +∞ X X X 1 f(x) = a xn = a + a xx = a + a xn n 0 n 0 0 n! n≥0 n=1 n=1 +∞ ! X 1 = a xn = a ex, a ∈ 0 n! 0 0 C n=0 Now Z df(x) Z = dx ⇒ ln(f(x)) = x + K f(x) i.e. x+K x f(x) = e = K0e as before. ♦ (1.58) Typical situation involving formal derivatives We have re-written a problem/desired function f ∈ C[[x]] in the form

f 0(x) = Φ(f(x), x) and have an initial term f(0) = a0. So long as the function Φ is nice, solve it as you would a dierential equation and tailor the solution to the initial condition.

(1.59) Example Want o.g.f. for {an}

a0 = 2 and (n + 1)an+1 = 5an, ∀n ≥ 0

18 CHAPTER 1. ENUMERATION

Let f(x) = a0 + a1x + ··· . Then

+∞ +∞ X n X n (n + 1)an+1x = 5anx n=0 n=0 i.e. f 0(x) = 5f(x) Calculation... Z df(x) Z = 5 dx ⇒ ln(f(x)) = 5x + K ⇒ f(x) = e5x+K = Ce5x f(x)

f(0) = C = 2 ⇒ f(x) = 2e5x is o.g.f. for . {an} ♦

(1.60) Denition (Binomial Theorem for complex exponents) Given λ ∈ C and f(x) ∈ C[[x]], +∞ X λ (1 + f(x))λ = (f(x))n n n=0 where λ λ(λ − 1) ··· (λ − n + 1) := , for n ≥ 1 n n! and λ := 1 0

(1.61) Example (Power series for (1 − x)−1/2) From denition above,

+∞  1  +∞ 1 3 1 − 1 X − n X (− 2 )(− 2 ) ··· (− 2 − n + 1) n n (1 − x) 2 = 2 (−x) = 1 + (−1) x (1.2) n n! n=0 n=1 Note

n z }| { (−1)n1234567 ··· (2n − 1)(2n) (−1)n(2n)! (− 1 )(− 3 ) ··· (− 1 − n + 1)= = 2 2 2 2n2 · 4 ··· (2n) 2n2nn! (−1)n(2n)! = 4nn! ♦ Replace in eq. (1.2) to give

+∞ +∞ +∞ n n x   n   n − 1 X (−1) (2n)! (−1) x X 2n x X 2n x (1 − x) 2 = 1 + = 1 + = 4nn! n! n 4 n 4 n=1 n=1 n=0

(1.62) Example (Power series for (1 − x)1/2) From denition,

+∞ +∞ X  1  X  1  (1 − x)1/2 = 2 (−x)n = 1 + 2 (−1)nxn (1.3) n n n=0 n=1 19 CHAPTER 1. ENUMERATION

Now

 1  ( 1 )(− 1 )(− 3 ) ··· ( 1 − n + 1) (1)(−1(−3) ··· (−(2n − 3) 2 = 2 2 2 2 = n n! 2nn! (−1)n−1(1)(1)2(3)4(5) ··· (2n − 3)(2n − 2) (−1)n−1(2n − 2)! = = 2nn!2 · 4 ··· (2n − 2) 2nn!2n−1(n − 1)! 2(−1)n−1 1 2n − 1 = 4n n n − 1 ♦ Replace in (1.3) to get

+∞ +∞ X 2(−1)n−1 2n − 2 X 1 2n − 2 xn (1 − x)1/2 = 1 + (−1)nxx = 1 − 2 4nn n − 1 n n − 1 4 n=1 n=1

(1.63) Problem Let and dene the sequence +∞ by a0 = 1 {an}n=0

n X akan−k = 1 for all n ≥ 0 k=0 Determine the o.g.f. for +∞. (Notice: all the 's will be ). {an}n= ai ≥ 0 Solution. Let be the o.g.f. for +∞ f(x) {an}n=0

2 f(x) = a0 + a1x + a2x + ··· Then +∞ n ! +∞ X X X 1 f(x)2 = f(x)f(x) = xn a a = xn(1) = k n−1 1 − x n=0 k=0 n=0 From this r 1 f(x) = ± = ±(1 − x)−1/2 1 − x Example (1.61) told us that

+∞ X 2n xn x 3 (1 − x)−1/2 = = 1 + + x2 + ··· n 4 2 8 n=0 Hence f(x) = (1 − x)−1/2 and 2n 1 [xn]f(x) = a = n n 4n Notice that if x 3 f(x) = −(1 − x)−1/2 = −1 − − x2 − · · · 2 8 then all of the ai's are < 0, which is not possible. Therefore the answer is f(x) = −1/2 (1 − x) . One must pay attention to this sign. 

20 CHAPTER 1. ENUMERATION

(1.64) Problem (Catalan numbers/Catalan ) The Catalan numbers are dened by the recursion

c0 = 1 n X cn+1 = cicn−i, for n ≥ 0 i=0 These numbers and their generating function

2 C(x) = c0 + c1x + c2x + ··· = 1 + x + 2x2 + 5x3 + 14x4 + ··· appear frequently in enumerative problems. We now derive a closed form for the o.g.f. C(x).

+∞ +∞ +∞ X n X n X n+1 C(x) = cnx = c0 + cnx = c0 + cn+1x n=0 n=1 n=0 +∞ n ! +∞ n X X n+1 X X i n−i = 1 + cicn−i x = 1 + x (cix )(cn−ix ) n=0 i=0 n=0 i=0 +∞ ! +∞  X k X j = 1 + x ckx  cjx  = 1 + xC(x)C(x) k=0 j=0

So C(x) = 1 + xC(x)2 i.e. x(C(x))2 − C(x) + 1 = 0 Thus √ 1 ± 1 − 4x C(x) = 2x so we have to choose between a +/− sign. From example (1.62) we have

+∞ X 1 2n − 2 xn (1 − x)1/2 = 1 − 2 n n − 1 4 n=1 Thus +∞ X 1 2n − 2 (1 − 4x)1/2 = 1 − 2 xn n n − 1 n=1 √ Let us suppose the 'answer' is 1 , then C(x) = 2x (1 + 1 − 4x)

+∞ +∞ P 1 2n−2 n P 1 2n−2 n 1 + 1 − 2 n n−1 x 1 − n n−1 x C(x) = n=1 = n=1 2x x 21 CHAPTER 1. ENUMERATION which is not a formal power series and hence WRONG. Thus the correct answer is

+∞ +∞ √ 1 − (1 − 2 P 1 2n−2xn 2 P 1 2n−2xn 1 − 1 − 4x n n−1 n n−1 C(x) = = n=1 = n=1 2x 2x 2x +∞ +∞ X 1 2n − 2 X 1 2n = xn−1 = xn n n − 1 n + 1 n n=1 n=0 1 2n is called the th Catalan number and these numbers have o.g.f. cn = n+1 n n √ 1 − 1 − 4x C(x) = 2x

(1.65) Exercise Let f(a, b) be the number of paths from (0, 0) to (a, b), a ≥ b, which do not cross the line x = y. Then a + b a + b f(a, b) = − a a + 1

Rewrite the expression for f(n, n). ♦ (1.66) Remark In the previous problem, it would have been possible to decide on a 1/2 +/− sign without expanding the power series for (1−x) . We know that C(0) = c0 = 1. However, we cannot put x = 0 in the expression √ 1 ± 1 − 4x C(x) = 2x Using l'Hôpitals rule, √ 1 + 1 − 4x 1 (1 − 4x)−1/2(−4) lim = lim 2 = lim(1 − 4x)−1/2(−1) = −1 x→0 2x x→0 2 x→0 Similarly √ 1 − 1 − 4x − 1 (1 − 4x)−1/2(−4) lim = lim 2 = lim(1 − 4x)−1/2 = 1 x→0 2x x→0 2 x→0 which is correct, since 1 = C(0) = c0.

1.8 Generating Functions II

(1.67) Denition Given an innite sequence +∞ , the exponential gener- {an}n=0 ating function (e.g.f.) for +∞ is the power series {an}n=0 f(x) ∈ C[[x]] +∞ X xn x2 f(x) = a = a + a x + a + ··· n n! 0 1 2 2! n=0 We write xn  f(x) = a n! n

22 CHAPTER 1. ENUMERATION

(1.68) Example

(i) , e.g.f. is x2 x. an = 1, ∀n f(x) = 1 + x + 2! + ··· = e (ii) n , e.g.f. is x2 x3 −x. an = (−1) ∀n f(x) = 1 − x + 2! − 3! + ··· = e (iii) n, , e.g.f. is 22x2 2x. an = 2 ∀n f(x) = 1 + 2x + 2! + ··· = e (iv) , , e.g.f. of 1 . an = n! ∀n f(x) = 1−x ♦

(1.69) Operations involving e.g.f.'s If is e.g.f. for +∞ and is e.g.f. for f(x) {an}n=0 g(x) +∞ {bn}n=0 +∞ +∞ +∞ X xn X xn X xn  f(x) + g(x) = a + b = (a + b ) is e.g.f. for {a + b }+∞ . n n! n n! n n n! n n n=0 n=0 n=0 n=0 +∞ +∞ X xn−1 X xn  f 0(x) = d f(x) = na = a is e.g.f. for {a }+∞ . dx n n! n+1 n! n n=1 n=0 n=0  +∞ ! +∞ ! +∞ X xn X xm X xnxm f(x)g(x) = a b = a b n n! m m! n m n!m! n=0 m=0 m,n=0 +∞ i X X 1 i! = xi a b m i−m m!(i − m)! i! i=0 m=0 +∞ i ! X xi X  i  = a b i! m m i−m i=0 m=0

 n +∞ So is e.g.f. for P n  . f(x)g(x) m ambn−m m=0 n=0 e.g.f. e.g.f. e.g.f. (1.70) Example x +∞ and 2x n +∞ . Then 3x e = f(x) ←→ {1}n=0 e = g(x) ←→ {2 }n=0 e ←→  n +∞ n +∞ is the e.g.f. for P n  n−m . {3 }n=0 m 2 m=0 n=0 n X  n  3n = 2n−m ∴ m m=0

(1.71) Problem Let a0 = a1 = 1 and an = an−1 + (n − 1)an−2 for all n ≥ 2. Let +∞ P xn be the e.g.f. for +∞ . Want a closed form for . f(x) = an n! {an}n=0 f(x) n=0 Solution. As before, use the recursion to write down an expression for the terms of power series

+∞ +∞ X xn X xn f(x) = a + a x + a = 1 + x + (a + (n − 1)a ) 0 1 n n! n−1 n−2 n! n=2 n=2 +∞ +∞ X xn X xn = 1 + x + a + (n − 1)a n−1 n! n−2 n! n=2 n=2 | {z } | {z } ≡g(x) ≡h(x)

23 CHAPTER 1. ENUMERATION

Notice:

+∞ X xn−1 g0(x) = a = f(x) − 1 n−1 (n − 1)! n=2 +∞ +∞ X xn−1 X xn−2 h0(x) = n(n − 1)a = x a = xf(x) n−2 n! n−2 (n − 2)!  n=2 n=2

Dierentiate f(x) = 1 + x + g(x) + h(x) to get

f 0(x) = 1 + g0(x) + h0(x) i.e. f 0(x) = 1 + (f(x) − 1) + xf(x) So f 0(x) = (1 + x)f(x) Solve this dierential equation

df(x) 1 = (1 + x) dx ⇒ ln(f(x)) = x + x2 + K f(x) 2 0 i.e. 1 2 2 x+ x +K0 x+x /2 f(x) = e 2 = K1e

0 0+02/2 Know that f (0) = 1 so 1 = K1e = K1 and thus

2 f(x) = ex+x /2

(1.72) Denition A permutation π = (π1, . . . , πn) of {1, . . . , n} is a derangement if it has no xed points, i.e. πi 6= i for all i ∈ [[1, n]].

(1.73) Problem Let dn be the number of derangements of {1, . . . , n}. What is dn?

Solution.

Every permutation π of {1, . . . , n} can be iden- tied by Example π = (1, 7, 4, 3, 5, 6, 2). The xed points are {1, 5, 6}. Re- (1) its xed points maining: (7, 4, 3, 2) ↔ (4, 3, 2, 1) (2) derangement of the remaining elements which is a derangement. It follows that

|{permutations of [[1, n]]}| = | ] {permutations with k xed points}| and hence n X n n! = d k n−k k=0 24 CHAPTER 1. ENUMERATION

+∞ Let P xn . Multiply both sides of the equation above by xn and sum over D(x) = dn n! n! n=0 n ≥ 0: +∞ +∞ n 1 X xn X xn X n = n! = 1 · d = exD(x) 1 − x n! n! k n−k n=0 n=0 k=0 From this, e−x D(x) = 1 − x Now  xn  . dn = n! D(x)

+∞ ! +∞ ! +∞ n ! 1 X (−1)n X X X (−1)k D(x) = e−x = xn xm = xn 1 − x n! k! n=0 m=0 n=0 k=0 +∞ " n !# X xn X (−1)k = n! n! k! n=0 k=0 So

n X (−1)k  1 1 1 (−1)n  d = n! = n! 1 − 1 + − + − · · · + n k! 2! 3! 4! n! k=0  1 1 1 (−1)n  = n! − + − · · · + 2! 3! 4! n!  n! ∼ n!e−1 = e 

25 CHAPTER 1. ENUMERATION

26 Chapter 2

Permutations & Permutation Statistics

(2.1) Denition Let Sn be the set of all permutations π = (π1, . . . , πn) = π1 ··· πn of the set {1, . . . , n}.

−1 −1 For any π ∈ Sn we identify the inverse permutation π as π = (α1, . . . , αn) where αi = j ⇔ i = πj, e.g.

−1 π = (5, 3, 4, 1, 2), π = (4, 5, 2, 3, 1); α3 = 2, 3 = π2

A permutation statistic is a function f : Sn → Z.

2.1 Descents & the Eulerian Polynomial

(2.2) Denition (2.1.1.) For π = (π1, . . . , πn) ∈ Sn, we say that a descent occurs at position i if πi > πi+1. The descent set of π ∈ Sn is

Des(π) = {i : πi > πi+1 and 1 ≤ i < n} and the number of descents is des(π) = | Des(π)|

1 2 3 4 5 6 7 (2.3) Example (2.1.2.) If π = 5243176, then Des(π) = {1, 3, 4, 6} and des(π) = 4.

If π = 1234, then Des(π) = ∅, des(π) = 0.

If π = 54321, then Des(π) = {1, 2, 3, 4}, des(π) = 4. ♦

(2.4) Remark 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)

Notice that if i ∈ Des(π), then πi > πi+1 ⇒ −πi < −πi+1 ⇒ n+1−πi < n+1−πi+1 and thus i 6∈ Des(f(π)). In a similar way, if i ∈ Des(f(π)), then i 6∈ Des(π).

i ∈ Des(π) ⇔ i 6∈ Des(f(π))

So des(π)+des(f(π)) = n−1. Since f(f(π)) = π, the map f is a involution, and therefore a bijection, on Sn. Hence

|{π ∈ Sn : des(π) = k}| = |{π ∈ Sn : des(f(π)) = n − 1 − k}| 0 0 = |{π ∈ Sn : des(π ) = n − 1 − k}| 

Proof (Using the reverse operation). Given π = (π1, . . . , πn) ∈ Sn, dene f : Sn → Sn,

0 0 r(π) = (πn, . . . , π1) := (π1, . . . , πn)

Notice that if i ∈ Des(π), then πi > πi+1 which gives πi+1 < πi ⇒ πn+1−(n−i) < 0 0 and thus . Similarly, πn+1−(n−i+1) ⇒ πn−i < πn−i+1 n − i 6∈ Des(r(π))

i ∈ Des(π) ⇔ n − i 6∈ Des(r(π))

So a permutation π with k descents gets mapped to a permutation with n−1−k descents. Since r 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 r(π) = 43512. ♦

(2.7) Denition Let

A(n, k) = |{π ∈ Sn : des(π) = k − 1}|, dened for 0 < k ≤ n. The numbers A(n, k) are called Eulerian numbers.

28 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

(2.8) Example S1 = {(1)},A(1, 1) = 1. S2 = {12, 21},A(2, 1) = 1,A(2, 2) = 1 For S3:

π des(π) 123 0 132 1 213 1 Hence: A(3, 1) = 1,A(3, 2) = 4,A(3, 3) = 1. 231 1 312 1 321 2

Also A(4, 1) = 1,A(4, 2) = 11,A(4, 3) = 11,A(4, 4) = 1. ♦

(2.9) Remark The symmetry A(n, k) = A(n, n − k + 1) is due to proposition (2.5).

(2.10) Proposition (2.1.4.) Dene A(0, 0) = 1 and A(n, 0) = 0 for n > 0. For n, k ∈ N, k ≤ n A(n, k + 1) = (k + 1)A(n − 1, k + 1) + (n − k)A(n − 1, k)

0 Proof. There are 2 ways to form π ∈ Sn with des(π) = k from π ∈ Sn−1:

0 0 (i) insert n into π ∈ Sn−1 with des(π ) = k − 1 and make new descent. 0 0 (ii) insert n into π ∈ Sn−1 with des(π ) = k and do not make new descent.

Case (i): There are perms 0 0 0 with 0 . A(n − 1, k) π = π1 ··· πn−1 ∈ Sn−1 des(π ) = k − 1 We may insert between 0 and 0 so long as 0 0 and in this way form a new n πi πi+1 πi < πi+1 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 (ii): The same as case (i), except we are not creating a new descent. There are perms 0 0 0 with 0 . To not form a new descent, A(n−1, k +1) π = π1 ··· πn−1 ∈ Sn des(π ) = k we can put after 0 or insert between 0 and 0 such that 0 0 . Number of n π n πi πi+1 πi > πi+1 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

n X k An(x) = A(n, k)x k=0 is called the nth Eulerian polynomial. For n ≥ 1 we can write

n X k X des(π)+1 An(x) = A(n, k)x = x

k=1 π∈Sn

29 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

(2.12) Example

A0(x) = 1

A1(x) = x 2 A2(x) = x + x 2 3 A3(x) = x + 4x + x 2 3 4 A4(x) = x + 11x + 11x + x ♦

(2.13) Proposition (2.1.5.) For all n ≥ 1,

2 0 An(x) = (x − x )An−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 n n X X X A(n, k)xk = k(An − 1, k)xk + (n − (k − 1))A(n − 1, k − 1)xk k=1 k=1 k=1 n n X X = x kA(n − 1, k)xk−1 + nx A(n − 1, k − 1)xk−1 k=1 k=1 n X − x2 (k − 1)A(n − 1, k − 1)xk−2 k=2 0 2 0 = xAn−1(x) + nxAn−1(x) − x An−1(x) 2 0 = (x − x )An−1(x) + nxAn−1(x) 

(2.14) Proposition (2.1.6.) For all n ≥ 0,

+∞ n+1 X n i An(x) = (1 − x) i x i=0

Proof. Use induction. For n = 0, A0(x) = 1 and

+∞ +∞ X X 1 − x (1 − x)1 i0xi = (1 − x) xi = = 1 1 − x i=0 i=0 30 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

+∞ n+1 P n i Suppose, An(x) = (1 − x) i x . From prop. (2.13) i=0

0 An+1(x) = x(1 − x)An(x) + (n + 1)xAn(x) " +∞ +∞ # X X = x(1 − x) −(n + 1)(1 − x)n inxi + (1 − x)n+1 in+1xi−1 i=0 i=1

+ (n + 1)xAn(x) +∞ +∞ X X = −(n + 1)(1 − x)n+1 inxi+1 + (n + 1)(1 − x)n+1 inxi+1 i=0 i=0 +∞ X + (1 − x)n+2 in+1xi i=1 +∞ +∞ X X = (1 − x)n+2 in+1xi = (1 − x)n+2 in+1xi i=1 i=0

Hence by the principle of induction, the result is true for all n.  (2.15) Proposition (2.1.7.) Let

+∞ X zn A(x, z) = A (x) . n n! n=0 Then 1 − x A(x, z) = 1 − xez(1−x) Proof. By proposition (2.14)

+∞ +∞ +∞ ! X zn X X zn A(x, z) = A (x) = (1 − x)n+1 inxi n n! n! n=0 n=0 i=0 +∞ +∞ X X ((1 − x)iz)n = (1 − x) xi n! i=0 n=0 +∞ +∞ X X ((1 − x)iz)n = (1 − x) xi n! i=0 n=0 +∞ +∞ X X = (1 − x) xie(1−x)iz = (1 − x) (xe(1−x)z)i i=0 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

π = 4371652 1 → 4 → 1 2 → 3 → 7 → 2 5 → 6 → 5

We write π = (14)(237)(56). This representation is not unique, e.g. π = (372)(65)(14). (2.16) Denition 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 The type of π is the vector (c1(π), c2(π),...), e.g. the type of 4371652 is (0, 2, 1, 0, 0,...).

Let us dene a standard representation 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 Notice that we can recover π from πˆ easily:

 From left-to-right mark each maximum element seen so far

32 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

 insert brackets before each marked point (2.22) Example πˆ =)(31)(542)(7)(86)(9) 1 2 3 4 5 6 7 8 9 π = (3 5 1 2 4 8 7 6 9)

(2.23) Denition Given π = π1 ··· πn ∈ Sn we say that πi is a left-to-right maxima of π if πi > πj for all j < i. We write LRmax for the number of left-to-right maxima of π. (2.24) Example • • • π = 2 1 5 4 7 3 6, LRmax(π) = 3 • • • • • π = 4 3 2 1 5 6 7 8, LRmax(π) = 5 .

(2.25) Proposition If π ∈ Sn and πˆ is the standard representation of π, then c(π) = LRmax(ˆπ).

Proof. The map π → πˆ is a bijection. If π has k cycles, then πˆ will have k left-to-right maxima. 

The number of π ∈ Sn with k cycles is given by the unsigned Stirling number of the 1st kind, hence: (2.26) Proposition

|{π ∈ Sn : c(π) = k}| = |{π ∈ Sn : LRmax(π) = k}| = c(n, k)

2.3 Excedances & weak excedances

(2.27) Denition Given π = π1π2 ··· πn ∈ Sn we say that

 i is an excedance of π if πi > i,  i is a weak excedance of π if πi ≥ i. The number of excedances of π is denoted exc(π) and the number of weak excedances of π is denoted wexc(π).

1 2 3 4 5 6 7 (2.28) Example If π = ¯6¯732514, then exc(π) = 2, wexc(π) = 4.

Let us look at 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 qexc(π) = 1q0 + 11q1 + 11q2 + q3 = 1 + 11q + 11q2 + q3

π∈S4 X qwexc(π) = 0q0 + 1q1 + 11q2 + 11q3 + 1q4 = q + 11q2 + 11q3 + q4

π∈S4

(2.29) Proposition The number of π = π1 ··· πn ∈ Sn with wexc π = k equals the number of π ∈ Sn with exc π = n − k.

• • • •

• 180◦ •

Proof. Idea: π = 1432 • −→ • Given π = π1 ··· πn ∈ Sn, let 0 0 . It is easy to see rc(π) = (n + 1 − πn, . . . , n + 1 − π1) = (π1, . . . , πn) πi ≥ i ⇔ 0 . So is a weak excedance of i is not an excedance of πn+1−i < n + 1 − i i π n + 1 − i 0 π = rc(π).  (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

are the largest elements of their cycles  a1, ai1+1, . . . , aik−1+1

 a1 < ai1+1 < ai2+1 < ··· < aik−1+1 Notice that:

 If π(ai) 6= ai+1, then ai < ai+1 (i.e. i 6∈ Desπ ˆ).  If ai < ai+1, then  ai+1 > ai  π(ai) = aj > ai ,   ai ≥ ai

i.e. π(ai) ≥ ai.  If i = n, then π(an) ≥ an. So

(ai < ai+1 or i = n) ⇔ π(ai) ≥ ai i.e. n − desπ ˆ = wexc π

34 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

The bijection π → πˆ tells us the number of permutations with k + 1 weak excedances is the same as the number of permutations with (n − (k + 1)) = n − 1 − k descents, which is the same as the number of permutations with k descents = A(n, k + 1). This proves 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 wexc π th q = An(q), the n Eulerian polynomial

π∈Sn and X An(q) qexc π = q π∈Sn Any statistic that has the same distribution as des is called an Eulerian statistic. Thus, exc and wexc are Eulerian statistics.

2.4 Inversions & the Major index

(2.32) Denition Given π = π1 ··· πn ∈ Sn we say the pair (πi, πj) is an inversion of π if i < j and πi > πj. The number of inversions of π is denoted inv(π).

(2.33) Example If π = 314526, then

(3, 1), (3, 2), (4, 2), (5, 2) are the inversions of π. So inv π = 4. ♦

X inv π (2.34) Question What is q ≡ fn(q) ?

π∈Sn

For n = 2, S2 = {(1, 2), (2, 1)} and thus f2(q) = 1 + q.

35 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

For n = 3: π inv π 123 0 132 1 2 3 2 213 1 giving f3(q) = 1 + 2q + 2q + q = (1 + q)(1 + q + q ) 231 2 312 2 321 3

For n = 4, we have

2 3 4 5 6 2 2 3 f4(q) = 1 + 3q + 5q + 6q + 5q + 3q + q = (1 + q)(1 + q + q )(1 + q + q + q )

(2.35) Proposition (Rodriguez 1839) For all n ≥ 1, X qinv π = (1 + q)(1 + q + q2) ··· (1 + q + ··· + qn−1)

π∈Sn

0 Proof. For homework. Hint: Use induction. Every π ∈ Sn can be written as π = (π , i) with 0 and . π ∈ Sn−1 0 ≤ i ≤ n − 1 

(2.36) Denition Given π ∈ Sn, the Major index of π is X maj(π) = i . i∈Des π

(2.37) Example If π = 7314625, then Des π = {1, 2, 5} and maj π = 1 + 2 + 5 = 8.

If π = 12345, then Des π = ∅ and maj π = 0. ♦

(2.38) Remark Notice that for π ∈ Sn, the statistics inv and maj take values in the set n . {0, 1,..., 2 }

X maj π (2.39) Question What is gn(q) = q ?

π∈Sn

2 3 2 g2(q) = 1 + q, g3(q) = 1 + 2 + 2q + q = (1 + q)(1 + q + q ),...

In fact X X qinv π = qmaj π, for all n.

π∈Sn π∈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 inv (or maj) is called Mahonian.

36 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

(2.40) Exercise Try to prove by induction that

X qmaj π = (1 + q)(1 + q + q2) ··· (1 + q + ··· + qn−1)

π∈Sn

(2.41) The -coding of a permutation Given 0 , 0 0 0 , we may maj π ∈ Sn−1 π = π1 ··· πn−1 generate by inserting as a prex, by inserting between 0 and 0 for π ∈ Sn n n πi πi+1 1 ≤ i ≤ n − 2, or inserting n as a sux of π0. Label these positions as i = 0, 1, . . . , n − 1 from left-to-right, e.g. π0 = 0 3 1 5 2 4 3 1 4 2 5

0 0 So every Sn ∈ π may be described uniquely by a pair (π , i), where π ∈ Sn−1 and 0 0 ≤ i ≤ n − 1. The surjection ψ : π → π of Sn onto Sn−1 consists of removing n from π,

ψ(3412) = 312; ψ(3124) = 312

[Used in homework involving P xinv π.]

To describe the maj-coding of π, we relabel the n positions that n can be inserted into as follows: The maj-labels of π

 label j = 0 is given to inserting n as a sux of π0  if π0 has d descents, then from right-to-left we label these j = 1, j = 2, . . . , j = d  label j = d + 1 is given to inserting n as a prex of π0  from left-to-right label the remaining positions j = d + 2, . . . , j = n − 1

0 Example π = 4 3 5 7ˆ 3 2 6 4ˆ 2 1 7 6ˆ 1 5 0 (hat on descents).

0 If the entry n of π ∈ Sn is in position with maj-label j in π , then dene

π(n−1) = π0 = ψ(π)

xn = j (n) (n−1) π = π = [π , xn]

Example For π = 3724165 above, we have

(6) (7) (6) π = 4 3 3 2 5 4 2 1 6 6 1 5 0; x7 = 3; π = [π , 3]

(n−1) (n−2) In the same way, to π there corresponds a pair [π , 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) (n−2) (0) [π , xn], [π , xn−1],..., [π , x1]

(0) where π is the empty permutation and x1 = 0. (At each step we must maj-relabel the positions.) The sequence x = (x1, x2, . . . , xn) is called the maj-coding of π.

(2.42) Example

π(7) = 3 7 2 4 1 6 5 (6) π = 4 3 3 2 5 4 2 1 6 6 1 5 0 x7 = 3 (5) π = 3 3 2 2 4 4 1 1 5 5 0 x6 = 5 (4) π = 3 3ˆ 2 2 4 4ˆ 1 1 0 x5 = 0 (3) π = 3 3 2 2 1 1 0 x4 = 1 (2) π = 2 2 1 1 0 x3 = 2 (1) π = 1 1 0 x2 = 1

x1 := 0

The permutation π has maj-coding x = (0, 1, 2, 1, 0, 5, 3). ♦

To reconstruct π from the maj-coding, set π(1) = 1 and iterate backwards.

(2.43) Example If x = (0, 0, 0, 2, 3, 5, 4, 0, 2), then

π(1) = 1 π(2) = 1 2 π(3) = 1 2 3 . . (9) π = π = 7 1 5 4 9 2 6 3 8 ♦

(2.44) Remark In a maj-coding x = (x1, . . . , xn) of π ∈ Sn, we have xi ∈ {0, . . . , i−1}.

The number of maj-codings of length n is 1 × 2 × 3 × · · · × n = n!

(2.45) Proposition Let ψ be the surjection mentioned above.

0 −1 0 (1) For each n ≥ 2 and π ∈ Sn−1, the generating function for the class ψ (π ) by the major index is

X 0 qmaj π = qmaj π (1 + q + q2 + ··· + qn−1) π∈ψ−1(π0)

(2) If x = (x1, x2, . . . , xn) is the maj-coding of π, then maj(π) = x1 + x2 + ··· + xn 0 0 (3) If π = [π , xn], then maj π = maj π + xn.

38 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

Proof. Statement (3) implies statements (1) and (2). So we need only prove (3).

When 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

0 0 If n is inserted into the descent of π with maj-label xn, where 1 ≤ xn ≤ d = des π , then the xn descents occurring to the right are shifted 1 position to the right and the other descents remain unchanged, hence

0 0 0 maj[π , xn] = maj π +1+ ··· + 1 = maj π + xn | {z } xn

The same argument holds for xn = d + 1.

If 0 0 is the th non-descent of 0 when 0 is read from left-to-right (note πi < πi+1 k π π 1 ≤ ), then the left factor 0 0 contains descents and the right factor k ≤ n − d − 2 π1 ··· πi i − k 0 0 contains descents. Inserting between 0 and 0 πi+1 ··· πn−1 (d − (i − k) = d − i + k n πi πi+1 with maj-label d + k + 1 increases the major index by

(i + 1) +( d − i + k) = d + k + 1 = xn new| {z descent} shifted| {z descents} 0 0 0 Hence maj π = maj[π , d+k+1] = maj π +d+k+1 = maj π +xn for d+1 < xn ≤ n−1. 

To see the generating function of the major index statistic from this X X qmaj π = qx1+···+xn

π∈Sn x=(x1,...,xn) xi∈[[0,i−1]]         X x X x X x X x =  q 1   q 2   q 3  ···  q n  x1∈{0} x2∈{0,1} x3∈{0,1,2} xn∈[[0,n−1]]

= (1)(1 + q)(1 + q + q2) ··· (1 + q + q2 + ··· + qn−1)

2.5 Multisets, Permutations & q-series

(2.46) Denition A is a set in which elements may be repeated.

(2.47) Example M = {1, 1, 2, 2, 3, 5, 5, 5} = {5, 1, 2, 2, 1, 3, 5, 5} is a multiset on the set S = {1, 2, 3, 5}. We write |M| = 8 for the size of this multiset. ♦

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 M = {1, 1, 2, 2, 3, 5, 5, 5} is represented by the set S = {1, 2, 3, 5} and f, where 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 If M is a multiset with pair (S, f), then M 0 = (S, f 0) is a sub- multiset of M, 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

S The set of all multisets M of a set S with |M| = k is denoted . k (2.51) Example {a, b, c} = {aa, ab, ac, bb, bc, cc} 2 3 There are 6 multisets of a set with 3 elements that have size 2, = 6. 2 ♦ (2.52) Proposition (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}.

This transformation bi → ai denes a map {1, . . . , n} {1, . . . , n + k − 1} → = {A ⊆ {1, . . . , n + k − 1} : |A| = k} k k

The inverse map is easily dened by setting bi = ai − i + 1 fo all i. Hence we have a bijection between {1, . . . , n} {1, . . . , n + k − 1} and . k k  (2.53) Corollary (2.5.2.)

+∞ X n 1 xk = k (1 − x)n k=0

40 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

Permutations of Multisets

Almost all of what we have dened for permutations of a set can be extended to permu- tations 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 2 j−1 (j) = (j)q := 1 + q + q + ··· + q ;(0) = (0)q := 1 q-series

(j)! = (j)q! := (1)(2) ··· (j) q-factorial  n   n  (n)! q-multinomial = := coefficient a1,..., am a1, . . . , am q (a1)! ··· (am)! Setting q = 1 in all expressions above recovers the original numbers/factorials/coecients.

n n  n  We write = for (the q-binomial coeff./Gaussian poly- k k q k, n − k nomial).

(2.55) Example

(3) = 1 + q + q2 (3)! = (1)(2)(3) = (1)(1 + q)(1 + q + q2) = 1 + 2q + 2q2 + q3 3 (3)! (1 + q)(1 + q + q2) = = = 1 + q + q2 = (3) 2 (1)!(2)! (1) × (1)(1 + q)  3  (3)! = = (3)! 1, 1, 1 (1)!(1)!(1)! ♦

(2.56) Exercise Show that

 n   n n − a  a  = 1 ··· m a1,..., am a1 a2 am

(2.57) Proposition (2.5.4.) For n, k ∈ N0, k > 0, n n − 1 n − 1 = + qn−k k q k q k − 1 q (We dene n .) 0 q = 1

41 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

Proof. The right hand side is n − 1 n − 1 (n − 1) ! (n − 1) ! + qn−k = q + qn−k q k q k − 1 q (k)q!(n − k − 1)q! (k − 1)q!(n − k)q! (n − 1) !  1 qn−k  = q + (k − 1)q!(n − k − 1)q! (k)q (n − k)q | {z } (?)

(n − k) + qn−k(k) (1 + q + q2 + ··· + qn−k−1) + qn−k(1 + q + ··· + qk−1) (?) = q q = (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) ! (n) (n) ! n q q = q = (k − 1)q!(n − k − 1)q! (k)q(n − k)q (k)q!(n − k)q! k q 

a a am (2.58) Proposition (2.5.5.) Let M = {1 1 , 2 2 , . . . , m } with |M| = a1 + ··· + am = n. Then X  n  qinv π = a1, . . . , am π∈S(M) q Proof. Re-arrange the equation as  

X inv π0  q  (a1)q! ··· (am)q! = (n)q! π0∈S(M) Recall that X inv π q = (t)q!

π∈St Again, this is equivalent to       X inv π X inv π X inv π X inv π  q 0   q 1  ···  q m  = q

π0∈S(M) π1∈Sa1 πm∈Sam π∈Sn equivalent to X X qinv π0+inv π1+···+inv πm = qinv π π∈S π0∈S(M) n π1∈Sa . 1 . πm∈Sam This equation is what we want to prove.

Consider

φ : S(M) × Sa1 × · · · × Sam → Sn

φ(π0, π1, . . . , πm) = π dened by: 42 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

Given and , form a permutation π0 ∈ S(M) π1 ∈ Sa1 , . . . , πm ∈ Sam π ∈ 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.

Example If n = 8, a1 = 2, a2 = 3, a3 = 3, then for

2 3 3 π0 = (2, 1, 3, 3, 1, 2, 2, 3) ∈ S({1 , 2 , 3 })

π1 = 21 ∈ Sa1

π2 = 231 ∈ Sa2

π3 = 312 ∈ Sa3 the map will be

4 2 8 6 1 5 3 7 (21331223, 21, 231, 312) → (4, 2, 8, 6, 1, 5, 3, 7) ∈ S8 1: 21 2: 453 3: 867

The map φ 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

t Let q = p where p, t ∈ N and p is prime. Let Fq (or GF(q)) be a nite eld with q elements.

Example If p = t = 2, then F4 is given by ({0, 1, a, b}, +, ×). + 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

Denote by Vn(q) the n-dimensional vector space n n n Fq = {(a1, . . . , an): ai ∈ Fq}, |Fq | = q [In what follows, if you do not understand the argument, do it for the case p = 2, t = 1.] 1 (2.59) Proposition (2.6.1.) The number of k-dimensional subspaces of Vn(q) is   n . k q

1 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.

43 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

Proof. Let α(n, k) = number of k-dimensional subspaces of Vn(q).A k-dimensional sub- space of Vn(q) is a collection of k linearly independent vectors (v1,..., vk) in Vn(q). Consider forming such a sequence (v1,..., vk):

Number of ways to choose v1? Answer: qn − 1 (any non-zero vector). Number of ways to choose v2? Answer: Remove from the set of all non-zero vectors the set {av1 : a ∈ Fq, a 6= 0}. n The size of this set is q − 1, hence the number of ways to choose v2 is q − 1 − (q − 1) = qn − q. Now we have chosen (v1, v2). How many vectors in Vn(q) are linearly dependent upon {v1, v2}?

2 |{av1 + bv2 : a, b ∈ Fq, a, b 6= 0}| = q − 1

n 2 n 2 Therefore number of ways to choose v3 is q − 1 − (q − 1) = q − q . n i−1 By the same counting argument, the number of ways to choose vi will be q −q .

So the number of sequences (not sets, but all ok) of k linearly independent vectors in Vn(q) is (qn − 1)(qn − q)(qn − q2) ··· (qn − qk−1) (2.1)

Let us now consider an alternative way of counting the number of such k linearly inde- pendent sequences. First choose a -dimensional subspace of n. Number of k U Vn(q) = Fq ways of doing this is α(n, k). For such a subspace U, with qk vectors in it, we may choose (v1,..., vk) linearly independent in U in

(qk − 1)(qk − q) ··· (qk − qk−1) ways, by using the same reasoning as above. So the number of ways of choosing (v1,..., vk), vi ∈ Vn(q), and all linearly independent is

α(n, k)(qk − 1)(qk − q) ··· (qk − qk−1) (2.2)

Now setting (2.1)=(2.2) gives

(qn − 1)(qn − q) ··· (qn − qk−1) α(n, k) = (qk − 1)(qk − q) ··· (qk − qk−1) (1 + q + ··· + qn−1) ··· (1 + q + ··· + qn−k) = (1 + q + ··· + qk−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

44 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

2.7 Permutations as Increasing Binary Trees

(2.60) Denition Let A = a1a2 ··· an be a collection of n distinct numbers. Dene a map T as follows:

T (∅) = ∅ T (a) = • , a ∈ R T (V mH) = •m v HHH vvv HH T (V v) T (H) where V mH = a1 ··· an and m is the smallest entry. (2.61) Example

•1 •1 •1 T (9413) = FF = @ = @ uuu FF ~~ @@ ~~ @@ uu F 4•~~ @•3 4•~~ @•3 T (94) T (3) x ~ xxx 9 ~~ T (9)x •~

2 For π ∈ Sn, the map π → T (π) has all increasing binary trees with labels in {1, . . . , n} as its image/range.

(2.62) Example

1 T (1) = • T (12) = •@ T (21) = •1 @@ ~~ @•2 2•~~

1 T (312) = •@ T (321) = •1 ~~ @@ ~~ 3•~~ @•2 2•~~ ~~ 3•~~ T (146325) = •1 @@ @@ 2 •@ ~~ @@ 3•~~ @•5 ~ 4 ~~ •@~ @@ @•6

(2.63) Denition For π = π1 ··· πn ∈ Sn, let π0 = 0 = πn+1. For all 1 ≤ i ≤ n let us call the entry πi of π a

 rise if πi−1 < πi < πi+1  fall if πi−1 > πi > πi+1  peak if πi−1 < πi > πi+1 2An 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 rise peak fall valley peak 0 < 1 < 4 < 6 > 3 > 2 < 5 > 0

By considering the recursive denition of T , one will notice that

 if j = πi is a peak of π, then vertex j in T (π) has no children  if j = πi is a valley of π, then vertex j in T (π) has left & right children  if j = πi is a fall of π, then vertex j in T (π) has only a left child  if j = πi is a rise of π, then vertex j in T (π) has only a right child

(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 is

The number of such diagrams with n cells/boxes is p(n).

(2.66) Denition A standard Young tableau (SYT) is a Young diagram in which each of the n cells takes a distinct value in {1, . . . , n} and

 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 2 4 9 3 5 7 is not a SYT 1 is a SYT 6 1 3 5 6 2 7 9 is a SYT ∅ (the empty tableau) is a SYT ♦ 4 8

46 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

We write SYTn for the set of all such tableaux with n cells.

SYT0 : ∅

SYT1 : 1 1 SYT : 1 2 2 2 1 1 2 1 3 SYT : 1 2 3 2 3 3 2 3 1 2 3 1 2 4 1 3 4 SYT4 : 1 2 3 4 4 3 2 1 1 2 1 3 1 4 1 2 1 3 2 3 2 2 3 4 2 4 3 4 4 3 4

(2.68) Question What is |SYTn|? (Later.)

(2.69) Question For λ ` n, how many entries of SYTn have shape λ?

Given λ ` n, let λ f = |{T ∈ SYTn : T has shape λ}| So if λ = (3, 1) ` 4 then f λ = 3 (see the green box in last example).

(2.70) Denition Given a Young diagram λ and a cell (box) b ∈ λ, the hook- length of the cell is

hb = 1 + number of cells directly below b + number of cells directly to the right of b

(2.71) Example For a b λ = c

. ha = 2, hb = 7, hc = 1 ♦

(2.72) Theorem (The Hook-length formula) Given λ ` n,  λ Y f = n! hb cell b∈λ

(2.73) Example Consider λ = . Insert hook-lengths in each cell: 4 2 1 . 1 Thus 4! 24 f λ = = = 3 (4)(2)(1)(1) 8

47 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

5 4 3 If λ = 4 3 2 , then 3 2 1

9! f λ = = 42 (5)(4)(4)(3)(3)(3)(2)(2)(1)

2.9 Robinson-Schensted-Knuth (RSK) correspondence

(2.74) Motivating theorem

X (f λ)2 = n! (Frobenius formula) λ`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 2 2 2 2 2 1 + 3 + 2 + 3 + 1 = 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)) Given Young tableaux (P,Q) of the same shape and Q ∈ SYTm for some value m, we create a new pair (P 0,Q0) by inserting a into P and recording where a new box appears in Q.

Suppose   p1,1 ··· p1,r(1)  . .  P =  . .    pk,1 ··· pk,r(k)

 If a > p1,r(1), then insert a at the end of this row, and insert m + 1 into the corresponding position of Q.     E.g. if a = 9 : (P,Q) = 3 7 8 , 1 2 3 → 3 7 8 9 , 1 2 3 5 5 4 5 4

 If p1,j < a < p1,j+1, then replace p1,j+1 by a and look at row 2.

 If p1,j+1 is greater than the largest entry in row 2, then place it at the end and record this position in Q.  Otherwise, p2,i < p1,j+1 < p2,i+1. Replace p2,i+1 by p1,j+1 and bump p2,i+1 down, looking at row 3, etc. etc.

48 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

This is written (P 0,Q0) = (P,Q) ← a.

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 and i = 1, . . . , n. The pair (Pn,Qn) =: (P (π),Q(π)).

(2.78) Example Let π = 3 5 2 1 4.

(P0,Q0) = (∅, ∅).  i = 1 : (∅, ∅) ← 3 is 3 , 1 = (P1,Q1).   i = 2 : 3 , 1 ← 5 is 3 5 , 1 2 = (P2,Q2).   2 5 1 2 i = 3 : 3 5 , 1 2  ← 2 is , = (P ,Q ). 3 3 3 3     1 5 1 2 2 5 1 2 i = 4 : , ← 1 is  2 , 3  = (P4,Q4). 3 3 3 4  1 5 1 2   1 4 1 2  is i = 5 :  2 , 3  ← 4  2 5 , 3 5  = (P5,Q5) = (P (π),Q(π)). ♦ 3 4 3 4

(2.79) Denition Suppose Q ∈ SYTn. Dene

D(Q) = {i : i + 1 is in a row strictly lower than i in Q} (2.80) Example

1 2 3 5 Q = 4 D(Q) = {2, 3, 5} 6 ♦

RSK (2.81) Theorem Suppose π ∈ Sn and π −→ (P (π),Q(π)). Then Des(π) = D(Q(π)).

Proof. Suppose i ∈ Des π.

 We want to show the new box that appears in (Pi−1,Qi−1) ← πi is above the box that appears in (Pi,Qi) ← πi+1. st  Since πi > πi+1, entry πi+1 is inserted in the 1 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 displace some entry of row 1, and the value i will be in the 1st row of Q(π) and value i + 1 is in a row lower since it displaced some entry.

49 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

st  The entry a displaced from the 1 row by πi+1 is smaller than entry b displaced st nd from the 1 row by πi. Therefore, even if the insertion of πi ends in the 2 row, the insertion process of πi+1 has to go on to at least the row below, and maybe more. nd  Repeating this argument for a and b instead of πi+1 and πi, and the 2 row instead st of the 1 row, shows the same result. Either way the insertion of πi+1 always ends below that of πi. The same style of argument holds when .  πi < πi+1 

RSK RSK (2.82) Theorem If π −→ (P (π),Q(π)), then π−1 −→ (Q(π),P (π)).

Proof (Xavier Viennot, 1976). Given π = π1 ··· πn ∈ Sn draw its 'dot' diagram. The 'dot' diagram is an n × n grid with dots at positions {(i, πi) : 1 ≤ i ≤ n}. For example 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 ai be the labels on the east perimeter of the diagram and bi be the labels on the north perimeter of the diagram

a1 = (1, 4) b1 = (1, 2) 12 • • 4 • • • 1

If there are any corners in the diagram, then place a dot on these corners • and remove all other active dots and rays. Set all these new dots to be active. Let i → i + 1 and return to ?. 35 • 5

• • 2

a2 = (2, 5) b2 = (3, 5) And repeating again

50 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS 4

• 3

a3 = (3) b3 = (4) Usually we draw the dots and rays in one diagram: 12 35 4 • • 5 • 4 • • • 3 • • 2 • 1

The resulting left justied arrays of numbers give the tableaux of the RSK bijection     a1 b1  .   .  P (π) =  .  Q(π) =  .      am bm or     a1 1 4 b1 1 2

P (π) = a2 = 2 5 Q(π) = b2 = 3 5   3   4 a3 b3 If we look at the corresponding construction and sequences of labels −1, 0 0 , then π {ai, bi} we nd that due to the symmetry of the operation,

0 0 a1 = b1 , b1 = a1 . . . . 0 0 am = bm , bm = am Thus

 0   0      a1 b1 b1 a1 −1 −1  .   .   .   .  (P (π ),Q(π )) =  .  ,  .  =  .  ,  .  = (Q(π),P (π))         0 0 am bm bm am 

In light of this construction we have:

(2.83) Theorem A permutation π ∈ Sn is an involution if and only if P (π) = Q(π). (2.84) Corollary

X λ f = In , the number of involutions π ∈ Sn λ`n

51 CHAPTER 2. PERMUTATIONS & PERMUTATION STATISTICS

Another aspect of RSK correspondence:

RSK (2.85) Theorem If π −→ (P,Q), the length of the longest increasing subsequence of π = length of 1st 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 s. Same arguments holds for the rest. 

52 Chapter 3

Partially Ordered Sets (Posets)

3.1 Posets

(3.1) Denition (3.1.1.)A (poset) is a pair (P, ≤P ) where P is a set and ≤P is a binary relation on P satisfying

(1) for all x ∈ P , x ≤P x (reflexivity); (2) if x ≤P y and y ≤P x, then x = y (anti-symmetry); (3) if x ≤P y and y ≤P z, then x ≤P z (transitivity).

Where there is no possibility of confusion, we will write ≤ instead of ≤P . Also

x ≥ y means y ≤P x

x < y means x ≤p y and x 6= y

Two elements x, y ∈ P are comparable if x ≤P y or y ≤P x. Otherwise, they are called incomparable. (3.2) Example (3.1.2.)

(1) For n ∈ N let P = {i ∈ N : 1 ≤ i ≤ n}. Given x, y ∈ P , dene x ≤P y if x ≤ y. 1 < 2 < 3 < ··· < (n − 1) < n Each pair of elements is comparable. (Totally ordered set.)

(2) Given n ∈ N, let P = {A : A ⊆ {1, . . . , n}}. For x, y ∈ P , dene x ≤P y if x ⊆ y. In this case (P, ≤P ) is the poset of all subsets of {1, . . . , n} ordered by inclusion. It is denoted by Bn.

n = 2 : P = {∅, {1}, {2}, {1, 2}} ∅ ≤P {1} ≤P {1, 2}

∅ ≤P {2} ≤P {1, 2}

(3) Given n ∈ N let P = {i ∈ N : i divides n}. For x, y ∈ P dene x ≤P y if x divides y. E.g. if n = 18, then P = {1, 2, 3, 6, 9, 18} and

1 ≤P 1, 1 ≤P 2, 1 ≤P 3,..., 1 ≤P 18 6 ≤P 6, 6 ≤P 18

2 ≤P 2, 2 ≤P 6, 2 ≤P 18 9 ≤P 9, 9 ≤P 18

3 ≤P 6, 3 ≤P 9, 3 ≤P 18 18 ≤P 18

53 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

Here (P, ≤P ) is denoted by Dn. (4) Given n ∈ N let P = { partitions of {1, . . . , n}}. For x, y ∈ P dene x ≤P y if every block of x is contained in a block of y. If n = 4, we have x = {13, 2, 4} and y = {13, 24} ∈ P . Since every block of x is contained in a block of y, we have x ≤P y. We say that x is a refinement of y. Here (P, ≤P ) is the poset of partitions of ordered by renement and is denoted by . {1, . . . , n} Πn ♦

(3.3) Denition There are two types of subposets of (P, ≤P ).

 An induced subposet (Q, ≤Q) of (P, ≤P ) is such that Q ⊆ P and x ≤Q y ⇔ x ≤P y. E.g. choose Q = {1, 2, 3} ⊆ {1, 2, 3,...} in example (3) above.  A weak subposet of (P, ≤P ) is (Q, ≤Q) where Q ⊆ P and if x ≤Q y then x ≤P y. When we say subposet, we mean an induced subposet.

For x, y ∈ P where (P, ≤) is a poset, and x ≤ y, the interval [x, y] = {z ∈ P : x ≤ z ≤ y} is a subposet. The smallest interval is [x, x] = {x}.

(3.4) Denition If every interval [x, y] of (P, ≤P ) is nite, then P is called a locally finite poset.

If Q is a subposet of P , then Q is called convex if y ∈ Q whenever x < y < z in P and x, z ∈ Q. Interval posets are always convex.

Open interval: (x, y) = {z ∈ P : x < z < y} (3.5) Denition Given x, y ∈ P , we say that y covers x if x < y and there does not exist z ∈ P such that x < z < y. (3.6) Remark A locally nite poset is completely determined by its cover relations.

(3.7) Denition The Hasse diagram of a nite poset P is the graph with vertices x ∈ P and  if x < y, then y is drawn above x in the diagram;  if y covers x, then there is an edge between x and y in the diagram. (3.8) Example If P = {a, b, c, d, e, f} and a < b, a < c, a < d, b < e, e < f, c < f, d < f then the Hasse diagram of P is •f ~ 00 ~~ 0 e•~ 00 00 •c •  d •  b @@  @@  •a ♦

54 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

(3.9) Example All dierent (non-isomorphic) posets on 4-elements • • • •0 •0 • • •••• ••  00 • 00  • • •  00 00  • •• •• • • • • • •@ •9 • • • • @@ ~~ @@ 99 @@ @@~ @ ~~~ ~~ @ 9 @@ ~~@@ • •@ •@ • •9 • •• ••~ ~~ @@ @@ ~~ 99 ÕÕ • ••~ @•~~ 9•ÕÕ • • 99 ÕÕ 99 •@ •••@ • ••ÕÕ ~ @@ @@ ~ 99 ~~ @ @ ~~ 99 •••~ •~ • • • ♦ • • 0 ~ @@ (3.10) Question Why are •00 and •~~ @• not in the above diagrams? ~ @@00 @@ ~ ••~~ @ @•~~ (3.11) Example (From example 3.1.2.) •4 •3 (1) If n = 4 and P = {1, 2, 3, 4}, the Hasse diagram of the total order on P is •2 •1 (2) B4 = (P, ≤) where P = {A : A ⊆ {1, 2, 3, 4}} and elements are ordered by inclusion. P = {∅, 1, 2, 3, 4, 12,..., 134, 1234} The Hasse diagram:

o•@O1234O ooo~~ @@OOO ooo ~~ @@ OOO ooo ~~ @@ OOO ooo ~~ @@ OOO •oU123o •~U124 •O134 O•234 ~ UUUUoo UUUU iiioio OO ~ @@ ~ oooUUU UUUiiiooo OOO~ @@ ~~ oo UUUUiiiioUoUUU ~~OO @ ~~ ooo iiii UoUoUoU UUUU ~~ OOO @@ ~~ooo iiii ooo UUUU U~~UUU OOO@@ •~o12o •Ui13ii •oU14o UU•~23 UU•24 O•' 34 @O@OO UUU ~ UUU oo iii oo~ @ OO UU~UU UUUU oo iiii oo ~ @@ OOO ~~ UUU oUoUoU iii ooo ~~ @ OO ~ UUUoUoiiiiUUUU oo ~ @@ ~O~OO oooiiiUUU UUUooo ~~ @ ~~ OO oioiii UUUU ooUUUU ~~ •O1O •@io2 •o3 o•4 OOO @@ ~~ ooo OO @@ ~ oo OOO @ ~~ ooo OOO@@ ~~ooo OO@•~o~oo ∅

(3) Consider D12 = (P, ≤) where P = {i : i divides 12} = {1, 2, 3, 4, 6, 12}. x ≤ y in P if x divides y. 1 < 2, 3, 4, 6, 12 4 < 12 2 < 4, 6, 12 6 < 12 3 < 6, 12

Hasse diagram for D12: 12 •@ ~~ @@ ~~ @@ 4•~ •6 oo ooo •ooo • 2 @@ ~ 3 @@ ~~ @•~~ 1

55 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

(4) Π3 = (P, ≤) where P is the set of all partitions of {1, 2, 3},

P = {{123}, {1, 23}, {2, 13}, {3, 12}, {1, 2, 3}} =x1 =x2 =x3 =x4 =x5 Then

x5 < x1, x2, x3, x4 x2, x3, x4 < x1 Hasse diagram: {123} KK sss KK ss KKK sss K {1, 23} {2, 13} {3, 12} KK KK sss KKK ss K sss {1, 2, 3} ♦

(3.12) Denition Given poset (P, ≤), if there exists an element a ∈ P such that a ≤ x for all x ∈ P , then a is a smallest element of the poset P and is denoted 0ˆ. Similarly, if there is a largest element a such that x ≤ a for all x ∈ P , then a is written 1ˆ.

(3.13) Denition A chain is a poset in which every 2 elements are comparable.

 A subset C of a poset P is a chain if C is a chain when regarded as a subposet of P .  A chain C in a poset is saturated if it is not amissing any elements within it, i.e. 6 ∃z ∈ P − C such that x < z < y for some x, y ∈ C  In a locally nite poset, a chain x0 < x1 < ··· < xn is saturated ⇔ xi+1 covers xi for all 0 ≤ i < n.

(3.14) Denition The length of a nite chain is `(C) = |C| − 1. The length (rank) of a nite poset P is

`(P ) = max{`(C): C chain in P }

Length of the interval [x, y] in P is `(x, y). A chain C in a poset P is maximal if no more elements can be added to it.

(3.15) Example

f P : • `(P ) = 5 ~ @@ g e•~~ @• ~ @@ d•~~ @•h ~ •~c~ •b •a

C1 = {a, b, c, d, e, f} is a maximal chain, `(C1) = 5 is a maximal chain, C2 = {h, g, f} `(C2) = 2 ♦

56 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

(3.16) Denition If every maximal chain of P has the same length n, then P is graded of length n.

Notice that if P is graded, then there is a unique rank function ρ : P → {0, 1, . . . , n} such that

 ρ(x) = 0 if x is a minimal element of P ,  ρ(y) = ρ(x) + 1 if y covers x in P . If ρ(x) = i for x ∈ P , then we say element x has rank i.

If x ≤ y, then `(x, y) = ρ(y) − ρ(x).

(3.17) Denition If P is a graded poset of rank n, then the polynomial

n X i F (P, q) = piq , i=0 where pi = # elements of rank i in P , is called the rank generating function of P .

(3.18) Remark All posets in Example 3.1.2. were graded.

(3.19) Example Let P be the poset with Hasse diagram

rank: 4 • Ò << ÒÒ << 3 •Ò •< ÒÒ ÒÒ << ÒÒ ÒÒ < 2 •

(3.20) Example Consider poset P on {1, . . . , n} with 1 < 2 < . . . < n. One maximal chain ⇒ graded. `(C) = n − 1, ρ(x) = x − 1, ρ(P ) = n − 1. ♦

(3.21) Example The poset Bn = (P, ≤), where

P = {A : A ⊆ {1, . . . , n}}, x ≤ y ⇔ x ⊆ y

A chain in Bn is a sequence

{A1,...,Ak} such that A1 ⊂ A2 ⊂ · · · ⊂ Ak ⊆ {1, . . . , n}

Maximal chain e.g. C:

∅ < {1} < {1, 2} < {1, 2, 3} < . . . < {1, . . . , n} We see that `(C) = n + 1 − 1 = n

57 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

which applies to all maximal chains. Thus the poset Bn is graded of length n.

Note that if x ∈ P , then ρ(x) = |x| (no. of elements in x), e.g. ρ({1, . . . , n}) = n. Thus

n n X X n F (B , q) = p qi = qi = (1 + q)n n i i i=0 i=0 ♦

(3.22) Example Dn = (Pn, ≤) where Pn = {1 ≤ i ≤ n : i divides n}. If x, y ∈ Pn, then x ≤ y ⇔ x divides y.

For we have 2 1 α1 α2 , n = 12 12 = 2 3 := p1 p2

12=2231 D12 : •@ ~ @@ ~~ @@ 2 0•~~ • 1 1 4=2 3 oo 6=2 3 ooo •ooo • 1 0 @@ ~ 0 1 2=2 3 @@ ~~ 3=2 3 @•~~ 1=2030 and |D12| = (2 + 1)(1 + 1) = 6.

Claim Poset Dn is graded.

Proof. If α1 α2 αm where are primes, then n = p1 p2 ··· pm p1, . . . , pn

β1 βm Pn = {p1 ··· pm : 0 ≤ β1 ≤ α1,..., 0 ≤ βm ≤ αm} and . If and β1 βm , then |Pn| = (1 + α1)(1 + α2) ··· (1 + αm) x ∈ Pn x = p1 ··· pm ρ(x) = . In particular . β1 + ··· + βm ρ(Pn) = α1 + α2 + ··· + αm 

We have     α1+···+αm α1 αm α1 αm X j X X β1+···+βm X β1 X βm F (Dn, q) = pjq = ··· 1q =  q  ···  q  j=0 β1=0 βm=0 β1=0 βm=0 qα1+1 − 1 qαm+1 − 1 = ··· q − 1 q − 1 ♦

(3.23) Denition A multichain of a poset P is a chain in which elements are allowed to be repeated.

•e ~ 00 ~~ 0 c•~ 00 00 (3.24) Example Poset P with Hasse diagram: •  d •  b @@  @@  •a

0 C = {a, b, b, b, c, c, e} is a multichain. Length of C = {x0 ≤ x1 ≤ · · · ≤ xn} is n. Hence, `(C) = 7 − 1 = 6. ♦

58 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

(3.25) Denition An antichain of a poset P is a subset A ⊆ P such that every pair of elements of A are incomparable.

(3.26) Example Continuing last example,

A = {c, d} A = {b, d} A = ∅ A = {a} A = {b} A = {c} A = {d} A = {e} are the antichains of P . ♦

(3.27) Denition An order ideal (downset) of poset P is a subset I ⊆ P such that if x ∈ I and y ≤P x, then y ∈ I.

A dual order ideal (upset) is a subset I ⊆ P such that is x ∈ I and x ≤P y, then y ∈ I.

(3.28) Example (cf. (3.24)) I1 = {a, b, c, d} is a downset of P and not an upset.

is an upset of and not a downset. I2 = {b, c, d, e} P ♦

For a nite poset P , there is a 1-1 correspondence between antichains of P and downsets of P : (3.29) Proposition

 If A is antichain of P (nite) then

I(A) = {x : x ≤ y and y ∈ A}

is an order ideal.  If I is an order ideal, then

A(I) = { maximal x ∈ I}

is an antichain. (3.30) Example (cf. (3.24))

Antichain (A) Order ideal (I) ∅ ∅ {a} {a} {b} {a, b} {c} {a, b, c} {d} {a, d} {e} {a, b, c, d, e} {b, d} {a, b, d} {c, d} {a, b, c, d} ♦

59 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

(3.31) Remark The set of all order ideals (downsets) of a poset P , when ordered by inclusion, forms a poset J(P ).

(3.32) Example Continuing the last example,

{a, b, c, d, e} i.e. •1ˆ • {a, b, c, d} ~ @@ n PP ~~ @@ nnn PPP •~~ @• nnn PPP oo {a, b, cn} {a, b, d} ooo ff ooo fffff •@o • fffff @@ ~~ fffff @ ~ {a, b}f {a, d} @•~~ PP n PPP nnn PPP nnn P{a}nn •0ˆ

∅ ♦

(3.33) Notation If A = {x1, . . . , xk} is an antichain, then we write hx1, . . . , xki for the order ideal corresponding to A. ∼ (3.34) Denition Two posets (P. ≤P ) and (Q, ≤Q) are isomorphic, P = Q, if there exists order preserving bijection ϕ : P → Q such that

x ≤P y ⇔ ϕ(x) ≤Q ϕ(y)

(3.35) Denition The dual of a poset P is P ∗ such that

x ≤P y ⇔ y ≤P ∗ x

(3.36) Remark The Hasse diagram of P ∗ = the Hasse diagram of P upside down.

3.2 Lattices

(3.37) Denition Given x, y ∈ P (a poset), an element z ∈ P is called  an upper bound of x and y if x ≤ z and y ≤ z;  a lower bound of x and y if z ≤ x and z ≤ y. If z is an upper bound of x and y such that z ≤ w for all other upper bounds w of x and y, then z is called a least upper bound.

Similarly, if z is a lower bound of x and y such that w ≤ z for all other lower bounds w of x and y, then z is called a greatest lower bound.  If the least upper bound of x and y exists, then it is denoted x ∨ y (x join y, x sup y, join together).  If the greatest lower bound of x and y exists, then it is denoted x ∧ y (x meet y, x inf y, where they meet).

60 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

(3.38) Example

•h g •@ is the least upper bound of and . ~~ @@ f c d ~~ @@ e•~ •f b is the greatest lower bound of c and d. ooo ooo ooo c•@ • @@ ~~ d c ∨ d = f, c ∧ d = b @@ ~~ •~b

•a (3.39) Denition If P is a poset and for all x, y ∈ P , x ∨ y and x ∧ y exist, then P is called a lattice.

(3.40) Remark In a lattice (L, ≤) many properties such as associativity and commu- tativity are true for the ∨ and ∧ operations.

(3.41) Example • •a •@ is not a lattice since a ∨ x and a ∧ x does not exist for any x ∈ P \{a} ~~ @@ ••~~ @ •b is a lattice, since a ≤ b and b ≤ b, giving a ∨ b = b and a ∧ b = a •a c •@ ~~ @@ is not a lattice, since a ∧ b is undened. •~~ @• ♦ a b

(3.42) Example Out of the 16 dierent posets on 4 element (see Example 3.9), only 2 are lattices: • •@ ~~ @@ • •~~ @• and @@ ~ • @@ ~~ •~ • ♦

(3.43) Remark All nite lattices (|L| < ∞) have a 0ˆ and a 1ˆ.

If |L| is innite, then this need not be true.

2 0 0 0 0 (3.44) Example If L = (Z , ≤) where (x, y) ≤ (x , y ) ⇔ x ≤ x and y ≤ y , we have: which has no 0ˆ and no 1ˆ. ♦ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 61 @ @ @ CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

(3.45) Denition If P is a poset and every x, y ∈ P have a meet, x ∧ y, then we say that P is a meet-semilattice.

Simlarly, if P is a poset and x ∨ y exists for all x, y ∈ P , then we say that P is a join-semilattice.

(3.46) Useful Theorem If P is a nite meet (join) semilattice with a 1ˆ (0ˆ), then P is a lattice.

All dierent lattices on 5 points:

• • •@ •0 ~~ @@ • ~~ 0 • ~~ @ ~ @@ •~ 00 •@ •@ • ~~ @@ 0 • ~~ @@ @@ ~~ •~ • • • ~~ @ @ ~~ @@ ~ • •@ • • @@ ~~ •  @@ ~~ •~ @@  • @•~~ • @• They are all graded, except the last one.

(3.47) Denition A lattice is an algebra L = (L, ∨, ∧) satisfying, for x, y, z ∈ L, (1) x ∧ x = x and x ∨ x = x; (2) x ∧ y = y ∧ x and x ∨ y = y ∨ x; (3) x ∧ (y ∧ z) = (x ∧ y) ∧ z and x ∨ (y ∨ z) = (x ∨ y) ∨ z; (4) x ∧ (x ∨ y) = x and x ∨ (x ∧ y) = x.

3.3 Modular Lattices

(3.48) Denition A nite lattice L is called modular if it is graded and the rank function ρ satises

ρ(x) + ρ(y) = ρ(x ∧ y) + ρ(x ∨ y), ∀x, y ∈ L (3.1)

In the case where one is considering (L, ∨, ∧) as an algebra, this condition is equivalent to (L, ∨, ∧) also satisfying (5) for all x, y, z ∈ L with x ≤ z, x ∨ (y ∧ z) = (x ∨ y) ∧ z.

g • x FF xx FF xx e FF •4x •4 • (3.49) Example Consider lattice L with Hasse diagram d 4 4 f . 44 44 • • b 44 c 44 • a

It is graded with ρ(a) = 0, ρ(b) = ρ(c) = 1,.... Notice that ρ(d) = ρ(f) = 2, ρ(d ∨ f) = ρ(g) = 3, ρ(d ∧ f) = ρ(a) = 0. Thus

ρ(d) + ρ(f) = 4 6= 3 = ρ(d ∨ f) + ρ(d ∧ f)

62 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

So L is not modular.

Alternatively, in terms of condition (5), choose x = b, y = f, z = d. Then x ≤ z and

x ∨ (y ∧ z) = b ∨ (f ∧ d) = b ∨ a = b 6= d = g ∧ d = (b ∨ f) ∧ d = (x ∨ y) ∧ z ♦

(3.50) Proposition The total order P = ({1, . . . , n}, ≤) is a modular lattice. Proof. (P, ∨, ∧) is a lattice with x ∨ y = max(x, y) and x ∧ y = min(x, y). It is easy to check that conditions (1) through (4) hold. The lattice is graded with rank ρ(x) = x − 1. For x, y ∈ P condition (3.1) holds since

x + y = min(x, y) + max(x, y), ∀x, y ∈ P 

(3.51) Proposition The poset Bn = ({1, . . . , n}, ≤) is a modular lattice, where x ≤P if x ⊆ y.(Bn is the poset of all subsets of {1, . . . , n} ordered by inclusion.)

Proof. If we set x ∧ y = x ∩ y and x ∨ y = x ∪ y for x, y ∈ Bn then (Bn, ∨, ∧) satises conditions (1) through (4), and thus is a lattice. The lattice Bn is graded with rank ρ(x) = |x|. Since x, y ⊆ {1, . . . , n} we know |x| + |y| = |x ∩ y| + |x ∪ y| i.e. ρ(x) + ρ(y) = ρ(x ∧ y) + ρ(x ∨ y) thereby satisfying condition (3.1). Alternatively, if x, y, z ∈ Bn and x ≤ z, then x, y, z ⊆ {1, . . . , n} and x ⊆ z. So x ∨ (y ∧ z) = x ∪ (y ∩ z) = (x ∪ y) ∩ (x ∪ z) = (x ∪ y) ∩ (z) = (x ∨ y) ∧ z i.e. condition (5) is true. 

Let Vn(q) be the n-dimensional vector space over the eld Fq (or GF (q)). Dene Ln(q) to be the poset of subspaces of Vn(q) where x ≤ y if x is a subspace of y.

(3.52) Proposition Ln(q) is a modular lattice.

Proof. It is easy to see that ∅ is the 0ˆ of Ln(q) and that Vn(q) is the 1ˆ of Ln(q). If x, y ∈ Ln(q), then one can easily argue that x ∧ y = x ∩ y, which is also a subspace of Vn(q). So Ln(q) is a meet-semilattice. Since it is nite, by the useful theorem (3.46) it is a lattice.

The lattice Ln(q) is graded with rank ρ(x) = dim(x), the dimension of the subspace x.

If x, y ∈ Ln(q), then x ∨ y = x + y = {u + v : u ∈ x, v ∈ y}. From linear algebra, one knows dim x + dim y = dim(x ∩ y) + dim(x + y) Hence ρ(x) + ρ(y) = ρ(x ∧ y) + ρ(x ∨ y) 

63 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

3.4 Distributive Lattices

(3.53) Denition A nite lattice (L, ∨, ∧) is called distributive if for all x, y, z ∈ L,

(6') x ∨ (y ∧ z) = (x ∨ y) ∧ (x ∨ z),   or imply one another  (6) x ∧ (y ∨ z) = (x ∧ y) ∨ (x ∧ z). 

(3.54) Proposition If L is a nite distributive lattice, then L is modular.

Proof. If (L, ∨, ∧) is a distributive lattice, then for all x, y, z ∈ L

x ∨ (y ∧ z) = (x ∨ y) ∧ (x ∨ z)

If x ≤ z, then x ∨ z = z. So

x ∨ (y ∧ z) = (x ∨ y) ∧ z and condition (5) holds. 

(3.55) Proposition The lattice Bn is distributive.

Proof. From Prop. (3.51) we know Bn is a modular lattice. In order to show it is dis- tributive, we must show either (6') or (6) holds.

If x, y, z ∈ Bn, then

x ∨ (y ∧ z) = x ∪ (y ∩ z) = (x ∪ y) ∩ (x ∪ z)(since ∩ & ∪ distributive) = (x ∨ y) ∧ (x ∨ z)

Therefore (6') is true and is distributive. Bn 

(3.56) Proposition The lattice Ln(q) is not distributive.

Proof. Later... 

(3.57) Theorem (Fundamental theorem of nite distributive lattices, FTFDL) If L is a nite distributive lattice, then there exists a poset P such that L =∼ J(P ).

3.5 Incidence Algebra of a Poset

(3.58) Denition Let P be a locally nite poset. The set of intervals of P is

Int(P ) = {[x, y]: x, y ∈ P, x ≤ y}

64 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

(3.59) Denition The incidence algebra of P , denoted I(P ), is the algebra of all functions f : Int(P ) → C, with multiplication X (fg)(x, y) = f(x, z)g(z, y), where f(x, y) := f([x, y]) x≤z≤y

(3.60) Remark It is easy to see that the identity of this algebra is ( 1 if x = y 1(x, y) = δ(x, y) = 0 if x < y

(3.61) Proposition Let f ∈ I(P ). The following statements are equivalent:

(1') f has left inverse; (1) f has right inverse; (1') f has a 2-sided inverse; (2) f(x, x) 6= 0 for all x ∈ P .

Proof. fg = δ = 1 is equivalent to

 fg(x, x) = 1 for all x ∈ P ;  fg(x, y) = 0 for all x < y ∈ P .

Notice that X (fg)(x, y) = f(x, z)g(z, y) x≤z≤y X = f(x, x)g(x, y) + f(x, z)g(z, y) = 0 ∀x < y x

So this value is OK so long as f(x, x) 6= 0. Thus

f has a right inverse ⇔ f(x, x) 6= 0 ∀x ∈ P

Applying the same argument to hf = δ shows

f has a left inverse ⇔ f(x, x) 6= 0 ∀x ∈ P

So

f has a right inverse ⇔ f(x, x) 6= 0 ∀x ∈ P ⇔ f has a left inverse

By looking at the covers of x, one sees that f(x, x)−1 depends only on [x, y] and conse- −1 quently g(x, y) = h(x, y) = f(x, y) . 

65 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

3.6 The Zeta Function

(3.62) Denition The zeta function is

ζ : I(P ) → C, ζ(x, y) = 1 i.e. ζ of every interval is equal to 1.

(3.63) Remark Notice that

X ζ2(x, y) = ζζ(x, y) = ζ(x, z)ζ(z, y) x≤z≤y X = 1 = |[x, y]| x≤z≤y = |{z ∈ P : x ≤ z and z ≤ y}|

Consider k ∈ N:

k X X ζ (x, y) = ζ(x0, x1)ζ(x1, x2) ··· ζ(xk−1, xk) = 1

x=x0≤x1≤···≤xk=y x=x0≤x1≤···≤xk=y

= |{(x0, . . . , xk): x = x0, y = xk, x0 ≤ x1 ≤ · · · ≤ xk}|

= the number of multichains of length k from x to y

k (3.64) Proposition If k ∈ N, then (ζ − 1) (x, y) is the number of chains of length k from x to y.

Proof. Notice rst that ( 0 if x = y (ζ − 1)(x, y) = ζ(x, y) − 1(x, y) = 1 if x < y

Using this,

k X (ζ − 1) (x, y) = (ζ − 1)(x0, x1) · (ζ − 1)(x1, x2) ··· (ζ − 1)(xk−1, xk)

x=x0≤x1≤···≤xk=y X = 1

x=x0

(3.65) Proposition The function (2 − ζ)−1 ∈ I(P ) counts the number of chains in an interval.

Proof. First ( 1 if x = y (2 − ζ)(x, y) = 2δ(x, y) − ζ(x, y) = −1 if x < y

66 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

Since (2 − ζ)(x, x) = 1 for all x ∈ P , the inverse (2 − ζ)−1 exists.

Fix x, y ∈ P with x ≤ y and let l be the length of the longest chain in [x, y]. From the previous proposition we know that

l+k (ζ − 1) (u, v) = 0 for all x ≤ u ≤ v ≤ y and k ∈ N Using this we have

(2 − ζ)1 + (ζ − 1) + ··· + (ζ − 1)l(u, v) = 1 − (ζ − 1)1 + (ζ − 1) + ··· + (ζ − 1)l(u, v) = 1 + (ζ − 1) + ··· + (ζ − 1)l − (ζ − 1) − · · · − (ζ − 1)l − (ζ − 1)l+1(u, v) = 1 − (ζ − 1)l+1)(u, v) = 1(u, v) = δ(u, v) Thus (2 − ζ)−1 = 1 + (ζ − 1) + ··· + (ζ − 1)l on all intervals of [x, y]. This gives −1 (2 − ζ) (x, y) = total number of chains in [x, y] 

3.7 The Möbius Inversion Formula

The zeta function ζ satises ζ(x, x) = 1 for all x ∈ P and so, ζ−1 exists. (3.66) Denition The inverse µ = ζ−1 of P is called the Möbius function of P and is given by

µ(x, x) = 1 for all x ∈ P X µ(x, y) = − µ(x, z) for all x < y ∈ P x≤z

f •@  @@  @•e (3.67) Example Let P be the poset with Hasse diagram  ~ @@  ~ @@ • •~c~ • b @@ nn d @@ nnn •nan

Intervals of P : [a, a], [b, b],..., [f, f] [a, b], [a, c], [a, d], [a, e], [a, f] [b, f], [c, e], [c, f] [d, e], [d, f] [e, f]

67 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

So

µ(a, a) = µ(b, b) = ··· = µ(f, f) = 1 X µ(a, b) = − µ(a, z) = −µ(a, a) = −1 a≤z

The point of all this:

(3.68) Proposition (Möbius Inversion Formula, M.I.F.) Let P be a poset in which every order ideal hxi is nite. Let f, g : P → C. Then X X g(x) = f(y), ∀x ∈ P ⇔ f(x) = g(y)µ(y, x), ∀x ∈ P y≤x y≤x

(3.69) Lemma Let µ be the Möbius function of a poset P . If a < b, then X µ(a, b) = − µ(z, b) a

Proof. From the denition of µ we have µ(a, a) = 1 and X µ(a, b) = − µ(a, z), if a < b a≤z

Notice that if b covers a, a < b, then

µ(a, b) = −µ(a, a) = −1 = −µ(b, b)

By induction of the longest chain in [a, b], the result then holds.

Alternatively: all functions in I(P ) remain the same when we move from P to P ∗ (dual poset). So in ∗ in . µP ∗ (y, x) P = µ(x, y) P 

Proof (of M.I.F.). ⇒: Let f : P → C and dene X g(x) = f(y) ∀x ∈ P y≤x

68 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

Then the sum X X X X X µ(y, x)g(y) = µ(y, x) f(z) = f(z) µ(y, x) y˙≤x y˙≤x z˙≤y z˙≤x z≤y˙≤x X X X = f(x)µ(x, x) + f(z) µ(y, x) = f(x) + f(z) · (0) z

⇐: Handled in exactly the same way. 

The dual form of the M.I.F. is also useful:

(3.70) Proposition (Möbius inversion formula, dual form) Let P be a poset in which every dual order ideal is nite. Let f, g : P → C. Then X X g(x) = f(y) ∀x ∈ P ⇔ f(x) = µ(x, y)g(y) ∀x ∈ P x≤y˙ x≤y˙

3.8 Applications of the Möbius Inversion Formula

(3.71) Example

(1) Consider the total order on P = (N, ≤). For each i ∈ N, hii = {1 ≤ j ≤ i} is nite. The Möbius function of P :

µ(i, i) = 1 i ≥ 1 µ(i, i + 1) = −µ(i, i) = −1 i ≥ 1 µ(i, i + k) = 0 k > 1, i ≥ 1

If f, g : P → C, then M.I.F. gives x X X g(x) = f(y) = f(y) y≤x y=1 i

x X X f(x) = µ(y, x)g(y) = µ(y, x)g(y) = µ(x, x)g(x) + µ(x − 1, x)g(x − 1) y≤x y=1 = g(x) − g(x − 1)

(2) Let X1,...,Xn ⊆ S be nite sets and let P be the poset of all intersections of these sets, ordered by inclusion. Also let 1ˆ = X1 ∪ · · · ∪ Xn ∈ P . We want to give an expression for |X1 ∪ · · · ∪ Xn| in terms og the sizes |Xi| and their intersections. Dene two functions on P :

g(x) = # elements in set x f(x) = # elements in set x that do not belong to any set x0 < x

69 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

X g(x) = f(x) y≤x Notice that f(1)ˆ = 0 so X 0 = f(1)ˆ = g(y)µ(y, 1)ˆ by M.I.F. y≤1ˆ Thus X X 0 = |y|µ(y, 1)ˆ = |1ˆ|µ(1ˆ, 1)ˆ + |y|µ(y, 1)ˆ y≤1ˆ y<1ˆ i.e. X |X1 ∪ · · · ∪ Xn| = − |y|µ(y, 1)ˆ y<1ˆ If we let n = 3:

X1∪X2∪X3=1ˆ •@ ~~ @@ ~~ @@ ~~ β2=X@2 β1=X1•@ •@ •β3=X3 @@ ~~ @@ ~~ ~~@@ ~~@@ ~~ @ ~~ @ •@ •α2=X•1∩X3 α1=X1∩X2 @@ ~~ α3=X2∩X3 @@ ~~ @•~~ X1∩X2∩X3=0ˆ then

µ(βi, 1)ˆ = −1, µ(αi, 1)ˆ = 1, µ(0ˆ, 1)ˆ = −1 Thus

|X1 ∪ X2 ∪ X3| = −|X1|µ(X1, 1)ˆ − |X2|µ(X2, 1)ˆ − |X3|µ(X3, 1)ˆ

− |X1 ∩ X2|µ(X1 ∩ X2, 1)ˆ − · · · − |X2 ∩ X3|µ(X2 ∩ X3, 1)ˆ

− |X1 ∩ X2 ∩ X3|µ(X1 ∩ X2 ∩ X3, 1)ˆ

= |X1| + |X2| + |X3| − |X1 ∩ X2| − |X1 ∩ X3| − |X2 ∩ X3|

+ |X1 ∩ X2 ∩ X3|

(3) The poset (Bn ≤) and the Principle of Inclusion-Exclusion:

Lemma Let P = (Bn, ≤) be the poset of all subsets of {1, . . . , n} ordered by inclusion. For x ≤ y ∈ Bn µ(x, y) = (−1)|y|−|x|

Proof. Let x, y ∈ Bn with x ≤ y and r = ρ(y) − ρ(x) = |y| − |x|. It is an easy exercise to see that the interval [x, y] of Bn is isomorphic to the poset (Br, ≤). (Consider the map ψx :[x, y] → Br, ψx(z) = z − x.) •{1}=1ˆ For n = 1: ⇒ µ(0, 1)ˆ = (−1)1−0. •∅ For n = 2: Same.

70 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

By induction on n, the above map ψx shows the result to be true for all [x, y] 6= [0, 1]ˆ . For [0, 1]ˆ , n−1 X X X n µ(0, 1)ˆ = − µ(0ˆ, x) = − (−1)|x| = − (−1)i i x<1ˆ x<1ˆ i=0 n n n = − [(1 − 1) − (−1) ] = (−1) 

So, Möbius inversion for Bn tells us that for f, g : Bn → C

X X |x|−|y| g(x) = f(y) ∀x ∈ Bn ⇔ f(x) = (−1) g(y) ∀x ∈ Bn y≤x y≤x

X X |y|−|x| g(x) = f(y) ∀x ∈ Bn ⇔ f(x) = (−1) g(y) ∀x ∈ Bn x≤y x≤y

An example of a (f, g) pair on Bn: Let D(n) = # derangements of {1, . . . , n} = #{π ∈ Sn : π1 6= 1, . . . , πn 6= n} (no xed points). E.g. D(0) = 1,D(1) = 0,D(2) = 1,D(3) = 2. For π ∈ Sn let fix(π) = {i : πi = i}. Dene

f(T ) = |{π ∈ Sn : fix(π) = T }|

g(T ) = |{π ∈ Sn : fix(π) ⊇ T }| for all T ⊆ {1, . . . , n},T ∈ Bn. (Note: g(T ) = (n − |T |)! ). We want to nd f(∅) = f(0)ˆ . Since X 0 g(T ) = f(T ) ∀T ∈ Bn T ⊆T 0 the D.M.I.F. gives

X |T 0|−|T | 0 f(T ) = (−1) g(T ) ∀T ∈ Bn T ⊆T 0 Thus n   X 0 X n f(∅) = (−1)|T |(n − |T 0|)! = (−1)i(n − i)! i ∅⊆T 0 i=0 n n X n! X (−1)i = (−1)i(n − i)! = n! (n − i)!i! i! i=0 i=0  1 1 1 (−1)n  = n! 1 − + − + ··· + 1 2! 3! n!  1 1 (−1)n  = n! − + ··· + 2! 3! n!

E.g. for : 1 1 . n = 3 3!( 2! − 3! ) = 3 − 1 = 2

As another example, recall problem sheet 5, q. 3: Given X ⊆ {1, . . . , n − 1}, let

α(X) = |{π ∈ Sn : des π ⊆ X}|

71 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

It was shown that if X = {x1, . . . , xk}, then

 n  α(X) = x1, x2 − x1, . . . , n − xk What is

β(X) = |{π ∈ Sn : des π = X}| ?

From the Möbius Inversion Formula: α, β : Bn−1 → C X α(X) = β(Y ) for all X ⊆ {1, . . . , n − 1} Y ⊆X and thus X X β(X) = α(Y )µ(Y,X) = α(Y )(−1)|X|−|Y | Y ⊆X Y ⊆X X  n  = (−1)k−j , k = |X| xi1 , xi2 − xi1 , . . . , n − xik 1≤i1

(4) Classical Möbius function in Number theory: (Dn, ≤) is the lattice of divisors of n.

12=2231 µ(1, 1) = 1 = µ(2, 2) = µ(3, 3) = ... D12 : •@ ~ @@ µ(1, 2) = −1 = µ(1, 3) ~~ @@ 2 0•~~ • 1 1 4=2 3 oo 6=2 3 µ(1, 2 × 2) = −µ(1, 1) − µ(1, 2) = 0 ooo •ooo • 1 0 @@ ~ 0 1 µ(1, 2 × 3) = −µ(1, 1) − µ(1, 2) − µ(1, 3) = 1 2=2 3 @@ ~~ 3=2 3 @•~~ µ(1, 2 × 2 × 3) = −µ(1, 1) − µ(1, 2) − µ(1, 3) 1=2030 −µ(1, 2 × 2) − µ(1, 2 × 3) = 1 − 1 = 0

Lemma Given x, y ∈ Dn, x ≤ y, then  (−1)t if y/x is a product of t distinct primes  µ(y/x) = µ(x, y) = 1 if x = y  0 otherwise.

Set D = innite lattice of divisors of the integers; divisor lattice. Then

{µ(1), µ(2), µ(3), µ(4), µ(5), µ(6), µ(7),...} = {1, −1, −1, 0, −1, 1, −1,...}

From this, if X g(m) = f(d) for all integers m , d|m then X f(m) = g(d)µ(m/d) ∀m ∈ N d|m

72 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

As an example, let f(x) = x. Then X g(m) = d = sum of divisors of m d|m

and X m = f(m) = g(d)µ(m/d) . d|m Or if f(x) = 1, then X g(m) = 1 = # of divisors of m d|m

and X 1 = f(m) = g(d)µ(m/d) d|m

(5) The Möbius function of Ln(q) (lattice of subspaces of Vn(q)) and Πn (lattice of partitions of {1, . . . , n}):

 for Ln(q), n n µ(0ˆ, 1)ˆ = (−1) q(2)

 for Πn, n−1 µ(0ˆ, 1)ˆ = (−1) (n − 1)! ♦

3.9 The Möbius Function of Lattices

In particular cases the Möbius function of a lattice may be easy to calculate.

(3.72) Lemma (3.9.1.) Let L be a nite lattice with 1ˆ covering {x1, . . . , xk} and 0ˆ covered by {y1, . . . , ym}.

If x1 ∧ x2 ∧ ... ∧ xk 6= 0ˆ then µ(0ˆ, 1)ˆ = 0

If y1 ∨ y2 ∨ ... ∨ ym 6= 1ˆ then µ(0ˆ, 1)ˆ = 0

(3.73) Remark The elements {y1, . . . , ym} covering 0ˆ are called atoms. The elements {x1, . . . , xk} covered by 1ˆ are called coatoms.

(3.74) Lemma (3.9.2.) Let L be a nite distributive lattice. For x, y ∈ L,

 `(x,y) if is a Boolean algebra  (−1) [x, y]  ∼ µ(x, y) = (i.e. = Bk for some k)  0 otherwise

73 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

Proof. Recall that if L is distributive, then L =∼ J(P ) for some poset P . If x, y ∈ L with x ≤ y, then there are antichains X,Y in P such that y corresponds to the order ideal hY i and X corresponds to the order ideal hXi. So, since x ≤ y, hXi ⊆P hY i and Y \ X is an antichain of P . Thus in J(P ) the sublattice [hXi, hY i] =∼ [0ˆ, hY \ Xi]. Using this argument it is clear that

hY i is the join of covers of hXi ⇔ [x, y] is a boolean algebra

From the previous lemma (3.72), if hY i is not the join of the covers of hXi, then µ(x, y) = 0. Hence the result. 

(3.75) Lemma (3.9.3.) Let P be a nite poset with a 0ˆ and 1ˆ. Let ci = # chains 0ˆ = x0 < x1 < ··· < xi = 1ˆ of length i. Then

µ(0ˆ, 1)ˆ = c0 − c1 + c2 − c3 + c4 − · · · (Related to the ).

Proof. The function µ = (1 + (ζ − 1))−1, so

µ(0ˆ, 1)ˆ = (1 + (ζ − 1))−1(0ˆ, 1)ˆ = (1 − (ζ − 1) + (ζ − 1)2 − (ζ − 1)3 + ··· )(0ˆ, 1)ˆ = 1(0ˆ, 1)ˆ − (ζ − 1)(0ˆ, 1)ˆ + (ζ − 1)2(0ˆ, 1)ˆ − · · ·

= c0 − c1 + c2 − c3 + ··· since i ˆ ˆ by Prop. (3.64). ci = (ζ − 1) (0, 1) 

3.10 Young's lattice

From chapter 1, we have

Par(n) = set of partitions of the integer n

Dene Par = Par(0) ∪ Par(1) ∪ · · · Then

Par(0) = ∅ Par(3) = {3, 21, 111} Par(1) = {1} Par(4) = {4, 31, 22, 211, 1111} Par(2) = {2, 11} Par(5) = {5, 41, 32, 311, 221, 2111, 11111}

The sets Par(n) are easily visualised as Young diagrams. Given λ, µ ∈ Par, dene λ ⊆ µ if the shape of λ is contained in the shape of µ. For example

32 = ⊆ = 4211

74 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS) but

21 = 6⊆ = 111

Let Y = (Par, ⊆) be the poset on Par with this inclusion/containment order

• • • NNN pp NNN pp 3 111 NNN ppp 21 NNN ppp NNN ppp NNN ppp NN ppp NN ppp •NN p• 11 NN pp 2 NNN ppp NNN ppp N•p1p

•∅ (3.76) Theorem Y is a lattice.

Proof. Given λ = (λ1, λ2,...), µ = (µ1, µ2,...) ∈ Y, the smallest shape (diagram) that contains both λ and µ is

λ ∨ µ = (max(λ1, µ1), max(λ2, µ2),...) and similarly

λ ∧ µ = (min(λ1, µ1), (λ2, µ2),...) It is straightforward to check that conditions (1)(4) hold for (Y, ∨, ∧). 

(3.77) Remark The rank function ρ : Y → N is given by

ρ(λ) = λ1 + λ2 + ··· By noticing that

|{λ ∈ Par : ρ(λ) = n}| = p(n) = # partitions of the integer n the rank generating function of Y is

+∞ +∞ X Y 1 F (Y, q) = p(n)qn = 1 − qn n=0 n=0 (see problem sheet 4).

(3.78) Proposition Maximal chains [0ˆ, λ] in Y, where ρ(λ) = n, are in 1-1 correspon- dence with all standard Young tableaux of shape λ (SYTλ). (3.79) Remark Draw the corresponding Young diagram at each element in Young's lattice. Choose your element λ in the lattice. As you proceed from 0ˆ up to λ, in each step i, put i in the box that was added to the Young diagram from last step, e.g. 1 3 1 1 3 ∅ → 1 → → → 2 = λ 2 2 4 if we choose λ = 211 and our route is 0ˆ → 1 → 11 → 21 → 211. (Draw this!)

75 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

Proof. Let 0ˆ = y0 <· y1 <···· <· yn = λ be a maximal chain. Since yi+1 has exactly one more cell than yi and yi ⊂ yi+1, label the cell yi+1 − yi with i + 1. Do this for all 0 ≤ i < n. The resulting labeling of the Young diagram is a standard Young tableaux of shape λ. The inverse map is easy to describe. A consequence of this is the number of maximal chains in [0ˆ, λ] is f λ (calculated by the hook-length formula). Also the number of maximal chains [0ˆ, λ] for all λ where ρ(λ) = n, is equal to In, the number of involutions

2 {π ∈ Sn : π = id} 

(3.80) Denition The dominance order (Par(n), ≤) is such that if λ, µ ∈ Par(n) with λ = (λ1, λ2,...) and µ = (µ1, µ2,...) then we dene

λ ≤ µ ⇔ λ1 + ··· + λi ≤ µ1 + ··· + µi ∀i

3.11 Linear extensions

(3.81) Denition Let (P, ≤P ) be a poset with |P | = n.A linear extension of P is a bijective order preserving map

σ : P → {1, . . . , n} such that −1 −1 if σ (i)

The number of linear extensions of P is denoted e(P ).

(3.82) Example Consider P: c• •d @@ @@ a• •b

If σ = (σ(a), σ(b), σ(c), σ(d)) = (1, 2, 3, 4) then σ(P ) is 3• •4 and σ is a linear @@ @@ 1• •2 extension of P .

However if σ is chosen to be (σ(a), σ(b), σ(c), σ(d)) = (3, 2, 1, 4) then σ(P ) is 1• •4 @@ @@ 3• •2 which is not a linear extension.

All linear extensions of P :

3• •4 3• •4 4• •3 4• •3 4• •2 @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ 1• •2 2• •1 1• •2 2• •1 3• •1

σ=(1,2,3,4) σ=(2,1,3,4) σ=(1,2,4,3) σ=(2,1,4,3) σ=(3,1,4,2)

Thus e(P ) = 5. ♦

76 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

(3.83) Remark

P = ••···• e(P ) = n! | {z } n

•    •  .  P = . n e(P ) = 1  •   • 

(3.84) Proposition

e(P ) = # maximal chains in J(P )

Proof. Homework. 

(3.85) Denition If a poset P on elements {1, . . . , n} is such that i

(3.86) Denition If P is a natural poset on {1, . . . , n}, then the set of permutations σ−1 corresponding to linear extensions of P is denoted L(P ) and is called the Jordan- Hölder set of P .

(3.87) Example For P = 3• •4 , L(P ) = {1234, 2134, 1243, 2143, 2413}. @@ ♦ @@ 1• •2

3.12 Rank-selection

Let P be a nite graded poset of rank n with a 0ˆ and 1ˆ. Let ρ be the rank function of P .

(3.88) Denition Let S ⊆ {0, . . . , n} and PS = {x ∈ P : ρ(x) ∈ S}. PS is called the S-rank-selected subposet of P . Let α(P,S) = # maximal chains in PS. Since P has a 0ˆ and 1ˆ, the quantity α(P,S) can be restricted to S ⊆ {1, . . . , n − 1}.

Dene for S ⊆ {0, . . . , n}, X β(P,S) = (−1)|S|−|T |α(P,T ) . T ⊆S The Möbius inversion formula gives

X α(P,S) = β(P,T ) . T ⊆S

77 CHAPTER 3. PARTIALLY ORDERED SETS (POSETS)

(3.89) Proposition Let P be a nite poset and L = J(P ) with ρ(L) = n. For S ⊆ {1, . . . , n − 1}, β(L, S) = #{π ∈ L(P ) : Des(π) = S}

Proof. Suppose S = {a1, . . . , ak} ⊆ {1, . . . , n − 1}. The structure of J(P ) tells us that α(L, S) is the number of chains I1,...,Ik of order ideals of P such that |Ii| = ai for all i = 1, . . . , k. For such a chain

 arrange the elements of I1 in increasing order;  arrange the elements of I2 − I1 in increasing order; .  .  arrange the elements of P − Ik in increasing order.

This maps chains I ∈ LS → π ∈ L(P ) and this map is bijective. Also Des(π) ⊆ S.

If we dene γ(L, S) = {π ∈ L(P ) : Des(π) = S} then X α(L, S) = γ(L, S) T ⊆S By comparison, we have that γ(L, S) = β(L, S).  (3.90) Proposition

β(Bn,S) = #{π ∈ Sn : Des(π) ∈ Sn}

Proof. Let P be the n element antichain

P : ••···• ⇒ J(P ) = Bn | {z } n From the previous proposition, and using the fact that , the result follows. L(P ) = Sn 

78 Chapter 4

Other Things & Some Applications

4.1 Unimodality, Log-concavity & Real-rootedness

(4.1) Denition Let A = (a0, a1, . . . , an) be a sequence of positive real numbers. The sequence A is said to be:

 unimodal if a0 ≤ a1 ≤ · · · ≤ ad ≥ · · · ≥ an for some d ∈ N0; log-concave if 2 for all ;  ai+1 ≥ aiai+2 0 < i < n strictly log-concave if 2 for all .  ai+1 > aiai+1 0 < i < n (4.2) Remark

log a + log a a2 ≥ a a ⇔ log a ≥ i i+2 i+1 i i+2 i+1 2 (4.3) Example A = (1, 7, 10, 3, 2) is unimodal but not log-concave (32 6≥ 2 · 10).

A = (2, 5, 12, 15, 10, 4, 1) is unimodal & log-concave & strictly log-concave. ♦

+ n+1 (4.4) Proposition If A ∈ (R ) is log-concave, then it is unimodal.

Proof. If the sequence is not unimodal, then there exists 0 < r < n such that 2 is not log-concave. ar−1 > ar < ar+1 ⇒ ar < ar−1ar+1 ⇒ A

The contrapositive of this statement is the result.  (4.5) Lemma If the zeros of a polynomial p(x) (of degree n > 1) are all real and negative, then the zeros of p0(x) are all real and negative.

Proof. Suppose

n m1 mk p(x) = c0 + c1x + ... + cnx = a(x + r1) ··· (x + rk) , ri, ci, a ∈ R, mi ∈ N, ri > 0

0 Suppose also that 0 < ri < ··· < rk. The polynomial p (x) has degree n − 1. Since m m −1 0 (x + ri) i is a factor of p(x), we know (x + ri) i is a factor of p (x). From this 0 −r1,..., −rk are zeros of p (x) of multiplicities m1 −1, . . . , mk −1, respectively. Now, the

79 CHAPTER 4. OTHER THINGS & SOME APPLICATIONS

function p(x) is continuously dierentiable of R. If 1 ≤ i < k then p(−ri) = p(−ri+1) = 0. By Rolle's theorem, there exists ∗ such that 0 ∗ . Thus, there are ri ∈ ] − ri+1, −ri[ p (ri ) = 0 distinct numbers ∗ ∗, none equal to , that are zeros of 0 . k − 1 r1, . . . , rk {−r1,..., −rk} p (x) We have accounted for

(m1 − 1) + ··· + (mk − 1) + (k − 1) = m1 + ··· + mk − k + k − 1 = n − 1

0 0 zeros of p (x). Since deg(p (x)) = n − 1, all roots are real and negative.  (4.6) Lemma Let

n n−1 n f(x, y) = c0x + c1x y + ··· + cny be a polynomial whose zeros ( x ) are real. Let y

∂i ∂j g(x, y) = f(x, y) ∂xi ∂yj If g(x, y) 6= 0, then all zeros of g(x, y) are real.

Proof. Suppose f(x, y) has k distinct roots λ1, . . . , λk. Then

m1 mk f(x, y) = a(x + λ1y) ··· (x + λky) for a ∈ R, mi ∈ N. By repeated use of the previous lemma, all non-zero partial derivatives of f(x, y) will have real roots. 

n (4.7) Theorem Let p(x) = c0 + c1x + ... + cnx be a polynomial whose zeros are all real and negative. Then the sequence (c0, c1, . . . , cn) is strictly log-concave.

Proof. Since the zeros of p(x) are real and negative, the sequence of coecients is strictly m1 m n positive (expand a(x + r1) ··· (x + rk) k ). If p(x) = c0 + c1x + ... + cnx , let

n n−1 n f(x, y) = c0x + c1x y + ... + cny

Partially dierentiate f(x, y):

∂m ∂n−m−2 f(x, y) ∂xm ∂yn−m−2 We have ∂m f(x, y) = (n) c xn−m + (n − 1) c xn−m−1y + ··· + (m) c yn−m−2 ∂xm m 0 m 1 m n−m−2 Now do

∂n−m−2  ∂m  X f(x, y) = c (n − i) (i) xn−m−iy2−(n−m−i) ≡ g(x, y) ∂yn−m−2 ∂xm i m m i In the sum, i ∈ {n − m − 2, n − m − 1, n − m}. Thus

1  c c  g(x, y) = (m+1)!(n−m−1)! n−m (n − m)y2 + c 2xy + n−m−2 (m + 2)x2 2 m + 1 n−m−1 n − m − 1

80 CHAPTER 4. OTHER THINGS & SOME APPLICATIONS

Let n for all , then cj = j pj j 1 g(x, y) = n! p y2 + 2p xy + p x2 2 n−m n−m−1 n−m−2 According to the previous lemma, this polynomial has real roots, since it is nonzero. Thus the discriminant is ≥ 0, i.e.

2 (2pn−m−1) − 4(pn−mpn−m−2) ≥ 0

2 ⇒ pn−m−1 ≥ pn−mpn−m−2

2 m+2 n−m ⇒ cn−m−1 ≥ m+1 n−m−1 cn−mcn−m−2 > cn−mcn−m−2

Thus the sequence is strictly log-concave.  (4.8) Remark

{constants of neg. real rooted polynom.} ⊂ {strictly log-concave} ⊂ {log-concave} ⊂ {unimodal}

(4.9) Example Is n n strictly log-concave? Well { i }i=0 n n n p(x) = + x + ··· + xn = (1 + x)n 0 1 n which has the single negative root x = −1. By the last theorem, the answer is yes. ♦

(4.10) Proposition The sequence of Stirling numbers of the 2nd kind (S(n, 1),...,S(n, n)) is log-concave.

Proof. The generating function of these numbers is

n X k Bn(x) = S(n, k)x k=1 We know S(n, k) = S(n − 1, k − 1) + kS(n − 1, k) By dierentiating, we have

0 (4.1) Bn(x) = xBn−1(x) + xBn−1(x), n > 0,B0(x) = 1 i.e. 2 2 3 B1(x) = x, B2(x) = x + x ,B3(x) = x + 3x + x , ··· Multiply each side of (4.1) by ex

x x x 0 e Bn(x) = xe Bn−1(x) + xe Bn−1(x) d = x (exB (x)) dx n−1

81 CHAPTER 4. OTHER THINGS & SOME APPLICATIONS

x Let fn(x) = e Bn(x). Then 0 fn(x) = xfn−1(x)

We claim that all zeros of fn(x), of which there are n, are real, distinct and negative (except for x = 0). This is true for n = 1, n = 2. Assume true for f1(x), . . . , fn−1(x). x 0 since Bn−1(x) has n − 1 distinct zeros, then (e Bn−1(x)) has n − 2 distinct zeros that lie between the zeros of Bn−1(x). Multiplying by x gives another zero at x = 0. Finally, x x 0 since e Bn−1(x) → 0 as x → 0, there is another zero of (e Bn−1(x)) in ]−∞, r[ where r is the smallest root of Bn−1(x).

Thus fn(x) has n distinct real and negative (except at x = 0) roots/zeros. Hence, the sequence of coecients is log-concave. 

4.2 Transfer Matrix Method-Theory

(4.11) Denition A directed graph (digraph) D consists of vertices V , edges E and an orientation map φ, D = (V, E, φ). o v V = {v , . . . , v } •v2 • 4• 1 7 v7   /  E = {{v1, v2}, {v1, v3}, ··· , {v7, v7}}  v1 v3 ×  Given int n • •  •v {a, b} ∈ E, φ(a, b) = ( (a, b), (a, b)), o o 6   e.g. φ(v , v ) = (v , v )  1 2 2 1 v5• For every edge e = {v, v0} we dene int(e) = v and n(e) = v0.A walk Γ in D of length n is a sequence of edges (e1, . . . , en) such that n(ei) = int(ei+1) for all 1 ≤ i ≤ n. If n(en) = int(e1) then the walk is called closed.

(4.12) Denition Let w : E → R be a weight function on the edges of the digraph D = (V, E, φ). For any walk Γ = (e1, . . . , en) we dene

w(Γ) = w(e1)w(e2) ··· w(en) Dene X Aij(n) = w(Γ) Γ where the sum is over all walks Γ of lengths n in D with int(Γ) = vi and n(Γ) = vj. Dene

Aij(0) = δij

The adjencency matrix of D is the matrix X A = [Aij],Aij = w(e) e ∈ E

int(e) = vi

n(e) = vj

82 CHAPTER 4. OTHER THINGS & SOME APPLICATIONS

(4.13) Example o w(loop) = a •7v1 77 w(edge) = b C 7 77 Ó 77 v 7 v 2 • o 7• 3 ?

A11 = w(loop) = a; A12 = b; A13 = b

A21 = b; A22 = a; A23 = 0;

A31 = 0; A32 = b; A33 = a a b b   A = b a 0 0 b a ♦

n (4.14) Theorem (4.2.1.) For n ∈ N, the (i, j) entry of A is Aij(n). Proof. The (i, j) entry of An is

n X (A )ij = Aii1 Ai1i2 ··· Ain−1j where the sum is over all possible sequences (i1, . . . , in−1). The sum will equal to zero if there is no walk of length n from vi → vj. If an entry in the sum is non-zero, then the product equals the weight of the corresponding walk. Aii1 Ai1i2 ··· Ain−1j  (4.15) Denition From this,

n (A )ij = Aij(n) Dene the generating function

+∞ X n Fij(D, λ) = Aij(n)λ n=0

(All information about weighted walk from vi to vj.)

For a matrix T , let (T : j, i) be the matrix obtained by removing row j and column i of T . (4.16) Theorem (4.2.2.) If

+∞ X n Fij(D, λ) = Aij(n)λ n=0 then (−1)i+j det(I − λA : j, i) F (D, λ) = ij det(I − λA) In other words −1 Fij(D, λ) = ((I − λA) )ij

83 CHAPTER 4. OTHER THINGS & SOME APPLICATIONS

(4.17) Remark

deg Fij(D, λ) < n0 = multiplicity of the eigenvalue 0 of A

Proof. Obvious using simple linear algebra. Fij(D, λ) is the (i, j) entry of the matrix

+∞ X λnAn = (I − λA)−1 n=0 and then use expression for adj(I − λA)

If

cA(λ) = det(A − λI)

p n0 p−1 p = (−1) (αp−n0 λ + ··· + α1λ + λ ) is the characteristic polynomial of A, then

p−n0 det(I − λA) = αp−n0 λ + ··· + α1λ + 1 where n0 is the multiplicity of eigenvalue 0 of A. So,

deg(det(I − λA)) = p − n0, deg(det(I − λA : j, i)) ≤ p − 1 This gives

deg(det(I − λA : j, i)/ det(I − λA)) ≤ p − 1 − (p − n0) = n0 − 1 < n0 

(4.18) Example Let

f(n) = #{(a1, . . . , an): ai ∈ {1, 2, 3}, (ai, ai+1) ∈/ {(1, 1), (2, 3)}} Then

f(1) = |{(1), (2), (3)}| = 3 f(2) = |{(1, 2), (1, 3), (2, 1), (2, 2), (3, 1), (3, 2), (3, 3)}| = 7 f(3) = ... = 16

Let D be the directed graph on {1, 2, 3} with (i~,j) as an edge if j is allowed to follow i in the sequence. •1 C  Ó [ 2• o •3 ? For any edge e, let w(e) = 1. Adjacency matrix

0 1 1   A = 1 1 0 1 1 1

84 CHAPTER 4. OTHER THINGS & SOME APPLICATIONS

7 z }| { The sequence (1, 2, 2, 1, 3, 1, 3) is represented by the walk (1, 2)(2, 2)(2, 1)(1, 3)(3, 1)(1, 3) | {z } 6 edges The quantity we want is thus

f(n) = A11(n − 1) + A12(n − 1) + A13(n − 1) + ··· 3 3 X X n−1 = Aij(n − 1) = (A )ij i,j=1 i,j=1 Now (1 − λ)2 λ λ(1 − λ)  1 (I − λA)−1 = λ(1 − λ) 1 − λ − λ2 λ2  1 − 2λ − λ2 + λ3   λ λ(1 + λ) 1 − λ − λ2 and, e.g. the 1,1-entry is equal to (1 − λ)2 X X F (D, λ) = = A (n)λn = f (n + 1)λn 11 1 − 2λ − λ2 + λ3 11 11 n≥0 n≥0 More precisely

3 +∞ X 1 + λ − λ2 X F (D, λ) = = f(n + 1)λn ij 1 − 2λ − λ2 + λ3 i,j=1 n=0 and we have obtained the generating function of f(n + 1). The o.g.f. of f(n) is thus +∞ +∞ X X λ(1 + λ − λ2) 1 − λ f(n)λn = 1 + f(n + 1)λn+1 = 1 + = 1 − 2λ − λ2 + λ3 1 − 2λ − λ2 + λ3 n=0 n=0 ♦

If our attention is restricted to closed walks in D of length n, then let n CD(n) = A11(n) + ··· + App(n) = Tr(A ) (4.19) Theorem (4.2.3.) Let Q(λ) = det(I − λA). Then +∞ X −λQ0(λ) C (n)λn = D Q(λ) n=1

Proof. Let w1, . . . , wq be the non-zero eigenvalues of A. Then n n n CD(n) = Tr(A ) = w1 + ··· + wq So +∞ +∞ X X w1λ wqλ C (n)λn = (wn + ··· + wn)λn = + ··· + D 1 q 1 − w λ 1 − w λ n=1 n=1 1 q Since Q(λ) = (1 − w1λ) ··· (1 − wqλ), it is easy to see that

+∞ 0 X w1λ wqλ −λQ (λ) C (n)λn = + ··· + = D 1 − w λ 1 − w λ Q(λ) n=1 1 q 

85 CHAPTER 4. OTHER THINGS & SOME APPLICATIONS

4.3 Transfer Matrix Method  Applications

(4.20) Example Let f(n) bet the number of sequences (x1, . . . , xn) of length n that have elements in {a, b} and such that

(1) (xi, xi+1) 6= (a, a) ∀1 ≤ i < n (2) x1 = a, xn = b.

Let g(n) be the total number of sequences that satisfy (1). Let h(n) be the total number of sequences that satisfy (1) and (xn, x1) 6= (a, a).

Invoke the transfer matrix method:

/ digraph: a b  edge D • o • w( ) = 1, (v1, v2) = (a, b) Adjacency matrix: " # " # A11 A12 0 1 A = = A21 A22 1 1 Note " # 1 −λ I − λA = −λ 1 − λ

We have that

f(n) = A12(n − 1) Using theorem (4.16) (i.e. 4.2.2.)

+∞ X (−1)3(−λ) λ F (D, λ) = A (n)λn = = 12 12 1 − λ − λ2 1 − λ − λ2 n=0 i.e. +∞ X λ f(n + 1)λn = 1 − λ − λ2 n=0 Thus +∞ X  λ  λ2 + 1 − λ − λ2 1 − λ f(n)λn = λ + 1 = = 1 − λ − λ2 1 − λ − λ2 1 − λ − λ2 n=0

For g(n)  two ways to do this. First way:

g(n) = A11(n − 1) + A12(n − 1) + A21(n − 1) + A22(n − 1)

Since deg |I − λA| = 2 (quadratic in λ), we know

+∞ X P (λ) (A (n) + A (n) + A (n) + A (n))λn = 11 12 21 22 1 − λ − λ2 n=0 86 CHAPTER 4. OTHER THINGS & SOME APPLICATIONS where deg(P ) < 2. Let P (λ) = a + bλ. So

P (λ) = (a + bλ)(1 + (λ + λ2) + (λ + λ2)2 + ··· ) 1 − λ − λ2 = a + λ(a + b) + Oλ2 = 2 + 3λ + Oλ2 (get 2 and 3 by counting paths, see original sum) giving a = 2 and b = 1. Hence

+∞ X 2 + λ g(n + 1)λn = 1 − λ − λ2 n=0 i.e. +∞ X 1 + λ g(n)λn = 1 − λ − λ2 n=0 Second way: We have " # 1 1 − λ λ (I − λA)−1 = 1 − λ − λ2 λ 1 So

+∞ X 1 (A (n) + A (n) + A (n) + A (n))λn = ((1 − λ) + (λ) + (λ) + (1)) 11 12 21 22 1 − λ − λ2 n=0 2 + λ = 1 − λ − λ2 as before, giving +∞ X 1 + λ g(n)λn = 1 − λ − λ2 n=0

For h(n):

h(n) = A11(n) + A22(n)

(since sequences of length n satisfying (1) and (xn, x1) 6= (a, a) are isomorphic to se- quences of length n+1 satisfying (1) and x1 = xn  check the function that sets xn+1 = x1 [inverse: removes xn+1], it's a bijection because of (1)). Using theorem (4.19) (i.e. 4.2.3.):

CD(n) = A11(n) + A22(n) = h(n) thus +∞ X −λ(1 − λ − λ2)0 λ + 2λ2 C (n)λn = = D 1 − λ − λ2 1 − λ − λ2 n=1 ♦

87 CHAPTER 4. OTHER THINGS & SOME APPLICATIONS

(4.21) Example Dene

g(n) = #{(a1, . . . , an): ai ∈ {1, 2, 3}, (ai, ai+1) ∈/ {(1, 1), (2, 3)}, 1 ≤ i ≤ n} where an+1 = a1. Transfer (adjacency) matrix

0 1 1   A = 1 1 0 1 1 1

We have

g(n) = A11(n) + A22(n) + A33(n) = CD(n) and +∞ X −λQ0(λ 2λ + 2λ2 − 3λ3 g(n)λn = = = ... Q(λ) 1 − 2λ − λ2 + λ3 n=0 since

2 3 Q(λ) = det(I − λA) = 1 − 2λ − λ + λ ♦

(4.22) Example Let

f(n) = #{(a1, . . . , an): ai ∈ {1, 2, 3},

(ai, ai+1) 6= (1, 2), 1 ≤ i < n

(ai, ai+1, ai+2) ∈/ {(2, 1, 3), (2, 2, 2), (2, 3, 1), (3, 1, 3)}, 1 ≤ i < n − 1}}

To apply TMM, look at the digraph on V = {(1, 1), (1, 2),..., (3, 3)}. Insert a directed edge from (a, b) → (b, c) if we are allowed the sequence (a, b, c)

 / (1,3) •(1,1) • • (1,2)

O  (2,2) O (2,1)• o • × / •(2,3)  ?? ?? ?? ?? ? ??_ O  ??  ?? ?? ?? • • o •(3,3) (3,1) (3,2) o ? 88 CHAPTER 4. OTHER THINGS & SOME APPLICATIONS

Using the order {11, 12, 13, 21, 22, 23, 31, 32, 33}, the transfer matrix becomes

11 12 13 21 22 23 31 32 33  1 1         1 1 1       1    A =  1 1       1 1     1       1 1 1  1 1 1 Now Q(λ) = det(I − λA) and 9 X f(n) = Aij(n − 2) i,j=1 Then +∞ X P (λ) f(n)λn = Q(λ) n=0 where deg P < 8 and deg Q = 8. ♦

4.4 Transfer Matrix Method  Application to Ising Model

Consider the 1-dimensional Ising model (with periodic boundary conditions).

[ Fig.  Circle with spins . . . , sn, s1, s2, s3,..., si ∈ {−1, +1} (like magnets) ]

There are 2n possible spin congurations,

s = (s1, . . . , sn) For any such conguration we associate an energy, given by the Hamiltonian

H(s) = J(s1s2 + s2s3 + ··· + sns1) + h(s1 + ··· + sn) | internal{z energy } |due to external{z eld}

J and h are parameters of this `system', showing how much weight is given to a unit of each type of energy.

In statistical mechanics we are interested in systems that represent `something', solving them and comparing experimental and theoretical results. The central object of study is

89 CHAPTER 4. OTHER THINGS & SOME APPLICATIONS the partition function, X H(s) Zn(J, h, x) = x all possible s=(s1,...,sn) (In physics: −βc 1 .) From this we calculate the free energy x = e , β = T 1 f(J, h, x) = lim log Zn(J, h, x) n→+∞ n Every spin conguration can be represented as a walk of length n on the directed graph D(V, E, φ) where V = {v1, v2} = {+1, −1},

/  −1 +1 O • o •

(si, si+1) ∈ {(+1, +1), (+1, −1), (−1, +1), (−1, −1)}, 4 edges. To the edge (si, si+1) we associate the weight h J(sisi+1)+ (si+si+1) w(si, si+1) = x 2 Then

X H(s) X J(s1s2+s2s3+···+sns1)+h(s1+···+sn) Zn(J, h, x) = x = x all s s X J(s s )+ h (s +s ) J(s s )+ h (s +s ) J(s s )+ h (s +s ) = x 1 2 2 1 2 x 2 3 2 2 3 ··· x n 1 2 n 1 s X = w(s1, s2)w(s2, s3) ··· w(sn, s1) s = Tr(An) where A is the transfer matrix of D:

" # " J+h −J # A11 A12 x x A = = −J J−h A21 A22 x x

By theorem (4.19) (i.e. 4.2.3.) we have

+∞ X −λQ0(λ) Z (J, h, x)λn = n Q(λ) n=1 where Q(λ) = det(I − λA) = 1 − λ(xJ+h + xJ−h) + λ2x2J − x−2J Thus λ(xJ+h + xJ−h) − 2λ2x2J Z (J, h, x) = [λn] n 1 − λ(xJ+h + xJ−h) + λ2x2J − x−2J In order to calculate the fre energy, we must look at the eigenvalues of A

xJ+h − µ x−J 0 = det(A − µI) = −J J−h x x − µ = µ2 − 2µxJ cosh(h log x) + 2 sinh(2J log x)

90 CHAPTER 4. OTHER THINGS & SOME APPLICATIONS giving  q  µ = xJ cosh(h log x) ± sinh2(h log x) + x−4J

Let µ⊕ be the larger of the eigenvalues and µ be the smaller of the eigenvalues. By diagonalizing A, we have Tr(An) = (µ⊕)n + (µ )n Thus

1 1 ⊕ n n f(J, h, x) = lim log Zn(J, h, x) = lim log((µ ) + (µ ) ) n→+∞ n n→+∞ n 1 = lim log(µ⊕)n = log(µ⊕) n→+∞ n so   q  f(J, h, x) = log xJ cosh(h log x) + sinh2(h log x) + x−4J is the free energy of the 1-d Ising model.

91