124
18.212: Algebraic Combinatorics Lecturer: Professor Alexander Postnikov Notes by: Andrew Lin Spring 2019 1 February 6, 2019 The website for this class is http://math.mit.edu/18.212. Check it from time to time, because there will be some links to additional readings. Problem sets will also be posted there! There will be no exams in this class; 18.212 is graded entirely on four or five problem sets (one every two or three weeks). There are two conflicting goals for this class: everyone should understand everything, so we shouldn’t go too fast, but the class shouldn’t be too slow. Tell the professor if things are too fast or too slow! As the title suggests, this is a class on combinatorics. Combinatorics is the area of mathematics that studies discrete objects: graphs, permutations, and various diagrams. Basically, look at objects that we can count or list. These days, there are two main flavors: Stanley-style and Erdős-style. Stanley-style or enumerative / algebraic / geometric combinatorics deals with counting objects or their connections with algebra and geometry. On the other hand, Erdős-style is also called extremal / probabilistic combinatorics. This class will deal with the first half: we’ll get some of the other half in 18.218! Fact 1 In our class, we’ll often have A = B: some number of objects is equal to some other number. For example, the number of labeled trees on n vertices is n n-2 : this is called the Cayley formula. Meanwhile, Erdős-style combinatorics cares about things like “what is the probability a random graph is con- nected?”. We’ll get statements like A n log n. Notice that this is actually kind of related to the Cayley formula. No textbooks are required for this class. The recommended textbooks for this class are Richard Stanley’s Algebraic Combinatorics ; we can see the pdf file on his website. Richard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there. von Lint and Wilson’s A Course in Combinatorics. This is a very nice book but is a bit outdated. We’re going to start by doing something not from Richard Stanley’s Algebraic Combinatorics (which directly contradicts what Professor Postnikov just said). Fact 2 Catalan numbers are the professor’s favorite object in combinatorics. 1

18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

18.212: Algebraic Combinatorics

Lecturer: Professor Alexander PostnikovNotes by: Andrew Lin

Spring 2019

1 February 6, 2019

The website for this class is http://math.mit.edu/18.212. Check it from time to time, because there will be some

links to additional readings. Problem sets will also be posted there! There will be no exams in this class; 18.212 is

graded entirely on four or five problem sets (one every two or three weeks).

There are two conflicting goals for this class: everyone should understand everything, so we shouldn’t go too fast,

but the class shouldn’t be too slow. Tell the professor if things are too fast or too slow!

As the title suggests, this is a class on combinatorics. Combinatorics is the area of mathematics that studies

discrete objects: graphs, permutations, and various diagrams. Basically, look at objects that we can count or list.

These days, there are two main flavors: Stanley-style and Erdős-style. Stanley-style or enumerative / algebraic/ geometric combinatorics deals with counting objects or their connections with algebra and geometry. On the other

hand, Erdős-style is also called extremal / probabilistic combinatorics. This class will deal with the first half: we’ll

get some of the other half in 18.218!

Fact 1

In our class, we’ll often have A = B: some number of objects is equal to some other number. For example, the

number of labeled trees on n vertices is nn−2: this is called the Cayley formula.

Meanwhile, Erdős-style combinatorics cares about things like “what is the probability a random graph is con-

nected?”. We’ll get statements like A ∼ n log n. Notice that this is actually kind of related to the Cayley formula.

No textbooks are required for this class. The recommended textbooks for this class are

• Richard Stanley’s Algebraic Combinatorics; we can see the pdf file on his website.

• Richard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot

of material there.

• von Lint and Wilson’s A Course in Combinatorics. This is a very nice book but is a bit outdated.

We’re going to start by doing something not from Richard Stanley’s Algebraic Combinatorics (which directly

contradicts what Professor Postnikov just said).

Fact 2

Catalan numbers are the professor’s favorite object in combinatorics.

1

Page 2: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

On the other hand, Richard Stanley did compile hundreds of Catalan number interpretations separately from the

book so he has an excuse.

Definition 3

The nth Catalan number Cn is the number of sequences (ε1, ε2, · · · , ε2n) where all εi = ±i , there are n 1s and

n −1s, and the partial sum ε1 + · · ·+ εi ≥ 0 for all i .

Definition 4

Such sequences are often represented by Dyck paths, which contain up and down edges. Each up step corresponds

to a vector (1, 1), and each down step corresponds to (1,−1).

Lining up all of the vectors, we have a path from (0, 0) to (2n, 0), where the entire path is contained in the

upper-half plane (including the x-axis).

It is very easy to count this for small n:

n 0 1 2 3 4 5

Cn 1 1 2 5 14 42

There is an explicit formula that we will get to, but first, let’s ask the question: practically, what is mathematics?

If objects have no real-world applications, they might be meaningless, so here’s a real-world application of Catalan

numbers.

Example 5 (Drunk man problem)

This is not a problem that drunk people have (though drunk people have a lot of problems). A drunk person is on

a road, and he cannot tell left from right, so he has a 12 chance of going to the left by 1 and a 12 chance of going

to the right by 1. (This is the simplest example of a random walk.) However, he is at x = 1, and there is a cliff

starting at x = 0. What is the probability he survives?

As a sidenote, the probability in this class is very different from the probabilistic method in professor Yufei Zhao’s

class.

So what’s the probability he falls? He can make one step to the left, or one step to the right and two steps to the

left, and so on. But these kind of paths correspond to Dyck paths! The drunk guy will take 2n steps and then have a12 chance of taking that last 2n + 1th step, and those first 2n steps must stay at x > 0. So our probability is

P =1

2

∑n≥0

Cn22n.

As a slight generalization, we can assume the road is going at some slope, so he goes left and right with different

probabilities 1− p and p, respectively. This gives instead

P = p∑n≥0Cnp

n(1− p)n

and this is called a biased random walk: can we calculate this probability as well?

First of all, the solution to this problem doesn’t require Catalan numbers. Here’s an elementary proof:

Solution. As before, let’s say the cliff is at x = 0, and the guy starts at x = 1. Let’s say that there is a house where

the drunk guy lives at x = N, and he is safe if he reaches it before falling.

2

Page 3: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Let P (i , N) denote the probability that the man survives if he starts at position i and his house is at position N.

Our goal is actually to calculate the probability when N →∞. Notice that P (N,N) = 1 and P (0, N) = 0.

Fact 6

Professor Postnikov is not implying that guys are more likely to be drunk. They might be a girl.

Now for all 0 < i < N,

Pi =1

2(Pi−1 + Pi+1)

since from position i , there’s a one-half chance of going to i − 1 and a one-half change of going to i + 1. So we

actually have an arithmetic progression:

P (i , N) =i

N.

But at our initial problem, there is no house, so we can take the limit as N →∞, and this is obviously 0. So the guy

will always fall off the cliff.

Corollary 7

Don’t drink if you are at the edge of a cliff, especially if you’re under 21 years old.

On the other hand, we can also learn more about the generalized problem if we use Catalan numbers. Let’s start

by finding a way to express each Catalan number in terms of the previous ones:

Proposition 8 (Recurrence relation for the Catalan numbers)

For all n ≥ 1,

Cn =

n∑k=1

Ck−1Cn−k

and as a base case, C0 = 1.

Proof. We want to somehow break a Dyck path into smaller Dyck paths. Dyck paths are allowed to touch the x-axis

before (2n, 0): find the first place where this happens, and call it (2k, 0). (It will be an even x-coordinate because we

need an equal number of up and down moves.)

The part of the path from 0 to 2k is strictly above the x-axis, so it is an up move, a Dyck path on 2k − 2 moves

(Ck−1), and then a down move, followed by a Dyck path on 2n − 2k moves (Cn−k). This decomposition is unique,

because we specified that we took the first point of contact with the x-axis! Since k can be anything from 1 to n,

this gives our recurrence relation as desired.

We can actually write this as a generating function: given any sequence C0, C1, · · · , we can make a generating

function

f (x) = c0 + c1x + c2x2 + · · · .

We can ask questions of convergence or divergence, but in combinatorics we avoid these questions by treating these as

formal power series: infinite series with some coefficients, where we can add and multiply the series in a well-defined

way.

3

Page 4: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Proposition 9 (Generating function for the Catalan numbers)

The recurrence relation is equivalent to saying that

f (x) = xf (x)2 − 1.

Proof. To show this, we’ll extract coefficients on the left and right side and see that they are the same:

[xn]f (x) = Cn

(where this notation means the xn coefficient of f ), and

[xn]xf (x) = Cn−1

since we’re shifting our coefficients Ck−1xk−1 → Ck−1xk . Now

[xn]f (x)2 = Cn · C0 + Cn−1 · C1 + · · ·+ C0 · Cn

by expanding out our coefficients, and

[xn]xf (x)2 = Cn−1 · C0 + Cn−2 · C1 + · · ·+ C0 · Cn−1 = Cn

by our recurrence relation, and finally we just check our constant term (which is 1 on both sides). We’re done!

Finally, how do we solve our functional equation f (x) = xf (x)2 + 1? We solve as a quadratic in f ! We find, by

the quadratic formula, that

xf 2 − f + 1 = 0 =⇒ f =1±√1− 4x2x

.

There’s some ambiguity about plus or minus, but f (x) is a power series with constant term 1, so f (x) can’t diverge.

Thus, we need to make sure the numerator is 0 at x = 0 as well, and we have our final generating function

f (x) =1−√1− 4x2x

.

2 February 8, 2019Quick review: last time we defined the Catalan numbers and bijected them to Dyck paths. Next, we discovered a

recurrence relation for these Catalan numbers, and from that, we found our generating function

f (x) =1−√1− 4x2x

.

Let’s do an application of this generating function idea to the biased random walk problem. Remember that we

are at the edge of a cliff, and we have a probability p of walking to the right and 1− p of walking to the left. We start

at the very edge.

4

Page 5: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Proposition 10

The probability that the man falls is

(1− p)f (p(1− p)) =

1, p ≤12

1−pp , p >

12

.

Fact 11

If you’re going to drink at the edge of a cliff, make sure it slopes down to the right.

We’ll start with a fact that many of us probably know well:

Proposition 12 (Binomial Theorem)

For a real number y and nonnegative integer a,

(1 + y)a = 1 +

(a

1

)y +

(a

2

)y2 +

(a

3

)y3 + · · · .

This is actually true for any value of a at all! So Pascal’s triangle is part of the picture, but it doesn’t tell us the

whole story. We just need to define (for a nonnegative integer k)(a

k

)≡a(a − 1)(a − 2) · · · (a − k + 1)

k!.

This follows by writing out a Taylor expansion of the left hand side: the a(a − 1)(a − 2) · · · comes from the power

rule.

So we can apply this to our generating function by setting y = −4x, a = 12 : we can ignore the constant term, and

for all n ≥ 1,

f (x) =1− (1− 4x)−1/2

2x=⇒ [xn]f (x) = −

1

2[xn+1](1− 4x)1/2

which is (by the binomial theorem)

[xn]f (x) = −1

2

(1/2

n + 1

)(−4)n+1

and after expansion, this finally gives us a nice formula:

Theorem 13 (Closed form for the Catalan numbers)

The nth Catalan number is

Cn =

(2nn

)n + 1

.

But this is a very nice expression: is there a combinatorial proof instead?

Proof by reflection principle. Recall that Cn counts the number of Dyck paths that are above the x-axis from (0, 0)

to (2n, 0).

First of all, if we remove the “above the x-axis” condition, we just want the number of paths that have n ups and

n downs: this is just(2nn

). We now want to remove all paths that were overcounted: how many non-Dyck paths are

there?

5

Page 6: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Each of these paths must intersect the line y = −1 at least once. Pick the first intersection, and take the portion

of the path from that intersection to the end (2n, 0). Reflect it over y = −1, and now the endpoint of our path is

(2n,−2).This new path has n− 1 up steps and n+ 1 down steps, and such paths are in bijection with the non-Dyck paths!

This is because we can find the first intersection with y = −1 and do the reflection again. Since there are(2nn−1)

such

paths, the number of Dyck paths is

Cn =

(2n

n

)−(2n

n − 1

)=

1

n + 1

(2n

n

).

But as a combinatorialist, professor Postnikov doesn’t like subtraction. Here’s a proof that doesn’t require sub-

traction!

Proof by necklaces. Start with the binomial coefficient(2n+1n

), which is the number of sequences ε1, · · · , ε2n+1 with

n +1s and n + 1 -1s.

For example, for n = 2, consider the sequence (+,−,−,+,−). Do a cyclic shift of the sequence: move the first

term to the end to get (−,−,+,−,+). Keep doing this: we get (−,+,−,+,−), (+,−,+,−,−), and (−,+,−,−,+).In general, there are 2n + 1 cyclic shifts.

So we can arrange these on a necklace (as black and white beads). The necklace has n +s and n+ 1 -s, and each

of the cyclic shifts corresponds to cutting the necklace at one spot.

Claim 14. All cyclic shifts are different.

This is left as an exercise! The idea is that if two cyclic shifts were the same, we’d have subgroups that are

identical, which is bad because the difference in the number of +s and -s is 1.

So this means the number of total necklaces that exists is(2n+1n

)2n + 1

.

Claim 15. For each necklace, there is a unique sequence (ε1, ε2, · · · , ε2n+1) among all 2n+1 ways such that ε1, · · · , ε2nform a Catalan sequence and ε2n+1 = −1.

This was also left as an exercise! The idea is to find the “lowest point” on the Dyck path.

Once that’s resolved, notice that the number of Catalan sequences is therefore also equal to(2n+1n

)2n + 1

=1

n + 1

(2n

n

),

as desired.

This is a very good proof, because we’re actually doing some kind of natural division: the cyclic shifts explain where

the binomial coefficient is reduced.

A few more things about Catalan numbers: we’ll find that they appear everywhere!

Fact 16

Cn is the number of triangulations of an n + 2-gon.

For example, given a hexagon, there are C4 = 14 ways to cut it into 4 triangles. (There are 6 of them where all

three diagonals drawn come from one vertex, 6 in a zig-zag pattern, and 2 by drawing an equilateral triangle.)

6

Page 7: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Fact 17

Cn is also the number of valid parenthesizations of n + 1 letters.

For n = 4, we want to put some parentheses in the expression

a b c d e.

One way is ((a(bc))(de)).

Fact 18

Finally, Cn is the number of plane binary trees with n non-leaf vertices and n + 1 leaves.

Basically, start with a root, and repeatedly take a leaf and draw a left and right child for it. We can show that the

number of leaves and non-leaves will always differ by 1.

Proposition 19

There’s a pretty simple bijection between all three of these examples!

Proof. Starting with an n+2-gon, the binary tree will be the dual graph to the triangulation: pick one of the sides of

our polygon to start constructing our tree. Non-leaf vertices will correspond to triangles, and the triangle starting to

the edge is our root. This means we can convert any triangulation to a tree and vice versa.

Then we can take our binary tree and use “common neighbor” as a set of parentheses, where we take leaves from

left to right! This finishes the bijection between trees and parenthesizations.

But the bijection to Dyck paths is less obvious; this will be an exercise!

3 February 11, 2019As MIT students, we probably know a lot about computer science.

Fact 20

The Bible of computer science is “The Art of Computer Programming” by Knuth, and a lot of the material of this

class comes from it.

Definition 21

A queue is a data structure that is first in first out, while a stack is last in first out.

A queue contains one or several entries, and it’s like a line: if you enter the line first, you will exit first. Meanwhile,

a stack is like a pile of papers. Main idea: we can use these to sort permutations, and Catalan numbers will appear

again!

Proposition 22

The number of queue-sortable permutations of (1, 2, · · · , n) is equal to Cn.

What does it mean to be queue-sortable?

7

Page 8: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Example 23

For n = 4, (2, 4, 1, 3) is queue-sortable. Put 2, then 4 in the queue, then put 1 in our list directly, take 2 out of

the queue, put 3 directly, and then take 4 out of the queue.

But an example of something not queue-sortable is (3, 2, 1). We would have to put 3 in the queue and then 2, and

that’s bad because 3 comes out first.

Proposition 24

The number of stack-sortable permutations of (1, 2, · · · , n) is also equal to Cn.

For example, (4, 1, 3, 2) is stack-sortable, since we put 4 in the stack, put 1 in the list directly, then put 3 and 2

in the stack and pop everything back out. But (2, 3, 1) is not stack-sortable.

The idea of sortability is related to the concept in combinatorics of pattern avoidance.

Definition 25

Given a permutation w = (w1, w2, · · · , wn) of size n, where w ∈ Sn, the symmetric group, and a permutation

π = π1, π2, · · · , πk of size k ≤ n, we say that w contains pattern π if there exists a not-necessarily-consecutive

set (subsequence) of entries wi1 , wi2 , · · · , wik , whose entries are in the same relative order as π. Meanwhile, w is

π-avoiding if it does not contain pattern π.

For example, let w = (3, 5, 2, 4, 1, 6). If π = (2, 1, 3), then w does contain π.

Proposition 26

Queue-sortable permutations are exactly those permutations that are 321-avoiding. Meanwhile, stack-sortable

permutations are those that are 231-avoiding. Finally, for any pattern π of size 3, the number of π-avoiding

permutations is Cn.

This is left as an exercise! By the way, we will not be required to solve all problems in a problem set, so some will

be easier and some will be harder.

Time to move to the next topic! We’re going to talk about partitions, Young diagrams, and Young tableaux.

Fact 27

Since the word “tableau” is French, we add an “x” to the end to make it plural.

Definition 28

A partition of n is a list of integers

λ = (λ1, · · · , λe)

such that n = λ1 + · · ·+ λe , the λis are weakly decreasing, and all λi are positive integers.

We’re talking about partitions, not compositions, so order doesn’t matter. It’s just by convention that people

write them this way!

8

Page 9: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Example 29

Since 4 = 1 + 1 + 1 + 1 = 2 + 1 + 1 = 2 + 2 = 3 + 1 = 4, there are 5 partitions of 4.

Definition 30

A Young diagram is a shape where there are rows of λ1, λ2, · · · boxes that are left-justified. A similar term,

Ferrers shapes, refers to similar diagrams with dots instead of boxes.

Here’s what the Young diagrams look like for the partitions of 4:

, , , , .

Definition 31

A Standard Young Tableau (SYT) is a way to fill in the boxes of a Young diagram with numbers 1, 2, · · · , n(without repetition) such that the numbers are increasing across rows and down the columns.

For example, if λ = (4, 2, 2, 1), our tableau looks like . By abuse of notation, we’ll use λ for the Young

diagrams as well, and here’s an example of a Young diagram:

1 3 4 7

2 6

5 9

8

Definition 32

Let f λ be the number of standard Young tableaux of shape λ.

Lemma 33

For λ = (n, n), the number of standard Young tableau is

f (n,n) = Cn.

Proof. Given a Standard Young Tableaux, construct a sequence ε1, · · · , ε2n such that

εi =

+ if i is in the first row

− if it is in the second row.

9

Page 10: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

These are exactly the sequences that correspond to Dyck paths! For example, the following Young tableau corresponds

to the Dyck path (+,+,−,+,−,−,+,+,−,−):

1 2 4 7 8

3 5 6 9 10

Any Young tableau will correspond to a path, since we always have at least as many integers in the top row as the

bottom, and any path will correspond to a Young tableau: just write it out!

So we have a nice formula for f (n,n): we can think of these Young tableaux as an extension of the Catalan numbers.

Is there a nice formula for f in general?

Theorem 34 (Hook Length Formula: Frame, Robinson, Thrall)

The number of standard Young tableaux for a partition λ is

f λ =n!∏

x∈λ h(x)

where h(x) are the hook lengths; that is, the number of squares in a hook that goes to the right and down from

square x . The arm is the length of the horizontal component not including x , and the leg is the length of the

vertical component not including x .

For example, this hook has length 6, arm length 2, and leg length 3: x

Example 35

Take the partition λ = (3, 2), so the Young diagram looks like .

The possible Young tableaux are

1 2 3

4 5,1 2 4

3 5,1 2 5

3 4,1 3 4

2 5,1 3 5

2 4.

Meanwhile, here are the hook lengths for each square in the tableau:

4 3 1

2 1

By HLF, the number of possible standard Young tableaux is indeed

f λ =5!

4 · 3 · 1 · 2 · 1 = 5

as expected. There are many proofs of the Hook Length Formula, and it initially comes from representation theory.

However, now there is a probabilistic proof using random walks, which we will cover later!

10

Page 11: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

4 February 13, 2019A few people asked about the problem set. It will be assigned sometime in the near future, and it’ll probably due

around the end of February or beginning of March.

Remember that we defined numbers f λ to be the number of standard Young tableaux of shape λ. These come

from the symmetric group, but don’t worry about that yet. The magic is the Hook length formula: f λ has a closed

form! Turns out there are some other cool facts along this path.

Proposition 36 (Frobenius-Young identity)

For an integer n, ∑λ:|λ|=n

(f λ)2 = n!.

This also comes from representation theory!

Example 37

If we take n = 4, the Young tableaux are

, , , , .

The number of ways to fill in the Young tableaux are 1, 3, 2, 3, 1 respectively, and indeed

12 + 32 + 22 + 32 + 12 = 24 = 4!.

How can we interpret this identity? The right hand side of the equation is the number of permutations in Sn (on n

elements). Meanwhile, the left hand side counts pairs of Young tableaux p, q, such that p and q are both SYTs of the

same shape λ. Is there a nice bijection that we can set up between the two?

Here’s the Schensted correspondence from 1961, which was generalized later by Knuth to the Robinson-Schensted-Knuth correspondence (which is about semi-standard Young tableaux)! See papers on the course webpage.

This is a pretty central construction in algebraic combinatorics!

The Schensted’s insertion algorithm. Given a standard Young tableaux T filled with positive integers in S (for example

1, 3, 7), let’s say we want to insert a positive integer x .

Definition 38

Let T ← x be the SYT with an extra box added to T , given by the following procedure:

1. Initialize x1 = x, i = 1.

2. If xi is greater than all entries in the ith row of T , then add a new box at the end of the ith row filled with

xi and stop.

3. Otherwise, find the smallest entry y in the ith row greater than xi . Replace y by xi , increment i by one, and

go back to step 2.

11

Page 12: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

The idea is that we insert x and bump another entry x2 down to the next row. Then x2 will be inserted and bump

something else, and so on.

So now given w ∈ Sn, let’s construct a pair (P,Q) of Young tableux. P is called the insertion tableau, and Q is

the recording tableau.

To construct P , start with the empty tableau and add w1, w2, · · · , wn one at a time, in that order, using the

definition above. Meanwhile, to construct Q, i goes to the box that was added at the ith step of constructing P (we

record which box is added).

Example 39

Take the permutation w = (3, 5, 2, 4, 7, 1, 6).

After we insert 3 and 5, we get

P0 = ∅ =⇒ P1 =3 =⇒ P2 =

3 5 .

Trying to insert 2 kicks 3 out into the next row:

P3 =2 5

3

Now 4 bumps 5 to get

P4 =2 4

3 5,

and then adding 7, 1, 6 give

P5 =2 4 7

3 5, P6 =

1 4 7

2 5

3

, P7 = P =1 4 6

2 5 7

3

.

Now it is easy to see the Q-tableau: when were the boxes created?

Q = 1 2 5

3 4 7

6

.

Theorem 40

This construction w → (P,Q) is actually a bijection between the symmetric group Sn and the set of all pairs of

Young tableux with identical shapes and n boxes!

Proof. To show a bijection, we want to say that given a pair P and Q, we can reconstruct the permutation. Here’s

the reverse procedure:

P = 1 4 6

2 5 7

3

, Q = 1 2 5

3 4 7

6

.

The position of the 7 in Q tells us that that box was added last, so the 7 came from the first row. Which entry

bumped 7? It must have been 6, the maximal entry of the previous row smaller than 7. So 6 was just added, and that

12

Page 13: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

means w ended with 6. Now we have

P ′ = 1 4 7

2 5

3

, Q′ = 1 2 5

3 4

6

.

Now keep repeating: the bottom left corner has the next maximal entry of Q, so 3 was bumped last step. It must

have been bumped from 2, and that must have been bumped from 1, so w ’s second-to-last entry is 1, and so on.

Continuing this procedure, we can recover w ! So given any pair of tableaux, we can uniquely reconstruct w , showing

the bijection.

This correspondence has other special applications as well! The reason was to study increasing and decreasing

subsequences of permutations.

Definition 41

Given a permutation w that corresponds to a pair (P,Q) under the Schensted correspondence, the shape λ of P

(and Q) is called the Schensted shape of w .

The first entry λ1, which is the number of boxes in λ, has a special significance:

Theorem 42 (Schensted)

The length of the first row of λ is the length of the longest increasing subsequence in w . Meanwhile, as a dual

statement, the length of the first column of λ is the length of the longest decreasing subsequence in w !

For example, the first row has 3 boxes in the example above, so the longest increasing subsequence has length 3.

Similarly, the first column has 3 boxes, so the longest decreasing subsequence also has length 3.

We’ll wait until next lecture to do this proof.

For now, recall that we proposed previously the following fact:

Corollary 43

The number of 123-avoiding permutations in Sn is equal to Cn.

Proof. A permutation w is 123-avoiding if and only if the length of the longest increasing subsequence is at most 2.

Thus, Schensted correspondence sends this to a pair of tableaux with at most 2 columns; both P and Q have n boxes.

We want to biject this to a single tableau of shape (2, 2, · · · , 2), since we already know that there are Cn ways to

arrange that (biject to Dyck paths)!

Rotate Q by 180 degrees and stick it in place with P , except replace any entry k with (2n+ 1)− k! For example,

1 3

2 4

5

+ 1 2

3 5

4

= 1 3

2 4

5 7

6 8

9 10

Finally, here’s a generalization of Schensted. We have an interpretation of λ1, but we can figure out the whole

shape just by looking at the permutation w !

13

Page 14: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Theorem 44 (Green)

λ1 + λ2 is the maximal subsequence that can be covered by two increasing subsequences, λ1 + λ2 + λ3 is the

maximal subsequence covered by three subsequences, and so on! The statement also holds for columns and

decreasing subsequences.

5 February 15, 2019

Recall the Schensted correspondence between permutations w ∈ Sn and pairs of Young tableaux (P,Q): for example,

we found that w = (3, 5, 2, 4, 7, 1, 6) corresponds to

P = 1 4 6

2 5 7

3

, Q = 1 2 5

3 4 7

6

.

The process we took to get to P is

3 → 3 5 → 2 5

3→ 2 4

3 5→ 2 4 7

3 5→ 1 4 7

2 5

3

→ P.

According to Schensted’s theorem, the shape λ = (3, 3, 1) tells how many boxes are in each row, and λ1, the number

of boxes in the first row, is the size of the longest increasing subsequence in w . Similarly, the shape λ′ = (3, 2, 2) tells

us how many boxes are in each column, and λ′1, the number of boxes in the first column, is the size of the longest

decreasing subseqence in w .

We’re going to prove the first half of this (increasing subsequence) and leave the other half as an exercise!

Definition 45

The jth basic subsequence in a permutation w , where 1 ≤ j ≤ λ1, consists of all entries of w that were originally

inserted in the jth row.

For example, we have 3 basic subsequences for the example above. For B1, note that we inserted 3, 2, and 1, so

B1 = (3, 2, 1). Similarly, B2 = (5, 4), and B3 = (7, 6).

Lemma 46

Each Bj is a decreasing sequence.

Proof. By construction, if something bumps N, only smaller numbers can do this. So any number after N must be

smaller.

Lemma 47

For all j ≥ 2, given any x ∈ Bj , we can find y ∈ Bj−1 such that y < x and y is located to the left of x in the

permutation w .

Proof. At the moment of insertion of x , take y to be the entry that is located to the left of x . It will be less than x ,

and it was already inserted, so it is appears before x in the permutation.

14

Page 15: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

So now it’s time to prove the Schensted theorem (part 1). λ1 is the number of basic subsequences by definition.

Note that given any increasing subsequence x1 < x2 < · · · < xr , we can only have at most 1 entry from each Bj . So

this means r ≤ λ1. To construct an example of the equality case, pick the last basic subsequence Bλ1 , and pick any

xλ1 ∈ Bλ1 . By lemma 2, and we get an xλ1−1 ∈ Bλ1−1, and so on. Eventually we’ll be done and have an increasing

subsequence of length λ1!

For the rest of today, we’re going to prove the Hook Length Formula. Recall the theorem:

Theorem 48 (Hook Length Formula)

The number of ways to fill out a standard Young tableau with |λ| = n is

f λ =n!

H(λ)=

n!∏x h(x)

where h(x) is the “hook length” of x . For example, in the below diagram, the hook length h(x) = 6.

x

The original proof was pretty complicated, and it follows from some other formulas. But later, simpler proofs were

found, and we’re going to use a random process!

Hook walk proof by Greene, Nijenhuis, Wilf (1979). There is a recurrence relation for the number of Standard Young

Tableau. Given a tableau with n boxes, n must appear in one of the bottom-right corner boxes, and removing this

corner, we get a standard Young tableau of size n − 1. For instance, look at the following:

O

O

O

Since the O’s are the spots that the largest number can be in,

f λ = f 4441 + f 5431 + f 544.

So we’ll try to prove the theorem by induction:

f λ =∑

v corner of λ

f λ−v .

Base case: it’s easy to prove this for n = 0 or 1.

Inductive step: Now we need to show that the same recurrence relation holds for the expression on the right hand

side! In other words, we want to show that

n!∏h(λ)

=∑

v corner of x

(n − 1)!H(λ− v) .

This is the same as wanting to show that (dividing through by the left hand side)

1 =∑

v corner

1

n

H(λ)

H(λ− v) .

15

Page 16: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

We have a 1 on the left side, and we have a bunch of nonnegative integers on the right side. So we can think of this

as a probability distribution! We want to construct a random process so that these are probabilities.

Pick any box of λ uniformly at random; call it u. At each step, we can jump from u to any other square in the

hook of u with equal probability. Repeat this process repeatedly, and stop once we reach a corner v .

Define p(v) to be the probability that a hook-walk does end at corner v . We claim that the probability p(v) =1nH(λ)H(λ−v) , which means we would be done!

Why is this? Denote P (u, v) to be the probability that a hook walk (u, u′, u′′, · · · , v) starting at box u ends at

corner v . This is just summing over all hook walks:

P (u, v) =∑

u→u′→···→vP (this hook walk) =

∑u→u′→···→v

(1

h(u)− 1 ·1

h(u′)− 1 · · ·).

Here’s the key observation: when we fix v , the whole hook-walk stays within the rectangle between the top-left corner

and v . Whenever we have a rectangle with corners a, b, c, d (a in the top left and d a corner), h(a)+h(d) = h(b)+h(c),

and similarly

(h(a)− 1) + (h(d)− 1) = (h(b)− 1) + (h(c)− 1).

If d is a corner, though, h(d) − 1 = 0, so this simplifies very nicely! The idea is that each hook walk comes with a

kind of weight 1h(u)−1) , and we have a nice additive identity with inverse weights.

So now consider a rectangular grid of length k+1 by `+1. Let’s say the weights of the last row are 1x1, 1x2 , · · · ,

1xk, B,

and the weights in the last column are 1y1, 1y2 , · · · ,

1y`, B.

Proposition 49

So now if we sum the weights of lattice paths from A to B, the sum of weights is

1

x1x2 · · · xky1 · · · y`.

For example, for a 2 by 2 grid, if the weights are 1x1+y1

, 1y1 ,1x1

, and 1, then the total weights are

1

x1 + y1·1

y1+

1

x1 + y1·1

x1=1

x1y1.

This is an exercise, and we’ll show next lecture that this leads to a proof of the Hook Length Formula!

6 February 19, 2019Let’s start by finishing the proof of the Hook Length formula: recall that we had variables x1, · · · , xk , · · · , y1, y`, and

we said that given a k +1 by `+1 grid or graph G such that every vertex has a weight w(v) with the following rules:

• The bottom row has weights 1x1, 1x2 , · · · ,

1xk, 1.

• The right column has weights 1y1, 1y2 , · · · ,

1y`, 1.

• Any other grid square in the ith column and jth row has weight 1xi+yj

, where i ≤ k and j ≤ `.

We wanted to consider all lattice paths from A (top left corner) to B (bottom right corner), where each path P

has a weight

w(P ) =∏v∈Pw(v).

16

Page 17: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Lemma 50

The sum of all lattice paths ∑P :A→B

w(P ) =1

x1x2 · · · xky1y2 · · · y`.

Proof. We induct on k + `. Base case is k + ` = 2: clearly the vertices have weights 1x1+y1

, 1y1 ,1x1, 1, and

1

x1 + y1·1

x1+

1

x1 + y1·1

y1=1

x1y1.

Now any path either goes down from A (to A′) or right from A (to A′′). Thus the sum over all paths of w(P ) is

1

x1 + y1

( ∑P ′:A′→B

w(P ′) +∑

P ′′:A′′→Bw(P ′′)

)

and by the inductive hypothesis, this is just

1

x1 + y1

(1

x1x2 · · · xky2 · · · y`+

1

x2 · · · xky1y2 · · · y`

)which is clearly just

1

x2 · · · xky2 · · · y`·1

x1 + y1

(1

x1+1

y1

)=

1

x1 · · · xky1 · · · y`.

So remember that in our hook-walks, we’re allowed to jump over rows and columns, so this is not exactly what we

need in our proof. Recall the exact definition: we start at any vertex in our grid graph, and each time we jump to a

vertex that is either to the right of our below our current spot, but we always end at B.

Lemma 51

When we have hook-walks P ,∑P hook-walk

w(P ) =

(1 +

1

x1

)(1 +

1

x2

)· · ·(1 +

1

xk

)(1 +

1

y1

)· · ·(1 +

1

y`

).

Proof. Expand the product! Each term corresponds to a subgrid: we skip certain rows and columns if we use a 1

instead of a 1xi

or 1yj . Recall that we do not need to start at the top left corner, so we do not need to necessarily

include 1x1

and 1y1

. Also, the factor of 1 · 1 · · · · · 1 just starts at B and finishes immediately.

Now, remember that we defined these hook walks on standard Young tableaux. We start at any box, and we keep

traveling to the right and down (skipping squares if we want) until we hit a corner box: a square from which we cannot

move down or right.

Remember that we denote P (u, v) to be the probability that we end up at corner box v if we start at u. Any path

that ends up at v stays in the rectangular grid between the top left corner and v . This can be written as

=∑p:u→v

1

h(u)− 11

h(u′)− 11

h(u′′)− 1 · · · .

Remember that these weights work out the same way as our grid! So we can apply lemma 2. Fix a corner box v :

17

Page 18: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

call the set of boxes above or to the left of v the “cohook at v.” Then∑u

P (u, v) =∏

t box in cohook v

(1 +

1

h(t)− 1

)=∏t

h(t)

h(t)− 1

But we claim this is easily simplified. If we remove v from the hook-length, what happens to the product of hook

lengths H(λ)? Nothing, except all hook lengths in the co-hook decrease by one! So this is just equal to∑u

P (u, v) =H(λ)

H(λ− v) .

So it’s time for the punchline: for any fixed box u of λ,∑v corner

P (u, v) = 1,

since any hook walk ends at some corner. So now adding over all u ∈ λ, v corner boxes,∑u∈λ

∑v corner

P (u, v) = n,

since there are n boxes. But now switch the order of summation:∑v corner

∑u∈λP (u, v) = n,

and therefore by a calculation above, ∑v corner

H(λ)

H(λ− v) = n.

But now we can multiply both sides by (n − 1)! and rearrange:

n!

H(λ)=

∑v corner

(n − 1)!H(λ− v)

which is exactly the recurrence relation we were trying to prove, and we’re done!

Apparently we can think of everything we’re doing as a “linear extension of a poset,” so now we’re changing topics!

Definition 52

A poset (partially ordered set) P is a set of objects with a binary operation ≤, satisfying the following axioms:

• a ≤ a for all a ∈ P.

• If a ≤ b, b ≤ a, then a = b.

• If a ≤ b, b ≤ c , then a ≤ c .

Note that it is not necessary for either a ≤ b or b ≤ a to be true. We also define a < b if a ≤ b and a 6= b.

Definition 53

a is covered by b if a < b and there does not exist c such that a < c < b. We denote this as a l b.

If we’re talking about finite posets, this is all we need: all we need is which elements cover each ones. But infinite

posets don’t quite work: there are no covering relations for the real numbers, for example.

18

Page 19: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Definition 54

The Hasse diagram is the graph formed by covering relations: larger vertices are on the top and smaller vertices

are on the bottom.

For example, in the diagram here, a l b, a l c, b l d, c l d, c l e.

b c

d e

a

Definition 55

A linear extension of a finite poset P with n elements is a bijective map f : P → {1, 2, · · · , n} such that

a ≤ b =⇒ f (a) ≤ f (b).

For example, here’s a linear extension for the poset above:

3 2

5 4

1

Definition 56

Define ext(P) to be the number of linear extensions of P.

Turns out we can convert Young tableaux into linear extensions! We can replace boxes with dots and move the

top left corner to the bottom. So rotate by 135◦ counterclockwise, and this means SYTs become linear extensions.

But we have an expression for the number of SYTs: does one exist for posets? The answer is no, but here is an

example of a hook-length-type formula!

Theorem 57 (Baby hook length formula for rooted trees)

Given a rooted tree T with n nodes, we can correspond it to a poset PT . Then

ext(PT ) =n!∏

a∈T h(a),

where h(a) is the number of nodes including and above a vertex a.

19

Page 20: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

This is an exercise, but it’s easier to prove than the other hook length formula!

7 February 20, 2019

Recall that we discussed Hasse diagrams of posets, and we found that the number of such diagrams (corresponding

to linear extensions) for rooted trees is

ext(T ) =n!∏

a∈T h(a),

where h(a) is the number of nodes in or downstream of a.

Now let’s talk about the concept of “shifted Young diagrams.” Instead of left-justifying, we can have diagrams like

which corresponds to a partition λ = (10, 9, 5, 3, 2). This now gives the number of ways to partition a number n into

distinct parts! So now we can fill this in the same way: numbers still increase by row and by column:

1 2 4 5

3 6 8

7

Theorem 58 (Thrall, 1952)

The number of shifted Young tableaux with shifted shape λ with n boxes is similarly

n!∏a∈λ h(a)

where h(a), the hook length, now includes a “broken leg.”

For example, here’s a hook with a broken leg:

x

Basically, if the hook reaches the left staircase (not the bottom or the right part), it bends over and continues.

The proof of this is similar with the idea of a “hook walk,” and it was given by Sagan in 1980.

So the point is that there is a nice number for the number of linear extensions in some posets.

It’s time to move on to q-analogs! This stands for both a variable q and for “quantum.” The idea is that we can

have classical objects and quantum objects, and as we take q = 1, we get the classical limit. For example, Planck’s

constant gives q = e~, and as we take ~ → 0, we basically get q = 1.

What are some other examples of this?

20

Page 21: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Classical Quantum

n [n]q ≡ [n] = 1 + q + q2 + · · ·+ qn−1 = 1−qn1−q

n! = 1 · 2 · · · · n [n]q! ≡ [n]! = [1] · [2] · · · · · [n]

So let’s look a bit more carefully at what this factorial actually leads to. Binomial coefficients depend on factorials

as well!

Classical Quantum(n

k

) [n

k

]q

[n

k

]=

[n]q ![k]q ![n−k]q !

Example 59

In normal numbers,(42

)= 6. But for the q-factorial,[

4

2

]q

=[4] · [3][1] · [2] =

(1 + q + q2 + q3)(1 + q + q2)

(1 + q)= (1 + q2)(1 + q + q2) = 1 + q + 2q2 + q3 + q4.

Are there any observations we can make here? If we do some more bashing, we can find the following:

[n

k

]q

is a polynomial in q of the form a0 + a1q + · · ·+ amqm.

• The coefficients ai are all positive integers. These are actually called the Gaussian coefficients.

• The coefficients are symmetric or palindromic: writing them backwards gives back the same thing.

• The coefficients first increase and then decrease: a0 ≤ a1 ≤ · · · ≤ abm/2c ≥ · · · ≥ am.

Recall that normal coefficients form a Pascal’s triangle. Do we have a similar thing here?

n = 0: 1

n = 1: 1 1

n = 2: 1 1 + q 1

n = 3: 1 1 + q + q2 1 + q + q2 1

n = 4: 1 1 + q + q2 + q3 1 + q + 2q2 + q3 + q4 1 + q + q2 + q3 1

In normal Pascal’s triangle, we have (n

r

)+

(n

r + 1

)=

(n + 1

r + 1

).

Turns out something similar occurs here! Notice that each entry of the q-Pascal’s triangle is a sum of the two things

above it, but one of them is multiplied by a factor of q or something like it.

Proposition 60 (q-Pascal’s recurrence relation)

For any n, k , [n

k

]q

=

[n − 1k

]q

+ qn−k

[n − 1k − 1

]q

.

21

Page 22: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Proof. We just write out the expressions as factorials:[n − 1k

]q

+ qn−k

[n − 1k − 1

]q

=[n − 1]!

[k ]![n − k − 1]! + qn−k [n − 1]![k − 1]![n − k ]!

We can combine common terms:

=[n − 1]![k!][n − k ]! ([n − k ] + q

n−k [k ])

and now note that [n− k ] = 1+ q+ q2+ · · ·+ qn−k−1, and qn−k [k ] = qn−k + · · ·+ qk . So these work out to just [n],

and this gives

=[n − 1]![k!][n − k ]! [n] =

[n

k

]q

as desired.

It’s time to formulate the combinatorial interpretation for these now! Let λ be a Young diagram, and let λ ⊆k × (n− k) mean that the Standard (straight) Young diagram fits inside a k by n− k rectangle. So there are at most

k nonzero parts, and each one is at most n − k . In other words,

λ1 ≥ λ2 ≥ · · ·λk ≥ 0.

First of all, the number of standard Young diagrams that fits in here is(nk

), because we’re doing a lattice walk from

the bottom left to top right corner!

Theorem 61

For any n, k , [n

k

]q

=∑

λ⊆k×(n−k)

q|λ|.

For example, for n = 4, k = 2, there are 6 possible Young diagrams. 1 of them has 0 squares, 1 of them has 1

square, 2 of them have 2 squares, 1 of them has 3 squares, and 1 of them has 4 squares!

Note that this immediately implies the first three observations! This shows that the degree of

[n

k

]q

is k(n − k),

and palindromicity comes by taking the complement of the shape for any Young diagram.

There’s an interesting way to prove the theorem, but instead, there’s always the brute-force method, which is to

use induction.

Proof by induction. Base case is not hard to prove. Now, we check the q-Pascal’s recurrence for the right hand side.

Look at the first row of the Young diagram. We know λ1 ≤ n − k .

• If λ1 < n− k , which means λ1 ≤ n− k − 1, then λ fits inside a k by n− k − 1 rectangle instead! This gives the[n − 1k

]q

term.

• Otherwise, λ1 = n − k , which means the first row is completely filled. Then if we delete the first row, we get λ

inside a k − 1 by n − k rectangle, and each of these is like an original Young diagram, but we need to add back

n − k squares. That’s why this contributes a factor of qn−k(n−1k−1), and we’re done!

22

Page 23: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

This doesn’t really explain what Young diagrams are coming from, though. Next time, we’ll give a more algebraic

proof that will explain the source!

8 February 22, 2019The first problem set is posted, and it is due March 4th. There are 15 problems, but we only have to do about 6 of

them. Later on, we will have one lecture to discuss the problem set solutions.

Let’s talk more about q-binomial coefficients. We have the normal binomial theorem

(x + y)n =

n∑k=0

(n

k

)xkyn−k .

Unfortunately, q-binomial coefficients are less nice, especially since in a “quantum world,” x and y may not always

commute. Define

yx = qxy such that qx = xq, qy = yq

Then we have the following:

Proposition 62

For any x, y , n,

(x + y)n =

n∑k=0

[n

k

]q

xkyn−k .

For example, taking n = 2,

(x + y)2 = (x + y)(x + y) = x2 + yx + xy + y2 = x2 + (1 + q)xy + y2

In the previous lecture, we proved a main theorem:

Theorem 63

Defining [n

k

]q

=[n]q!

[k ]q![n − k ]q!

where [n]=1 + q + · · ·+ qn−1 and factorials multiply q-numbers, then we have the identity[n

k

]q

=∑

λ⊆k×(n−k)

q|λ|.

Somehow this identity still looks like a miracle. Where’s the actual relation? Let’s find a more conceptual proof!

Fact 64

We’re going to use linear algebra, since this class is called algebraic combinatorics.

Definition 65

Define the Grassmannian Grkn to be the space of k-dimensional linear subspaces of n-dimensional space.

23

Page 24: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Let’s think about this more concretely: what’s the hands-down approach? The idea is that elements of the

Grassmannian are defined by matrices. We pick a linearly independent basis and put those vectors down as rows!

Proposition 66

We can treat Grkn as the set of k × n matrices of rank k . Then if we perform row operations, we have identical

spaces, so we want to use the matrices modulo row operations.

So how can we count these? We haven’t mentioned what the entries of the matrices are! They could be real or

complex, or we could pick any finite field as well.

Fact 67

For any q = pr for p prime and r natural number, there exists a unique finite field of order q up to isomorphism.

It is denoted Fq.

This is closely related to many fields! Now, we can rephrase our question better:

Question 68. What is the number of entries in Grkn(Fq)?

We’re going to count this in two different ways.

Solution 1. First of all, note that row operations are k×k invertible matrices, so we can calculate the number of k×nmatrices of rank k , divided by the number of k × k invertible matrices!

A matrix A has rows v1, v2, · · · , vk , where vi are all vectors in Fnq. To make sure A is invertible, all vk must be

independent. The number of ways to pick v1 is qn − 1 (it can be anything except the zero vector). Next, v2 can be

anything except multiples of v1, so there are qn − q ways to pick v2. Similarly, there are qn − q2 ways to pick v3, and

so on, so the total number of k × n matrices of rank k is

(qn − 1)(qn − q) · · · (qn − qk−1).

But we need to divide by the number of k × k invertible matrices, so our total expression is just

(qn − 1)(qn − q) · · · (qn − qk−1)(qk − 1)(qk − q) · · · (qk − qk−1) .

With a tiny bit of simplification, this is exactly the definition of the q-binomial coefficient

[n

k

]q

! It’s only for q prime

powers though.

Here’s another way to use a notion from linear algebra!

Solution 2. We can transform A into reduced row-echelon form. The idea is to use Gaussian elimination.

Fact 69

This was developed by Newton in 1670, then also Gauss in 1810, and also Jordan in 1888), but also it was known

to Chinese mathematicians in 179 AD or even 150 BC. Basically, ancient mathematicians already knew about this.

Here’s the general idea: find the first nonzero column. Make the top left corner 1 with row operations if at least

one entry in the first column is 1. This can kill all entries below it. Move on to the next column, and either kill

everything in the lower columns or start a new pivot.

24

Page 25: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

For example, for k = 5, n = 10, an example of a reduced form matrix is

1 ∗ 0 ∗ ∗ 0 0 ∗ 0 ∗0 0 1 ∗ ∗ 0 0 ∗ 0 ∗0 0 0 0 0 1 0 ∗ 0 ∗0 0 0 0 0 0 1 ∗ 0 ∗0 0 0 0 0 0 0 0 1 ∗

The 1s are called pivots. The pivot columns are pretty boring, so we can just remove them:

∗ ∗ ∗ ∗ ∗0 ∗ ∗ ∗ ∗0 0 0 ∗ ∗0 0 0 ∗ ∗0 0 0 0 ∗

Fact 70

Does this remind us of anything? One student once said an American flag, but the idea is that it looks like a

Young diagram!

So how many such shapes are there? It’s the number of tableaux that fit in an k × (n− k) rectangle! So since the

∗s can be anything in our matrices, we again have

Theorem 71

The number of elements in the Grassmannian Grkn(Fq) is∑λ⊆k×(n−k)

q|λ|.

So we’ve showed the identity that we want for any q is a power of a prime. To finish, we go back to Euclid!

Fact 72 (300 BC, Euclid)

There are infinitely many prime numbers.

(Proof: assume finitely many, multiply all together and add 1. This new number is not divisible by any primes,

contradiction.)

We also use a fact from algebra:

Fact 73

If two rational expressions with integer coefficients f (q) and g(q) are identical on infinitely many values, they are

the same on all values of q!

This means that we have our result:

25

Page 26: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Corollary 74

For all values of n, k, q, [n

k

]q

=∑

λ⊆k×(n−k)

q|λ|.

What’s left is unimodality, but we’ll do that later. Here’s a fun fact:

Definition 75

Given a permutation w = (w1, · · · , wn) ∈ Sn, (i , j) is an inversion of w if i < j and wi > wj . Denote inv(w) to

be the number of inversions of w .

Example 76

inv(312675) is 4: 31, 32, 65, 75.

Theorem 77

We have

[n]q! =∑w∈Sn

qinv(w).

So the size of the Young diagram plays the same role as the number of inversions! We’ll see that there’s something

more general going on in the future.

Proof. We will prove this by induction. How do we grow a permutation? Start with u ∈ Sn−1, and then we can add n

in n different places. If it goes at the end, it adds no inversions: if we add it second-to-last, we get 1 inversion, and

so on. So this multiplies on a factor of (1 + q + · · ·+ qn−1), which is exactly what we want: the q-number for n.

9 February 25, 2019If we have questions about the problem set, we can ask. The official office hours are right after this class on Mondays,

but we can also schedule other times.

A few bonus problems will be added to make the problem set more interesting.

Last week, we talked about q-binomial coefficients and q-factorials, which are special cases of another quantity:

Definition 78

The q-multinomial coefficients [n

n1, n2, · · · , nr

]q

=[n]q!

[n1]q![n2]q! · · · [nr ]q!

can be defined for n = n1 + · · ·+ nr and all ni ≥ 0.

Note that

[n

1, 1, · · · , 1

]q

is just [n]q!, and

[n

r, n − r

]q

is just

[n

r

]q

.

26

Page 27: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Definition 79

A multiset is like a regular set, but we allow entries to appear multiple times. For example, we can have 1 appear

n1 times, 2 appear n2 times, and so on: this will be abbreviated as

S = {1n1 , 2n2 , · · · , r nr }.

So now let’s consider w = (w1, · · · , wn) as a permutation on the multiset S. We define an inversion very similarly:

Definition 80

An inversion in w is a pair of indices (i , j) where 1 ≤ i < j ≤ n and wi > wj . We also define inv(w) to be the

number of inversions in w .

Then the main theorem is very similar:

Theorem 81

For any q-multinomial coefficient, [n

n1, · · · , nr

]q

=∑w

qinvw

where the sum is taken over all permutations of {1n1 , 2n2 , · · · , r nr }.

The proof is similarly by induction, and it is an exercise on the problem set! As a corollary, we know that[n

n1, · · · , nr

]q

is a polynomial in q with positive integer coefficients. The degree of this polynomial is the maximum

number of inversions, which happens when we write everything in weakly decreasing order: this is just

d =∑

1≤a<b≤rnanb.

Similarly, we also know that the coefficients are symmetric: ai = ad−i . This follows from the fact that we can just flip

the whole sequence around! Basically,

inv(w1, · · · , wn) = d − inv(wn, wn−1, · · · , w1),

since any pair of distinct entries is an inversion in one or the other and d is the total number of pairs of distinct entries.

By the way, if our multiset only contains 1s and 2s, so S = {1k2n−k}, there is a correspondence between permutations

of S and Young diagrams λ ⊆ k × (n − k).

Example 82

Let w = (2, 1, 1, 2, 2, 1, 2, 2, 1): transform this into a lattice path, going up when we see a 1 and right when we

see a 2.

Then the number of squares |λ| corresponds to the number of inversions, since we can just match the corresponding

2 and 1!

27

Page 28: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

What if we do r = 3? We can think of this as a lattice path in a 3-dimensional box, and we go up, right, or into

the page each time we see a 1, 2, 3 respectively. It’s not quite as clean, though.

Let’s move on to a new idea!

Let [n] be the set {1, 2, · · · , n}. Given any permutation w , we can think of it as a bijective map

w : [n]→ [n].

We can multiply such maps or take compositions: that’s how we multiply permutations! These permutations form a

group Sn, called the symmetric group.

Fact 83

Stanley’s book uses Sn instead of Sn.

There’s several different ways we can notate permutations:

name notation example

1-line notation (w1, · · · , wn) (2, 5, 7, 3, 1, 6, 8, 4)

2-line notation

(1 2 · · · n

w1 w2 · · · wn

) (1 2 3 4 5 6 7 8

2 5 7 3 1 6 8 4

)Cycle notation (a1a2a3) · · · (125)(3784)(6)

Cycle notation is the most important here: we keep following the permutation until we get back to a point we’ve

already been at. Trivial cycles like (6) are sometimes omitted, and they’re called fixed points of w .

There’s two more: in graphical notation, draw arrows from numbers to where they go. This forms closed polygons.

Finally, we have matrix notation (ai j) where

ai j =

1 j = w(i)

0 otherwise

which is an n × n matrix. Here, the matrix is “either this one or the transpose:”

w =

0 0 0 0 1 0 0 0

1 0 0 0 0 0 0 0

0 0 0 1 0 0 0 0

0 0 0 0 0 0 0 1

0 1 0 0 0 0 0 0

0 0 0 0 0 1 0 0

0 0 1 0 0 0 0 0

0 0 0 0 0 0 1 0

We want the one where multiplication works with permutations.

Fact 84

Exercise: is this one the correct one?

Notice that this corresponds to rook placement on a chessboard! Place rooks where there are 1s, so there are

no rooks attacking each other. There are many problems about non-attacking rook placements, and we’ll talk about

them later in this class.

28

Page 29: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

What we’re going to discuss next is statistics on permutations! Basically, we’ll somehow map

A : Sn → {0, 1, 2, · · · , }

and form a generating function

FA(x) =∑w∈Sn

xA(w).

Definition 85

Two statistics A and B are equidistributed if they have the same generating function.

Here are some common statistics that are studied:

• Number of inversions inv(w)

• The length of a permutation `(w), defined to be the minimum number ` of adjacent transpositions (of the

form si , switching i and i + 1 but not 1 and n) needed to express w .

It’s a fact that we can write any permutation as a sum of adjacent transpositions: just induct on n by switching n

into the last spot.

Example 86

We can switch 123 → 213 → 231 → 321, so `(321) is at most 3. It is in fact 3, and this is also the number of

inversions.

This is not a coincidence!

Theorem 87

For any permutation w , the length of w is also the number of inversions of w .

So those two statistics aren’t just equidistributed: they’re actually the same statistic. Let’s go back quickly to the

generating function and do the proof more carefully:

Theorem 88

The generating function∑w∈Sn

qinvw = (1 + q)(1 + q + q2) + · · ·+ (1 + q + · · ·+ qn−1) = [n]q!.

Proof. This is true by induction on n. This holds for n = 1, and now let’s say it holds for n − 1.There are n permutations that can be created by extending an element of Sn−1: just put the n somewhere inside.

Those n insertions add n − 1, n − 2, · · · , 1, 0 inversions respectively, so this is∑w∈Sn

qinv(w) =∑u∈Sn−1

qinv(u)(1 + q + q2 + · · ·+ qn−1 = [n − 1]q![n]q = [n]q!,

as desired.

Back to statistics:

29

Page 30: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

• The number of cycles in w , denoted cyc(w), including fixed points.

For example, w = (2, 5, 7, 3, 1, 6, 8, 4) in cycle notation is (125)(3784)(6), so cyc(w) = 3. Note that by degree

arguments, this can’t be equidistributed with the number of inversions!

Theorem 89

For any n, ∑w∈Sn

xcyc(w) = x(1 + x)(2 + x) · · · (n − 1 + x).

Proof. Let’s do this by induction. Write our permutations in cycle notation, and let’s say we insert n into our

permutation. It can either be inserted into one of the existing permutations, or it can go by itself.

There are n− 1 ways to insert into an existing spot and keep the number of cycles the same, since it does matter

where we insert n into an existing cycle, and 1 way to add a new cycle. That’s exactly the ((n − 1) + x) that we

want!

10 February 27, 2019This is a reminder that the problem set is due on Monday, so we should start it soon. A few bonus problems were also

added that are a bit more challenging.

Next Wednesday, we will discuss the problem set in class. Professor Postnikov is pretty lenient with late problem

sets, but don’t turn them in after we discuss the solutions.

Last time, we started discussing statistics on permutations. We defined inv(w) to be the number of inversions and

cyc(w) to be the number of cycles, and we found some generating functions∑w∈Sn

qinv(w) = [n]q!,∑w∈Sn

xcycw = x(x + 1) · · · (x + n − 1).

Definition 90

Let a descent of a permutation w = (w1, · · · , wn) be an index 1 ≤ i ≤ n − 1 such that wi > wi+1. Denote the

number of descents to be des(w).

For example, des(2, 5, 7, 3, 1, 6, 8, 4) = 3. The form of the generating function is a bit less nice, though.

Definition 91

The generating function ∑w∈Sn

xdes(w)

is called the Eulerian polynomial.

So we have a number of inversions, cycles, and descents. Here’s a meta-mathematical claim: interesting permu-

tation statistics are likely equidistributed with one of these classes!

30

Page 31: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Fact 92

Things related to inversions are called “Mahonian statistics.” Cycles are related to Stirling numbers, but there’s

no common name. Descent-related statistics are called “Eulerian statistics.”

Definition 93

Let the major index of w ∈ Sn be

maj(w) =∑

i descentof w

i .

For example, the permutation w = (2, 5, 7, 3, 1, 6, 8, 4) has descents in position 3, 4, and 7, so maj(w) = 3+4+7 =

14.

Theorem 94

inv(w) and maj(w) are equidistributed.

This is a bonus problem from the problem set! Both of these are named after Major Percy MacMahon, who wrote

a famous book on combinatorics. So major is named that way for the military rank.

Definition 95

A record of a permutation w is an entry greater than all entries to the left. Define rec(w) to be the number of

records of w .

For example, w = (2, 5, 7, 3, 1, 6, 8, 4) has records 2, 5, 7, 8, so rec(w) = 4.

Theorem 96

rec(w) and cyc(w) are equidistributed.

This can be proved by induction: for example, show the generating functions satisfy the same recurrence relation.

But we prefer combinatorial proofs: maybe we can find a transformation with a bijective argument!

Proof. We’ll find some bijection f : Sn → Sn sending w → w such that cyc(w) = rec(w). Write permutations in

cycle notation: if

w = (a1 · · · )(a2 · · · )(a3 · · · ) · · · ,

there are many ways we can write this permutation down. Write w such that each ai is the maximal element in its

cycle, and sort them such that a1 < a2 < · · · . Then w is just w , but instead of viewing it as cycle notation, view it

as one-line notation! For example,

w = (125)(3784)(6) =⇒ w = (512)(6)(8437) =⇒ w = (5, 1, 2, 6, 8, 4, 3, 7).

Notice that a1, a2, · · · will be the records of w , so the number of cycles of w is the number of records of w , as desired.

This is bijective (to go backwards, find the records and put parentheses back), so we’re done!

31

Page 32: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Definition 97

An exceedance in w is an index 1 ≤ i ≤ n such that wi > i . Let exc(w) be the number of exceedances of w .

For example, in (2, 5, 7, 3, 1, 6, 8, 4), we have 4 exceedances (not counting 6, which is a “weak exceedance”), so

exc(w) = 4.

Theorem 98

exc(w) and des(w) are equidistributed.

In other words, “the number of exceedances is an Eulerian statistic.”

Proof. Let’s start with a related idea:

Definition 99

Define an anti-exceedance to be an index i such that wi < i .

This is equidistributed with the number of exceedances. Why? Take the inverse permutation. If w(i) > i , then

w−1(w(i)) < w(i): this means that i is an exceedance in w means w(i) is an exceedance in w−1.

Claim 100. Given a map w → w that converts cycle notation to one-line notation, the number of anti-exceedances

in w is the number of descents in w .

This is because i being a descent in w means that because the i + 1th entry is not larger than w , i and i + 1 are

in the same cycle. Then that means that i goes to something smaller than itself, making it an anti-exceedance!

Let’s look a bit at Stirling numbers now. There are two kinds of Stirling numbers: the first kind and the second

kind.

Definition 101

Define the Stirling numbers of the first kind for 0 ≤ k ≤ n

s(n, k) = (−1)n−kc(n, k),

where c(n, k) is the signless Stirling numbers of the first kind

c(n, k) = the number of permutations ∈ Sn with k cycles.

By convention, let s(0, 0) = 1 and s(n, 0) = 0 for all n ≥ 1.

Here, fixed points are included as cycles (of length 1).

32

Page 33: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Fact 102

The generating function for the Stirling numbers

n∑k=0

c(n, k)xk = x(x + 1) · · · (x + n − 1),

and we can equivalently find that

n∑k=0

s(n, k)xk = x(x − 1) · · · (x − n + 1).

The first expression is called “raising power of x ,” while the second is called the “falling power of x .” The latter is

sometimes denoted (x)n.

Definition 103

Define the Stirling number of the second kind

S(n, k) = number of set-partitions of [n] into k non-empty blocks.

We also use the convention S(0, 0) = 1 and S(n, 0) = 0 for n ≥ 1.

Example 104

One set-partition is π = (125|3478|6). The main difference between this and cyclic notation is that the order

within each group doesn’t matter.

The Stirling numbers of the second kind are always positive: there’s no negative signs like in the first kind.

Theorem 105

n∑k=0

S(n, k)(x)k = xn.

Compare this to the generating function for Stirling numbers of the first kind: in that one, we input powers of x ,

and get falling powers of x , and in this one, we input falling powers of x and get powers of x! This is a kind of duality.

11 March 1, 2019

We will continue the discussion about Stirling numbers today. Recall that s(n, k), the Stirling numbers of the first

kind, are (−1)n−k times the number of permutations of Sn with exactly k cycles, including fixed points. Meanwhile,

S(n, k), the Stirling numbers of the second kind, count the number of set-partitions of [n] with k blocks, where order

doesn’t matter for each.

33

Page 34: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Example 106

Take n = 4, k = 2. There are 8 ways to have Sn as a 3-cycle and a fixed point, and 3 ways to make it two

transpositions. Thus,

s(4, 2) = (−1)4−2 · (8 + 3) = 11.

On the other hand, S(4, 2) is similar, but we don’t care which orientation the 3-cycle goes in. So we have 4

3-cycles and 3 pairs of transpositions, and this means

S(4, 2) = 4 + 3 = 7.

From last week, we found the following main result:

Theorem 107

We haven∑k=0

s(n, k)xk = (x)n,

where (x)n = x(x − 1)(x − 2) · · · (x − (n − 1)), and

n∑k=0

S(n, k)(x)k = xn.

So consider the space of all polynomials R[x ]: this is a linear space, and it has a 2 linear bases.

Fact 108

{1, x, x2, · · · , xn, · · · } is a basis for R[x ], but so is {1, x, x(x − 1), · · · , (x)n, · · · }. So the Stirling numbers are a

“change of basis.”

That means that we can construct matrices for both changes of bases, and they must be invertible!

Corollary 109

If we construct matrices (s(n, k))n,k≥0 and (S(n, k))n,k≥0, they are invertible.

These are infinite matrices, but we can always take all indices from 0 to some fixed N.

Example 110

For 0 ≤ n, k ≤ 3, we have

(s(n, k)) =

1 0 0 0

0 1 0 0

0 −1 1 0

0 2 −3 1

,and

(S(n, k)) =

1 0 0 0

0 1 0 0

0 1 1 0

0 1 3 1

.

34

Page 35: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Both are lower triangular matrices, since s(n, k) = S(n, k) = 0 for k > n.

We’ve proved the first identity from the theorem above already, but what about the second identity?

Proof. We can prove this by induction, but here’s a combinatorial proof. It is enough to prove that this holds for all

positive integer x , since both sides are polynomials.

Consider the set of all functions

F = {f : [n]→ [x ]}.

Each of 1, 2, · · · , n has x options, so there are a total of xn such functions in F .

On the other hand, given a function f , we can construct a set-partition π of [n] as follows: put i and j in the same

block if and only if f (i) = f (j). So we group elements of our set based on the output, and we want to count the

number of sets that produce a given set-partition.

Fix a set-partition π with k blocks B1, B2, · · · , Bk . The number of functions that produce this specific set-partition

is x(x − 1) · · · (x − (k − 1)) = (x)k , since B1 has x options for its function value, then B2 has (x − 1) options (since

it can’t be equal to the value on B1), and so on.

But now we’re done: the number of such functions over all set partitions is

|F | =n∑k=0

S(n, k)(x)k ,

since we just pick a set-partition and then assign values to it, and we’re done!

Here’s another combinatorial application of Stirling numbers of the second kind: rook placements. We’re not

allowed to place rooks on the same row and column, so they can’t attack each other.

Consider the number of rook placements on a triangle board of Young tableau shape ((n− 1), (n− 2), · · · , 1). For

example, here’s a rook placement for n = 7:x

x

x

Our goal is to put numbers in the corners to correspond to a set partition: for each rook, we place a hook, and then

numbers connected by hooks are in the same part of the partition.

x 7

x 6

5

x 4

3

2

1

This corresponds to a set partition! Here, 2, 4, 6 are connected, 1 and 7 are connected, and 3 and 5 are lonely, so this

is the set partition

π = (1, 7 | 2, 4, 6 | 3 | 5) .

Theorem 111

S(n, k) is the number of non-attacking rook placements with n − k rooks.

35

Page 36: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

For example, notice that S(n, n) = 1 is the number of ways to place no rooks on the chessboard.

Definition 112

The Bell number Bn =∑nk=0 S(n, k) is the total number of set-partitions of n, and this is also the total number

of rook placements on ((n − 1), (n − 2), · · · , 1).

Example 113

For n = 4, there is 1 way to place no rooks, 6 ways to place 1 rook, 7 ways to place 2 rooks (do casework), and

1 way to place 3 rooks. This is a total of

B4 = 1 + 6 + 7 + 1 = 15.

There are other categories of set partitions that we can use, and those come from “arc diagrams.” Basically, place

the numbers 1 through n on a number line, and draw an arc between adjacent entries in a block. (Arcs correspond to

rooks: a to b is ath column, bth row.)

Courtesy of Agustin Garcia, here’s the arc diagram for (1, 4, 6 | 2, 3 | 5):

1 2 3 4 5 6

Definition 114

A set-partition is non-crossing if no two arcs intersect each other. Basically, if i < j < k < l , we can’t have an

arc between i and k and also between j and l .

We also define a set-partition to be non-nesting if there is no arc “inside” another one. Basically, we can’t

have an arc between i and l and also between j and k .

There is an interesting duality between these two definitions:

Theorem 115

The number of non-crossing set partitions of [n] is equal to the number of non-nesting set partitions. This is just

the Catalan number Cn.

Proof for non-nesting partitions. Use rook placements! π is non-nesting if and only if there is no rook to the right and

down of another one. Basically, each rook is southwest or northeast of each other one. Here’s an example:

x

x

x

x

36

Page 37: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Put a sun on the top left corner. Every rook casts a shadow:

x

x

x

x

Follow the border of the shadow. This is a Dyck path from the bottom left to the top right corner!

As a bonus problem, figure out the analogous argument for non-crossing partitions.

Fact 116

We can draw a Pascal’s triangle-like object for S(n, k). There’s a similar rule to calculate both S(n, k) and s(n, k):

it’s an exercise to find the recurrence relation!

12 March 4, 2019Today we’re going to discuss Eulerian numbers.

Definition 117

Let Ank be the number of permutations w ∈ Sn with exactly k descents: des(w) = k .

Notation is sometimes shifted by one index, but this is not that significant.

Fact 118

It’s important not to confuse these with Euler numbers!

There is a nice bijection between permutations in Sn and increasing binary trees on n nodes. Remember that one

interpretation of Catalan numbers is the number of binary trees! But this time, we’re going to label the vertices by

numbers from 1 to n such that they increase as we go away from the root.

Example 119

Start with w = (4, 2, 8, 5, 1, 3, 9, 10, 6, 7).

At the root of this tree, we use 1, and the left branch of the tree contains (4, 2, 8, 5) while the right branch contains

everything else. Repeat this process by finding the minimal element in each group, and partition from there!

So each node has at most 1 left child (the smallest element on its left) and at most 1 right child (the smallest

element on its right), which means it is indeed a binary tree. The nodes are labeled 1 through n, and they indeed

increase downwards.

37

Page 38: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Fact 120

This is a bijection, since we can just reverse the process by placing 1 in our permutation, putting the left elements

to its left and right elements to its right, and so on.

How does this help us say things about Eulerian numbers?

Theorem 121

Ank is the number of increasing binary trees on n nodes with k left edges.

Proof. Think about the bijection. When we go from the permutation to the tree w → Tw , any left edge i → j means

we have

w = (· · · j · · · )i · · · ,

where j is the minimal element in the parentheses. So i will have a descent! This means that the descents correspond

to the vertices with a left child, as desired.

In a sense, Eulerian numbers look a lot like binomial coefficients.

Definition 122

Construct the Eulerian triangle so that the bth entry in the ath row is Aa,b−1. The first few rows look like

1

1 1

1 4 1

1 11 11 1

1 26 66 26 1

This is a lot like Pascal’s triangle, but the weights are different. If we go along the kth diagonal from either

direction, the weight is k! For example, 26 = 4 · 1 + 2 · 11.

Theorem 123 (Recurrence relation for Eulerian numbers)

For all n, k ,

An+1,k = (n − k + 1)An,k−1 + (k + 1)An,k .

This is not very hard to prove in terms of binary trees or the original descent definition.

Proof. Suppose we have a binary tree with n nodes: we want to add an extra node. We can add an extra leaf with

label n+1: it can be checked that the number of ways to add a left edge is n− k +1, and the number of ways to add

a right edge is k + 1.

Alternatively, we can see this by looking at the permutations: if we have a permutation w ∈ Sn and we want to

add n + 1. There are n + 1 ways to add it: adding it in one of the k descent slots or at the beginning does not add

a descent, and k + 1 of these work, while adding it in an ascent slot or at the end adds a descent, which is the other

k − n + 1 ways.

38

Page 39: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Remember that last time, we also discussed the two kinds of Stirling numbers. c(n, k), the signless Stirling numbers

of the first kind, is the number of permutations w ∈ Sn with k cycles (including fixed points). Make a Pascal’s triangle

such that the bth entry in the ath row is c(a, b). Then this triangle looks like

1

1 1

2 3 1

6 11 6 1

Notice that we no longer have the symmetry between k cycles and n − k cycles. But we still have a recurrence

relation with weights!

Proposition 124 (Recurrence relation for c(n, k))

For all n, k ,

c(n + 1, k) = c(n, k − 1) + nc(n, k).

Meanwhile, S(n, k), the Stirling numbers of the second kind, are the number of set-partitions of [n] into k groups.

If we construct a similar triangle, it looks like

1

1 1

1 3 1

1 7 6 1

1 15 25 10 1

It is a bit harder to describe the weights here: they are 1 for all edges sloping down and to the right, and they

increase starting from 1 in each row for edges sloping down and to the left.

Proposition 125 (Recurrence relation for S(n, k))

For all n, k ,

S(n + 1, k) = S(n, k − 1) + kS(n, k).

As an exercise, we should prove these two relations!

There are many more permutation statistics, but we’ll move on to the next topic for now: posets and lattices!

Definition 126

A lattice L is a special kind of poset: it has two binary operations meet ∧ and join ∨. x ∧y is the unique maximal

element of L which is less than or equal to both x and y , and x ∨ y is the unique minimal element of L such that

it is greater than or equal to both x and y .

Here’s an example of a lattice:

39

Page 40: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

x y

x ∨ y

x ∧ y

However, here’s an example of something that is not a lattice, since x and y have no x ∧ y and two different

potential x ∨ ys:

x y

The usual definition doesn’t actually use posets though: it’s more abstract.

Definition 127 (Axiomatic definition of a lattice)

A lattice is a set L with binary operations ∧ and ∨ such that

• ∧ and ∨ are commutative and associative, so x ∧y = y ∧x , and x ∨y = y ∨x . Also, x ∧(y ∧z) = (x ∧y)∧z ,and similar for ∨.

• x ∧ x = x ∨ x = x .

• (Absorption law) x ∧ (x ∨ y) = x = x ∨ (x ∧ y).

• x ∧ y = x if and only if x ∨ y = y .

Note that addition and multiplication do not follow these laws.

Fact 128

Given the axiomatic operations and a set L, we can reconstruct a poset, and given any lattice, it and its operations

∧ and ∨ satisfy the axioms! In particular, x ≤ y happens if and only if x ∧ y = x , which is the same as x ∨ y = y .

Some time in the future, we will discuss boolean lattices, partition lattices, and Young lattices!

13 March 6, 2019We got our problem sets back. Today, people will present solutions to problems.

Problem 129

Prove a permutation is queue-sortable if and only if it is 321-avoiding.

40

Page 41: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Solution by Fadi Atieh. First, we prove that if a permutation w1, · · · , wn has a 321-pattern, it is not queue-sortable.

In this case, there exist wi > wj > wk where i < j < k . We can’t put wi in the list yet, because wj is smaller than it,

so wi is pushed in the queue. However, wj also cannot be pushed immediately, so it must go in the queue as well. So

wi will exit the queue first, contradiction.

Now, let’s say w is not queue-sortable. Note that for any w , there’s a unique way to queue-sort: we have a sorting

pointer, which tells us which step we’re at, we have a queue, and a partially filled list. Whenever we get to an element

a, if there is something smaller than it that still hasn’t been put in the list, we must put a in the queue; otherwise, it

goes in the list.

Well, if we get stuck, we must be trying to put some element wi in the list which currently ends in wk , but

wi > wj > wk for some wj is in the queue. This means wi > wj > wk , but wk came before wj , which came before wi ,

and we’ve found a 321-pattern.

Problem 130

Prove the identity [2n

n

]q

=∑qk2

[n

k

]2q

.

Solution by Agustin Garcia. The left hand side is the generating function for Young diagrams inside n × n rectangles.

Take any such diagram: there is exactly one k × k box that fits in the upper left hand corner (this is called the Durfeesquare. Now we can split our Young diagram into a k × k square and then two Young diagrams inside k × (n − k)

rectangles, which are generated by the function

[n

k

]q

. Tack on a qk2

for the k × k square, and we’re done!

Problem 131

Show that the number of set-partitions of [n] such that i and i + 1 are not in the same set for all 1 ≤ i ≤ n − 1is the number of set-partitions of [n − 1].

Solution by Christina Meng. Looking at the left hand side, we can think of this problem in terms of rook placements:

we want to place rooks in a board with rows n−1, n−2, · · · , 1. But if we can’t have i and i +1 in the same partition,

then we can’t have any rooks in the bottom corner, making this equivalent to just a rook placement for a board with

rows n − 2, n − 3, · · · , 1, and we’re done because this is just the right hand side!

Solution by Sophia Xia. Construct a bijection between the two sets. Given a partition π of [n − 1], we want to map

this to a partition of [n] with no two consecutive integers in the same block.

Look at each block in the partition. For every maximal sequence i , i + 1, · · · , j of consecutive integers in a block

of π, remove j − 1, j − 3, · · · , until either i or i + 1, and place them in a block with n. We can check that this gives

a partition of [n] with no two consecutive integers in the same block. To go backwards, look at all the things in the

same block as n and put those elements back! Put k in the block with k + 1.

41

Page 42: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Problem 132

Show the identity

(x + y)n =

n∑k=0

[n

k

]q

xkyn−k ,

where yx = qxy , qx = xq, qy = yq.

Solution by Ganatra. We know that the commutator [x, y ] = xy − yx is not zero, but [q, x ] = [q, y ] = 0.

Let

[0

0

]q

= 1, and define

[n

k

]q

= 0 for n ∈ N and k > n or k < 0. So the valid range is when 0 ≤ k ≤ n.

We also have the fact from class [n

k

]q

=

[n − 1k

]q

+ qn−k

[n − 1k − 1

]q

.

Proceed by induction. This holds for n = 0, and let’s assume this holds for all integers n ≤ m. Then

(x + y)n+1 = (x + y)(x + y)n = (x + y)

n∑k=0

[n

k

]q

xkyn−k

and we want to show this is equal to

n+1∑k=0

[n + 1

k

]q

xkyn+1−k =

n+1∑k=0

[nk

]q

+ qn−k

[n

k − 1

]q

xkyn+1−kand this is equal to

n∑k=0

[n

k

]q

xkyn+1−k +

n+1∑k=1

qn+1−k

[n

k − 1

]q

xkyn+1−k

and shifting the index of summation, this is

n∑k=0

[n

k

]q

xkyn+1−k +

n∑k=0

qn−k

[n

k

]q

xkyn−k

Switching the terms,

=

n∑k=0

[n

k

]q

qn−kxkxy n−k +

n∑k=0

[n

k

]q

xkyn−ky

but because qn−kxy n−k = yn−kx (by moving the x past the ys one at a time), this is just

=

n∑k=0

[n

k

]q

xkyn−kx +

n∑k=0

[n

k

]q

xkyn−ky =

n∑k=0

[n

k

]q

xkyn−k(x + y)

as desired.

14 March 8, 2019We will continue with presentations today.

42

Page 43: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Problem 133

Prove that the major index is equidistributed with the number of inversions of w ∈ Sn. Recall that the major

index is the sum of the indices of the descents ∑wi>wi+1

i .

Solution by Yogeshwar Velingker. We’re trying to show that∑w∈Sn

qmaj(w) =∑w∈Sn

qinv(w).

The right hand side, as proved in class, is

1(1 + q)(1 + q2) · · · (1 + q + · · ·+ qn−1) = [n]q!.

This can be shown by induction, and we’ll do a similar thing here. This is obvious when n = 1: there are no descents

and no inversions.

Now let’s say we have a permutation w = (w1, · · · , wn). If we insert n + 1 here, there are several cases.

• Case 1: if we insert n+ 1 at the end, the major index stays the same. Otherwise, we insert n+ 1 somewhere in

the middle. Let w0 = 0: then n + 1 goes after some wi .

• Case 2: If we insert it between wi and wi+1, and wi < wi+1, we add a descent at spot i + 1 and then shift all

descents after it by 1 spot. So in this case, the major index increases by i + 1+ d(i), where d(i) is the number

of descents in w at or after i .

• Case 3: If we insert n+1 between wi and wi+1, but wi > wi+1, then the descent goes from spot i to spot i +1,

and we also shift all later descents by 1. So the major index just increases by d(i) here.

Our goal is to show that all of these increases are the numbers 0 through n, as this would show the result by

induction! Notice that d(i) + i + 1 in the ascent case is at most n, because the descents in d(i) can occur at spots

i + 1, · · · , n − 1, and also d(i) < n in the ascent case. So we just need to show that the values are all different.

We can’t have d(i) = d(j) in the two descent insertions, because one descent occurs before the other. If i and j

are both ascents, then d(i) + i +1 = d(j) + j +1, and this implies d(i)− d(j) = j − i . But that would mean we need

descents at all spots between i and j , which is not possible since i is an ascent.

Finally, let’s say i is a descent and j is an ascent, so

d(i) = d(j) + j + 1 =⇒ d(i)− d(j) = j + 1,

but (????), which is bad.

This means that all increases in major index from inserting n + 1 are all different, so we’re done by induction!

Problem 134

Find the number of permutations w ∈ Sn that are 231-avoiding and k(k − 1) · · · 1-avoiding, where k = 4.

Solution by Congyue Deng. Denote this T (n, k). We claim that

T (n + 1, k) =

n∑i=0

T (i , k)T (n − i , k − 1).

43

Page 44: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

To show this, consider any w ∈ Sn+1 = σ(n + 1)τ , where σ is i elements and τ is the remaining n − i elements.

Since w is 231-avoiding, the elements in σ are all smaller than the elements in τ . Note that both σ is a 231 and

k(k − 1) · · · 1-avoiding Sm and τ is a 231 and k(k − 1) · · · 1-avoiding Sn−m permutation, which is the exact recurrence

relation we want as we sum over m!

Now, let’s compute T (n, 3). This is the number of 231 and 321-avoiding permutations. If we insert n + 1 into a

permutation wn ∈ Sn, but we can’t put it in slot i , then we also can’t put it in slot i − 1. We know that we can put

n + 1 in the end of w , and there are k + 1 ways to put n + 2, or we can put n + 1 in one of the k − 1 last spots and

place n + 2 in the end. So by induction, there are 2n−1 permutations in Sn that avoid 231 and 321.

So now

T (n + 1, 4) = 2n−1T (0, 4) + 2n−2T (1, 4) + · · ·+ T (n, 4),

which yields

T (n + 1, 4) = 3T (n, 4)− T (n − 1, 4)

which is just the alternating Fibonacci numbers F2n−1.

Recall the problem from last lecture:

Problem 135

Prove that the number of set-partitions of [n] that have no i , i+1 in the same partition is the same as the number

of set-partitions of [n − 1].

Proof by Wanlin Li. Draw an arc-diagram: for example, (1, 3, 5) in the same partition would correspond to arcs between

1 and 3 and between 3 and 5. If we have a set-partition of [n] with i and i + 1 not in the same partition, this is the

same as having no arcs of diameter 1. Now shrink every arc by 0.5 in each direction, this is easily reversible and is a

bijection!

Problem 136

For the biased drunk-walk, find the probability that if the man starts at i0 and moves right with probability p, he

falls off after m steps.

Solution by Sarah Wang. The man needs to take k steps to the right and k + i0 steps to the left, so

k =m − i02

(so we must assume m ≥ i0 and m, i0 have the same parity.)

Draw the path as a Dyck path: we want to count the number of paths from (0, i0) to (m, 0). Much like with

the Catalan numbers, we will instead count the number of bad paths. Those intersect the x-axis: pick the first point

where this happens, and reflect the remaining path from there to (m− 1, 1) over the y -axis to (m− 1,−1). This is a

bijection, so the total number of good paths is(m − 1k

)−(m − 1k − 1

).

Each path occurs with probability

pk(1− p)k+i0 ,

so our final answer is the number of paths times the probability of each.

44

Page 45: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Problem 137

Prove the baby-hook length formula: the number of linear extensions of a poset whose Hasse diagram is a rooted

tree isn!∏

v∈T h(v).

Proof by Sanzeed Anwar. Use strong induction. The base case n = 1 is easy to show.

Take a poset whose Hasse diagram is a rooted tree of n vertices. From the vertex, there are some subtrees

T1, T2, · · · , Tk , with m1, · · · , mk vertices. Note that m1 + · · ·+mk = n − 1.By strong induction, the number of linear extensions of Ti is just

mi !∏v∈Ti h(v)

,

so if we want a rooted tree on all n vertices, we can do this in

m1!m2! · · ·mk !∏v 6=root h(v)

(n − 1

m1, m2, · · · , mk

)ways, since we can pick which m1 nodes to use for T1, which m2 nodes to use for T2, and so on. This simplifies to

(n − 1)!∏v 6=root h(v)

=n!∏v h(v)

,

as desired.

Problem 138

Show that a permutation of length mn+1 has an increasing subsequence of length m+1 or decreasing subsequence

of length n + 1.

Proof. For each element in the permutation, assign an ordered pair (i , j) where i is the length of the longest increasing

subsequence up to that element and j is the length of the longest decreasing subsequence up to that element. These

are all distinct (since any subsequence can be extended), so we can’t have 1 ≤ i ≤ m and 1 ≤ j ≤ n for all i , j by the

Pigeonhole principle.

15 March 11, 2019We have one more presentation today:

Problem 139

Let k ≤ n2 . Find a bijection f between k-element and (n − k)-element subsets of [n] that f (I) ⊃ I, for any

k-element subset I.

Solution by Chiu Yu Cheng. Note that the complement of a k-element subset has n − k elements. Thus, it suffices

to find a function f ′ : I → f ′(I) such that f ′(I) ∩ I = ∅.

Put 1, 2, · · · , n in a circle. Initialize f ′(I) to the empty set. For each x ∈ I, move clockwise until we meet the first

element not in I and f ′(I) already, and put that in f ′(I).

45

Page 46: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

We just need to show this is a bijection. To do this, we want to show that f ′(I) is determined regardless of the

order of I. Given x 6∈ I, is it in f ′(I)? Assign a number 1 to a number on the circle if it is in I and −1 otherwise. x is

in f ′(I) if and only if there is a counterclockwise partial sum starting from x − 1 that is positive. This is independent

of the order of I chosen!

This was a Google problem for getting an interview a while ago. We’ll have another solution to this problem as we

talk about some more concepts!

Remember the ideas of posets and lattices from a few lectures ago: we have a set L with operations ∧ and ∨.

Alternatively, we can define an operation ≤, where ∧ (meet) is the unique maximal element ≤ both x and y , and ∨(join) is the unique minimal element such that both x and y are ≤ it. It can be shown that this poset chain satisfies

the axioms that we want: the idea is that

x ≤ y ⇐⇒ x ∧ y = x.

An axiom of the lattice definition is that x ∧ y = x ⇐⇒ x ∨ y = y , so this is consistent.

Definition 140

The Boolean lattice Bn is defined with elements that are subsets of {1, · · · , n}. Our order relation S1 ≤ S2 ⇐⇒S1 ⊂ S2. Then ∧ and ∨ have nice interpretations:

S1 ∧ S2 = S1 ∩ S2, S1 ∨ S2 = S1 ∪ S2.

This might explain why ∧ and ∨ look the way they do!

Example 141

The Boolean lattice B3 looks like this, where 0 denotes the smallest element and 1 denotes the largest element:

0 = {}

{1} {2} {3}

{1, 2} {1, 3} {2, 3}

1 = {1, 2, 3}

Notice that this traces out a 3-dimensional cube!

46

Page 47: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Definition 142

The partition lattice Πn has elements that are set-partitions of {1, · · · , n}. They are ordered by refinement:π ≤ σ (which means π refines σ or σ coarsens π) if each block of π is contained in a block of σ.

Here, the meet operation σ ∧ π is the common refinement of σ and π: take all intersections of blocks.

On the other hand, the join operation σ ∨ π is the finest common coarsening of σ and π, but this is slightly

harder to define. If a, a′ are in the same block of π, and a′, a′′ are in the same block of σ, a′′, a′′′ are in the same

block of π, and so on (alternating between π, σ), then those elements along the chain are in the same block of

σ ∨ π.

Example 143

Here’s what the partition lattice Π3 looks like:

0 = {1|2|3}

{12|3} {13|2} {23|1}

1 = {123}

Definition 144

Young’s lattice Y is an infinite lattice of all Young diagrams ordered by containment.

The minimal element 0 is the empty Young diagram. Above it, we have the diagram with a single box, then 2

dominoes, and then there are 3 Young diagrams of 3 boxes, 5 Young diagrams of 4 boxes, and so on.

Fact 145

Given any Young diagram, there is always 1 more shape above it than there is below it (think about the corners)!

There are finite sublattices of Y: for example, we can fix m, n, and define L(m, n) to be the sublattice of Young

diagrams that fit inside an m × n box. Recall that those are generated by the generating function

[n

k

]q

.

Example 146

L(2, 2) is a finite lattice: it has a unique maximal and minimal element. It looks like this:

47

Page 48: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

0 = ∅

1 =

What are the meet and join operations? Here, λ ∧ µ is the set-theoretic intersection, and λ ∨ µ is the union. It

can be checked that these are indeed always Young diagrams!

Among all lattices, there is a special class:

Definition 147

A lattice (L,∧,∨) is distributive if it satisfies the distributive laws

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

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

Notice that this is not satisfied by normal operations: x + (yz) 6= (x + y)(x + z).

Lemma 148

Bn is a distributive lattice!

Proof. It is easy to check that in general, X∪(Y ∩Z) = (X∪Y )∩(X∪Z), and similarly X∩(Y ∪Z) = (X∩Y )∪(X∩Z).(Draw a Venn diagram!)

Lemma 149

The Young lattice Y, as well as L(m, n) are distributive lattices.

Proof. Meet and join are still just unions and intersections here! So the same proof works.

48

Page 49: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Fact 150

Unfortunately, Πn for n ≥ 3 is not a distributive lattice. So not all lattices are distributive! For example, let

x = (12|3), y = (13|2), z = (23|1). Then

x ∨ (y ∧ z) = x, (x ∧ y) ∨ (x ∧ z) = 1.

Turns out there is a very simple description of finite distributive lattices:

Definition 151

Given a poset P , I ⊂ P is an order ideal if for all x ∈ I, y ≤ x , y ∈ I.

So ideals basically contain some “bottom part” of the Hasse diagram: it’s “closed downward.”

Definition 152

Given a poset P , denote J(P ) to be the poset of all order ideals in P , ordered by containment.

Theorem 153 (Birkhoff’s FTFDL (Fundamental Theorem for Finite Distributive Lattices))

The map P → J(P ) is a one-to-one correspondence between finite posets and finite distributive lattices!

For example, if our poset has elements a ≤ b, a ≤ c , then the order ideals are {}, {a}, {a, b}, {a, c}, {a, b, c}. In

other words, here’s the poset J(P ) for P = a

b c

:

0 = ∅

{a}

{a, b} {a, c}

{a, b, c}

We’ll look a bit more at this next time!

16 March 13, 2019

Remember from last lecture: if we have a poset P , then J(P ) is the poset of order ideals in P , ordered by inclusion.

(Order ideals are closed downward.)

49

Page 50: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Lemma 154

J(P ) is a distributive lattice.

Proof. If we have two order ideals I and J, we can define the meet operation I ∧ J = I ∩ J: it can be checked that the

intersection of two order ideals is an order ideal. Similarly, we define I ∨ J = I ∪ J, and everything works.

Since the usual union and intersection satisfy the distributive laws, this is also a distributive lattice.

Remember from last time that the converse is also true:

Theorem 155 (Fundamental Theorem for Finite Distributive Lattices)

Every finite distributive lattice is of the form J(P ) for some poset P . In particular, P → J(P ) is a bijection

between finite posets and finite distributive laws.

Main sketch of the proof. We already know how to get from P → J(P ): our goal is to reconstruct a poset from a

finite distributive lattice L.

Definition 156

An element x ∈ L is join-irreducible if it is not the minimal element of L [which exists] and we cannot express it

as x = y ∨ z for y , z < x (≤ and not equal).

For example, if we take the lattice above, everything except the bottom and top element is join-irreducible.

But it turns out we can just construct P to be the subposet of L of all join-irreducible elements! It’s an exercise

to show that L ∼= J(P ).

Definition 157

A poset P is ranked if there is a ρ : P → {0, 1, 2, · · · } such that ρ(x) = 0 for any minimal elements x of P and

ρ(y) = ρ(x) + 1 if x l y .

So far, all the posets that we’ve been discussing have been ranked: the idea is that all elements live on different

“levels.” In the diagram below, the left poset is ranked, but the right poset is not.

0

1

2

1

2

3

0

1

1

2

?

ranked not ranked

Proposition 158

Any finite distributive lattice is ranked with the modularity property: ρ(x ∨ y) + ρ(x ∧ y) = ρ(x) + ρ(y).

50

Page 51: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Proof. If L = J(P ) is a finite distributive lattice, and I ∈ L is an order ideal of P , then the rank is just ρ(I) = |I|. So

our goal is to show that I l J, they only differ in one element: this is true because I < J means I is strictly contained

in J.

Definition 159

Let P be a finite ranked poset. Define ri to be the number of elements in P with rank i : call this a rank numberof P . These rank numbers form a vector (r0, r1, · · · , rN), where N is the maximal rank of any element, and P is

rank-symmetric if ri = rN−i for all i . If r0 ≤ r1 ≤ · · · ≤ rj ≥ rj+1 ≥ · · · ≥ rN , then P is unimodal.

In the most recent example on the left, we have rank numbers (1, 2, 2, 1), so the poset is both unimodal and

rank-symmetric.

Definition 160

Let P and Q be two posets. Define their product P × Q to be the poset whose elements are pairs (p, q), p ∈P, q ∈ Q. The order relation

(p, q) ≤ (p′, q′) ⇐⇒ p ≤ p′, q ≤ q′.

Notice that not all pairs are comparable.

Example 161

Let [n] denote the poset whose Hasse diagram is just an increasing chain of n elements. Clearly this is rank-

symmetric and unimodular.

Example 162

What does [m] × [n] look like? We have a grid, but we have to rotate it by 45 degrees. Then (m, n) has rank

m + n.

The rank numbers look like (1, 2, · · · , k − 1, k, · · · , k, k − 1, · · · , 2, 1), where k is the minimum of m and n. This

is also rank-symmetric and unimodular.

What happens if we apply J to our posets? J([n]) is just [n + 1], but do we get something more interesting if we

look at

J([m]× [n])?

Well, every order ideal corresponds to a Young diagram if we replace elements with boxes! So order ideals are exactly

the Young diagrams that fit inside our grid, meaning that

L(m, n) = J([m]× [n])

is the poset of Young diagrams that fit in an m× n rectangle. But we know the rank numbers ri for J([m]× [n]) must

be the same as the number of Young diagrams with i squares! So these are the Gaussian coefficients[m + n

n

]q

= r0 + r1q + · · ·+ rmnqmn.

This leads to the following (after some work):

51

Page 52: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Theorem 163

L(m, n) is rank-symmetric and unimodular.

Let’s go back to looking at some examples! What is J([2] × [n])? We want the Young diagrams that fit inside a

2× n rectangle. This Hasse diagram looks like a triangle:

But let’s look at the order ideals of this triangular Hasse diagram: what is

J(J([2]× [n))?

Notice that the order ideals here correspond to shifted Young diagrams! So J(J([2] × [n])) is the poset of shifted

Young diagrams, ordered by inclusion, which fit inside a shifted Young diagram with n, n − 1, · · · , 1 boxes in the first

n rows.

It’s an exercise to see that this is also rank-symmetric and unimodular!

Theorem 164 (Sperner’s theorem, 1928)

Let S1, · · · , SM be different subsets of {1, 2, · · · , n}, such that for all i , j , Si 6⊆ Sj . Then M ≤(nn/2

).

How is this related to posets? A chain C in a poset P is a set of elements such that any two elements are

“compatible:” one is contained in the other, so we have a total ordering of C. An antichain A in P is the opposite:

no two elements are compatible.

Definition 165

Let P be a finite ranked poset with rank numbers r0, r1, · · · , rN . P is Sperner if M, the maximal size of an

antichain in P , is max(r0, · · · , rN).

It’s clear that M should be at least the maximum of r0, · · · , rN : just take all elements with some fixed rank. If this

is an equality, we have a Sperner poset.

Sperner’s theorem says that the Boolean lattice is Sperner: we’re just looking at the central binomial coefficient,

which is the maximal rank number of the Boolean lattice! We’ll do this proof next time, but here’s an example of a

non-Sperner poset, because the rank numbers are 3, 3 but there is an antichain of length 4:

52

Page 53: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

17 March 15, 2019Recall that we’ve been talking about ranked posets: given a poset P with a rank function ρ : P → Z≥ 0, we can

construct sets Pi = {x ∈ P | ρ(x) = i} of a given rank, and we let ri = |Pi | be the rank numbers.

We defined P to be rank-symmetric if ri = rN−i for all i and unimodal if the ranks increase to a point and

then decrease. We also defined Sperner posets to be those in which the maximal size M of an antichain in P is the

maximum among the ris.

Theorem 166 (Sperner’s theorem (1928))

The Boolean lattice Bn is Sperner.

There’s a property of posets that implies all three of the ideas above!

Definition 167

A saturated chain C has elements {x0 l x1 l x2 · · · }, so we can’t put anything between the elements of the

chain. In particular, the rank ρ(xi) = ρ(x0) + i . A symmetric chain decomposition (SCD) is a decomposition

of a poset P ’s elements into a disjoint union of saturated chains Ci such that for all chains Ci = {x0 l · · · l x`,ρ(x`) = N − ρ(x0).

For example, here is a poset that has a symmetric chain decomposition:

Lemma 168

If P has a symmetric chain decomposition, then it is rank-symmetric, unimodal, and Sperner.

Proof. Each chain contributes 1 to some set of rank numbers which is symmetric about the middle, so the rank

numbers will be symmetric. (The sum of palindromic vectors is palindromic). Unimodality is also obvious: the sum of

vectors that are unimodal and symmetric about the same mean is unimodal.

To show that it is Sperner, note that the middle rank is exactly the number of symmetric chains we have in our

symmetric chain decomposition: this is because we can write P = C1 ∪ C2 ∪ · · · ∪ Cm, and each chain intersects the

middle level exactly once (as they are saturated and symmetric about the middle). (If there are two middle levels, it’s

true for both.) The middle rank is the maximal rank number, and any antichain cannot contain two elements in the

same chain Ci . Thus the maximal size of any antichain is m, and we’re done!

53

Page 54: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Why is this an important lemma at all? Let [n] denote the poset with n elements in a chain.

Fact 169

Then the Boolean lattice Bn = [2]× [2]× · · · × [2] (n times).

For example, [2]× [2] is a square, [2]× [2]× [2] is the 1-skeleton of a cube, and so on.

Theorem 170 (de Bruijn, 1948 + generalization)

Bn has a symmetric chain decomposition! More generally, [a]× [b]×· · ·× [c ] has a symmetric chain decomposition

for any product of this form.

To show this, let’s use some sublemmas:

Lemma 171

[a]× [b] has a symmetric chain decomposition.

Here’s a proof by picture:

Lemma 172

If posets P and Q have symmetric chain decompositions, then P ×Q has a symmetric chain decomposition.

Proof. Let P = C1 ∪ C2 ∪ · · · ∪ Ck , and Q = C′1 ∪ · · · ∪ C′`, we can write P as a disjoint union of products of chains

P × J =⋃(i ,j)

Ci × C′j .

But each saturated chain Ci × C′j is of the form [a]× [b], and pick a symmetric chain decomposition for each Ci × C′jas we did in the lemma above! This gives a symmetric chain decomposition for the whole poset P .

Let’s go back to looking at finite posets in general. Given any poset P , remember that we define M(P ) to be

the maximum number of elements in any antichain of P . Define m(P ) to be the minimum number of disjoint chains

needed to cover all elements of P .

54

Page 55: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Theorem 173 (Dilworth, 1950)

For any finite poset P , M(P ) = m(P ).

There’s also a dual version of this theorem:

Theorem 174 (Minsky, 1971)

The statement is also true if you flip the words “chain” and “antichain” in Dilworth’s theorem.

In fact, there’s a generalization of this duality.

Definition 175

Given a poset P , define `k to be the maximum size of a union of k (not necessarily disjoint, not necessarily

saturated) antichains in P . For example, `1 is M(P ), the maximum number of elements in an anti-chain. Similarly,

define mk to be the maximum size of a union of k-chains in P .

Theorem 176 (Greene, 1976)

Define λ(P ) = (`1, `2 − `1, · · · ), and define µ(P ) = (m1, m2 −m1, · · · ). Then λ and µ are both partitions of n

that are weakly decreasing, and they are conjugates: their Young diagrams are transposes of each other.

For example, consider the following poset:

Here, we can cover 2, 4, 5 elements with 1, 2, 3 antichains, so

λ = (2, 4− 2, 5− 4) = (2, 2, 1) =⇒

Meanwhile, we can cover 3, 5 elements with 1, 2 chains, so

µ = (3, 5− 3) = (3, 2) =⇒

So Dilworth’s theorem just says that the first row of λ is the same as the first column of µ, and Minsky says the

same thing with row and column swapped!

But remember the Schensted correspondence: the shape λ of a Young diagram tells us something about increasing

subsequences in permutations. Well, we can make a poset out of permutations such that increasing subsequences are

chains, and decreasing subsequences are antichains!

55

Page 56: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

18 March 18, 2019Last time, we discussed a duality between chains and antichains of a poset: the Young diagrams formed were transposes

of each other. Prior to that, we had discussed the Schensted correspondence: every permutation w ∈ Sn can be sent

to pairs (P,Q) SYTs of shape λ, where the rows and columns tell you about increasing and decreasing subsequences.

Is there a relationship between these two ideas?

Given any w ∈ Sn, we can construct a poset P = {1, 2, · · · , n}, <p}, where our relation is

i <p j ⇐⇒ i < j and wi < wj .

Here the < on the right hand sides are standard “less than.” So i ≤p j if we don’t have an inversion between (i , j).

Example 177

Let’s take w = (3, 5, 2, 4, 7, 1, 6). The Schensted correspondence gives shape

The Hasse diagram for the associated poset then has 1 <p 6, 3 <p 5 <p 6, 4 <p 6, 5 <p 7, 3 <p 4 <p 7, 2 <p 7.

Notice that increasing subsequences correspond to chains, and decreasing subsequences correspond to antichains!

So Greene’s construction gives chain “numbers” of (3, 6 − 3, 7 − 1) = (3, 3, 1), and antichain numbers of (3, 5 −3, 7− 5) = (3, 2, 2), as we expect.

Remember that we used the Schensted correspondence to prove∑λ:|λ|=n

(f λ)2 = n!,

where f λ is the number of Standard Young Tableaux of a shape λ. Today, we’re going to do a simpler proof that is

more general!

Let’s look at Young’s lattice Y, which is isomorphic to J(Z≥0 × Z≥0), the lattice of order ideals in a quadrant.

Denote Yn to be the set of all Young diagrams with exactly n boxes: it’s the nth level.

Let p(n) = |Yn|, which is the number of ways we can write n as a sum (disregarding order), these are called the

partition numbers.

Proposition 178

A Standard Young Tableau of shape λ is a path or saturated chain in the Hasse diagram of Y from the empty

shape to λ.

This is because we add on a square each time we go up: place a 1 in the first box you add, then place a 2 in the

next one, and so on!

Meanwhile, in the Frobenius-Young identity and in the Schensted correspondence, we have pairs of Young tableaux,

so we have two paths from the empty Young diagram to λ. So let’s reverse the second path: let (P,Q) be a path inY from the empty shape back to itself with n up steps, followed by n down steps. We just want to count how

many ways we can do this!

56

Page 57: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Let’s formalize this algebraically. Let R[Yn] be the linear space of formal linear combinations of Young diagrams

with n boxes: for example, an element could be

+ e · − π · .

So R[Yn] is isomorphic to Rp(n), and

R[Y] =⊕n≥0R[Yn].

Define up and down operators: the up operator sends λ to

λ→∑µ:λlµ

µ.

In other words, µ has to be λ with a single box added. Similarly, the down operator sends µ to

µ→∑λ:λlµ

λ.

For example,

U

= +

and

D

= + .

So the number of (P,Q) of shape λ is the coefficient of ∅ (the bottom element in the poset, which is not zero!) in

DnUn∅. We’re trying to show that this is n!.

Proposition 179 (Key identity)

We have

[D,U] = DU − UD = I,

where I is the identity operator.

Why is this true? Consider the coefficient of µ in (DU − UD)λ. If λ 6= µ, and we want to get from λ to µ, we

have to add a box a and remove a box r , and these can be done in either order! (This is because a 6= r , or else λ

would be equal to µ.)

Meanwhile, if λ = µ, so we add a box and remove that same box, or we can remove a box and add that same box

back. The number of boxes we can remove is the number of inner corners, but the number of boxes we can add is the

number of outer corners! This is always a difference of 1, so we get a coefficient of 1 as desired.

57

Page 58: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Definition 180 (Stanley)

A differential poset is a ranked (infinite) poset with a unique minimally ranked element 0 such that we can define

up and down operators in the same way as we have done for Y:

[U,D] = I.

Combinatorially, this means that for any x, y not equal to each other on the same level, there are a ways to go up

and then down from x to y , and also a ways to go down and then up from x to y . Another way is to say that

#{u : u m x&u m y} = #{v : v l x&v l y}

On the other hand, for any individual element x :

#{u : u m x} = 1 +#{v : v l x}

Fact 181

These are called differential posets, because we can think of u as multiplying a polynomial f (x) by x , and d as

taking its derivative. Then

(du − ud)f (x) = f (x) =⇒ (xf (x))′ − xf ′(x),

which is true.

It turns out that this alone is enough to prove the Frobenius-Young identity!

Theorem 182 (Stanley)

For any differential poset,

DnUn0 = n!0.

Proof. First, we use the following lemma, which can be proved by induction:

Lemma 183

DUn = nUn−1 + UnD.

So now,

DnUn(0) = Dn−1(DUn)0

Applying the lemma, this is equal to

Dn−1(nUn−1 + UnD

)0

and now UnD0 gives us nothing, since D0 = 0. So we just have

Dn−1nUn−10 = nDn−1Un−10 = n(n − 1)!0

by induction!

One more question: Is this the only differential poset, or are there others? We will see!

58

Page 59: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

19 March 20, 2019

Recall that a differential poset is ranked with a minimal element 0, and we define up and down operators such that

[D,U] = DU − UD = I, where I is the identity operator. Combinatorially, this is equivalent to the following two

conditions:

• For any x 6= y in the same level, if there are a elements that cover both x and y , there are a elements covered

by x and y .

• For any x , there is one more element covering x than elements covered by x .

Fact 184

We found an example last time: Young’s lattice is a differential poset.

Are there other differential posets?

We know we must start with a unique minimal element 0. There must be exactly 1 element above 0, and then 2

elements above that. Now, for the two elements x and y we just constructed, we need one element to cover both x

and y , and then each of x and y need to add another extra edge.

Let’s see how we could construct the next (n+1th) level inductively: to satisfy the first condition of a differential

poset, reflect over the previous level’s edges. In other words, take the bipartite graph between the nth and n − 1thlevels, and flip it over the nth level. (This is not the only way, but it works.)

Now add in an extra edge to a new vertex for each one to satisfy the second condition. in other words, add an

edge above each element x on the nth level.

What’s the rank number - that is, how many vertices ri do we have? The numbers are 1, 1, 2, 3, 5, 8, · · · : these

are Fibonacci numbers by construction, since we add one vertex from each of the n− 1th level, and then add another

vertex from the nth level.

Theorem 185

This poset is a lattice! So any two elements have a well-defined meet and join.

This is called the Fibonacci lattice. Let’s compare this to Young’s lattice: the rank numbers there are 1, 1, 2, 3, 5, 7,

so from that point on, the numbers will be different. However, they have very similar properties! If we find the number

of walks from 0 up n steps and then down n steps, it turns out it is n! as well (since we only care about the identity

DU − UD = I.

Theorem 186

For any differential poset,

DnUn0 = n!0.

This follows from induction. But where is the n! actually coming from? If we look at

DD · · ·DDUU · · ·UU0.

We can think of them as particles and antiparticles. Each pair can collide or go past each other! Each D must collide

with one of the Us, because D0 gives zero contribution. So each D is matched with a U, and that means we really

have a permutation of n Ds!

59

Page 60: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

In general, we can pick any word with n U’s and n D’s:

DDUDUU0 = c 0.

What is this number? This counts the number of paths that go up, up, down, up, down, down. In this case, we have

a total of 4 paths, but is there a way to find c?

We have to match all Ds with Us, where each D matches with a U to its right, and our goal is to find the total

number of matchings.

Equivalently, we can describe this by a rook placement! First trace out a path from the bottom left to top right

of an n × n board by going right when we see a D and going up when we see a U, and draw the Young diagram: for

example, DDUDUU gives

and any rook placement gives us a valid annihilation! Specifically, we get a Young diagram of form ν = (ν1, · · · , νn),where the ith row is the number of Ds that appear before the n+1− ith U in our sequence. Then we just match the

corresponding Us and Ds in our rooks.

Theorem 187

The constant c in the equation

W 0 = c 0,

where W is a word of n Ds and n Us, is the number of placement of n non-attacking rooks in the shape ν.

Specifically, this is

νn(νn−1 − 1)(νn−2 − 2) · · · (ν1 − n + 1).

Proof. Just start by placing a rook on the bottom row! There’s νn choices. Then we can place a rook on the next

row in any of the remaining columns in νn−1 − 1 ways, and so on.

So let’s go back to the unimodality of Gaussian coefficients. Recall the Gaussian coefficients an in the equation[k + l

l

]q

=

kl∑n=0

anqn.

We found by the Young diagram complement idea that these are symmetric. The following was first formulated by

Cayley in 1856 and proved by Sylvester in 1878:

Theorem 188 (Unimodality of the Gaussian coefficients)

We have a0 ≤ a1 ≤ · · · ≤ ab kl2c ≥ · · · ≥ akl .

Proof. Let P be the product poset [k ]× [l ]. Then the lattice of order ideals of P (as we know) is the lattice of Young

diagrams that fit inside a k by l rectangle

J(P ) ∼ L(k, l).

Denote J(P )n to be all Young diagrams in J(P ) on the nth level (with n boxes). Our goal is to show that the number

of elements in J(P )n+1 ≥ J(P )n as long as n < kl2 .

For λ ⊂ J(P )n, let us denote Add(λ) to be all boxes x ∈ P such that λ∪ {x}m λ. Similarly, define Remove(λ) to

be all boxes y ∈ P such that λ \ {y}l λ. Remember that in Young’s lattice, the number of addable boxes is always

60

Page 61: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

one more than the number of removable boxes: this is no longer true because we can’t add boxes outside of our k × lrectangle.

Here’s a key fact:

Lemma 189

Fix n, k, l . Suppose we have a function w : P → R>0 such that for any λ ∈ J(P )n, we have∑x∈Add(λ)

w(x) >∑

y∈Remove(λ)

w(y).

Then the number of elements in J(P )n+1 is at least the number of elements in J(P )n.

Here’s an example of a weight function:

12 12 10 6

10 12 12 10

6 10 12 12

We can check that this works for all n < 6. Let’s prove the lemma, but we’ll need some more general up and down

operators: consider the weighted up and down operators

U : λ→∑

µ=λ∪{x},x∈Add(λ)

√w(x) · µ

and

D : λ→∑

µ=λ\{y},y∈Remove(λ)

√w(y) · µ.

We can think of these as linear operators: it is clear that D = UT are transpose matrices.

Claim 190. H = [D,U] = DU − UD is a diagonal matrix. It sends H from λ to ∑x∈Add(λ)

w(x)−∑

y∈Remove(λ)

w(y)

λ.It’s diagonal because (as before), adding a box and removing another box can be done in either order. On the

other hand, if we want to get back to ourself, we can add any box and remove it, which gives√w(x)

2= w(x), or

remove any box and add it back, which gives w(y).

What can we do with this? Here’s a property of linear algebra: since D = UT ,

DU = UD +H = UUT +H.

UUT is positive semi-definite, and H is a positive definite matrix, so this means DU must be positive definite! Therefore,

DU has positive determinant. We’ll see the rest of the details in the next lecture!

61

Page 62: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

20 March 22, 2019Let’s go back to the unimodality of the Gaussian coefficients - the easiest proof is to use linear algebra instead of a

combinatorial proof. Remember that we consider[k + l

k

]q

= a) + a1q + · · ·+ aklqkl ,

and we want to show the coefficients are increasing and then decreasing.

The idea is to consider Vn, the linear space of formal linear combinations of Young diagrams λ in a k by l rectangle

with n squares. The dimension is just an, the number of possible Young diagrams, and our goal is to show that

ai ≤ ai+1 for all i < kl2 : by symmetry of the coefficients, we get the result.

Consider a weighted up operator Un : Vn → Vn+1 which sends

λ→∑

µ=λ∪{x}µmλ

√w(x)µ,

where w is a weight function sending boxes of k × l rectangles to positive reals. Similarly, we consider the weighteddown operator Dn : Vn+1 → Vn, sending

λ→∑

µ=λ\{x}µlλ

√w(x)µ.

Define our commutator

Hn = DnUn − Un−1Dn−1;

notice that this takes any element in Vn to another element in Vn. We can represent Un with an an+1 by an matrix,

and we can represent Dn by its transpose: UTn .

Fact 191

They are transposes, because all nonzero entries in Un have√x in the entry (a, b), where a and b differ by the

box x , and entries in Dn have√x in the entry (b, a).

Claim 192. Hn is a diagonal matrix with entries

(Hn)λ,λ =∑

x∈Add(λ)

w(x)−∑

y∈Remove(λ)

w(y).

Why is this? The off-diagonal entries mean we start with a Young diagram, add a box, and remove a different box:

this is equivalent to first removing the other box and then add it, so those always cancel out. Meanwhile, the diagonal

entries get a√w(x)

2= w(x) contribution.

Here’s a diagram: the As are part of Add(λ), while the Rs are part of Remove(λ).

R A

A

R

So let’s assume we can find a weight function w so that the matrix Hn has positive diagonal entries: thus, the

eigenvalues are all positive. Then

DnUn = Un−1Dn−1 +Hn = Un−1UTn−1 +Hn.

62

Page 63: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Un−1UTn−1 is positive semi-definite (since for any matrix A, xAAT x is the square of the standard dot product of AT x

with itself), and Hn is positive definite, so their sum is positive definite (this is a fact from linear algebra!) This means

DnUn has nonzero determinant, and therefore the rank of DnUn is an.

Fact 193 (Other linear algebra fact)

Let A be an m×n matrix and let B be an n×k matrix. Then the rank of AB is less than the minimum of m, n, k ,

since rank can’t increase with products or be larger than the dimensions of the matrices!

So the rank of DnUn is an, but Dn is an an× an+1 matrix and Un is an+1× an. So an ≤ min(an, an+1) and therefore

an ≤ an+1, as desired! So as long as we can find a weight function, we are good.

Well, define w : [k ]× [l ]→ R>0 as

w(i , j) = (i − j + l)(j − i + k), 1 ≤ i ≤ k, 1 ≤ j ≤ l .

Example 194

Here it is for k = 3, l = 4:

12 12 10 6

10 12 12 10

6 10 12 12

Note that all of these are of the form n(7− n), and it is larger closer to the centers.

We claim that this weight function works! Here’s why:

Lemma 195

For all λ contained in a k × l box,

wλ =∑

x∈Add(λ)

w(x)−∑

y∈Remove(λ)

w(y) = kl − 2|λ|.

So this is positive as long as n = |λ| < kl2 .

This will be an exercise! In the diagram above, the sum of the As is 18, while the sum of the Rs is 16.

Let’s shift gears now and talk about partitions. Recall that p(n) is the number of partitions of n, which is the

number of Young diagrams with n boxes.

Theorem 196

The generating function ∑n≥0p(n)qn =

1

(1− q)(1− q2)(1− q3) · · · .

Expanding this out, it is

(1 + q + q2 + · · · )(1 + q2 + q4 + · · · )(1 + qn + · · · )

and it’s okay to only go up to the first n terms, since all other terms will have a higher power! So we can always

truncate this to a finite product with finite terms.

63

Page 64: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Proof. We know that [k + l

k

]q

=∑λ⊆k×l

q|λ|.

Take the limit as k, l → ∞. Then we’re summing over all Young diagrams, and just expand out the q-binomial

coefficient!

A better proof. We can encode our partition λ = (λ1 ≥ λ2 ≥ · · · ) by a different set of integers: let mi be the

number of times i appears in λ, that is, the number of js such that λj = i . Then we can encode the multiplicities niλ = (1m12m2 · · · ).

So now, a partition (6, 4, 4, 3, 1, 1) is now encoded via (122031425061), which corresponds to picking out the q2

term in (1 + q + q2 + · · · ), the 1 term in (1 + q2 + q4 + · · · ), the q3 term in (1 + q3 + q6 + · · · ), and so on! More

rigorously, the sum ∑n≥0p(n)qn =

∑m1,m2,···≥0

= qm1+2m2+3m3+···

can be factored as ∑m1

qm1 ·∑m2

q2m2 ·∑m3

q3m3 · · ·

which is just1

1− q1

1− q2 · · ·

as desired.

There are also some special classes of partitions.

Definition 197

Define podd(n) to be the number of partitions of n into odd parts: λ = λ1 + λ2 + · · · , where all λi are odd.

This means mi = 0 for all even i , and the generating function is

1

1− q ·1

1− q3 ·1

1− q5 · · · .

Definition 198

Define pdist(n) to be the number of partitions of n into distinct parts: we have λ = (λ1 > λ2 > · · · ).

This means mi ≤ 1 for all i , so the generating function is

(1 + q)(1 + q2)(1 + q3) · · · .

Theorem 199 (Euler, 1748)

podd(n) = pdist(n).

For example, for n = 5, we can break it into odd parts as 5 = 3 + 1 + 1 = 1 + 1 + 1 + 1 + 1, and we can break it

into distinct parts as 5 = 4 + 1 = 3 + 2.

64

Page 65: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Proof. Our goal is to check that the generating functions above are equal! Take the generating function for pdist: it is

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

(1 + q2)(1− q2)1− q2 ·

(1 + q3)(1− q3)1− q3 · · ·

=(1− q2)(1− q4)(1− q6) · · ·(1− q)(1− q2)(1− q3) · · · =

1

(1− q)(1− q3)(1− q5) · · · ,

which is the generating function for podd as desired.

There’s also a combinatorial proof! This is left as an exercise as well.

Theorem 200 (Euler’s pentagonal number theorem, 1750)

We have1∑

n≥0 p(n)qn= (1− q)(1− q2)(1− q3) · · · =

∞∑m=−∞

(−1)mqm(3m−1)/2.

This basically counts the number of partitions with even versus odd parts and finds their difference: apparently this

is 0 for almost all values of n. Numbers of the form m(3m − 1)/2 are called pentagonal numbers, because it’s the

number of dots in successive dilations of a pentagon!

21 April 1, 2019Hopefully all of us had a good spring break! Let’s quickly review material from last class.

We started talking about partition theory last time: letting p(n) be the number of partitions of n, we can write a

generating function ∑n≥0p(n)qn =

1

(1− q)(1− q2)(1− q3) · · · .

Last time, we started discussing the reciprocal of this quantity: let f (q) = (1− q)(1− q2) · · · .

Theorem 201 (Euler’s Pentagonal Number Theorem, conjectured 1741, proved 1750)

We have the following form for f (q):

f (q) =

∞∑m=−∞

(−1)mqm(3m−1)/2.

A few terms of this infinite sum are

1− q − q2 + q5 + q7 − q12 − q15 + q22 + q26 · · · .

This is surprising because we expect that there’s a lot of different possible coefficients in the infinite product. But

it turns out that a lot of terms end up having complete cancellation, and a few others have ±1s! Here are a few

pentagonal numbers, by the way:

m 1 2 3 4m(3m−1)

2 1 5 12 22

So we get these values, but also contributions from negative values of m.

65

Page 66: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Proposition 202 (Gauss)

We also have

(f (q))3 =

∞∑m=−∞

(−1)m ·m · qm(m+1)/2.

Here the coefficients are no longer ±1, but they’re pretty simple. Also, we still have pretty sparsely populated

coefficients!

Fact 203

Unfortunately, f (q)2 is a total mess. There isn’t quite a simple expression for f (q)2, and there’s a deep represen-

tation theory reason for that!

Remember that we also discussed different ways to represent our partition: we can either write it as

λ = (λ1, λ2, · · · )

in non-increasing order, or as

λ = (1m12m2 · · · )

as multiplicities, where mi is the number of parts of λ equal to i . Then we can expand out our product:

(1− q)(1− q2) · · · =∑

m1,m2,···qi∈{0,1}

(−1)∑miqm1+2m2+3m3+···

where mi being 0 corresponds to picking 1 in the product, and mi being 1 corresponds to picking qmi . This can be

written in another way: since all mis are 0 or 1, we only pick each number i at most once. So this counts partitions

with distinct parts: ∑partitions λ

with distinct parts

(−1)parts in λq|λ|.

This lets us write Euler’s pentagonal number theorem slightly differently:

Theorem 204

Let pevendist (n) (resp. podddist(n)) be the partitions of n with distinct parts and an even (resp. odd) number of parts.

Then

pevendist (n)− podddist(n) =

(−1)n n = m(3m−1)2

0 otherwise.

To prove this, we want to somehow set up a matching between partitions with an even and odd number of parts,

and (almost always) perfectly pair them! This is related to the involution principle!

Proof by Franklin, 1881. An involution is a function f whose square is the identity (that is, it is its own inverse). Our

goal is to find an involution σ on almost all partitions of n with distinct parts, such that σ sends a partition with an

odd number of parts to an even number of parts and vice versa. Rigorously, if µ = σ(λ), µ and λ should have different

parities of the number of parts.

66

Page 67: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

We’ll try to construct σ so that it always either adds or removes a part to λ. Consider the shape

λ =

Denote the yellow part, which is the last row, as A, and denote the blue part, which is the longest diagonal segment

starting from the top right corner, as B. Denote a = |A| and b = |B| (in this case, a = 4, b = 3).

Fact 205

Remember that there’s nothing beyond B, because our partition has distinct parts.

Here’s how we’ll construct σ:

• If a > b, like in this case, we remove the diagonal segment B and adding it as a new row with b boxes:

λ′ =

• If a ≤ b, remove the last row and add a new diagonal segment! For example, take λ′ and adjust it back to λ.

Here’s a few more examples: for λ = (7, 6, 3),

σ⇐⇒

and for λ = (7, 6, 5, 4, 2),σ⇐⇒

But we have to be a little bit careful: we’re supposed to have some special cases! We have a problem if the yellow

and blue segments, A and B, overlap. Our operation actually still works except when a = b or a = b+1! For example,

consider a = b = 4 or a = 4, b = 3:

,

So we can call these the “pentagonal cases!” These turn out to be exactly the m(3m−1)2 terms, as desired.

67

Page 68: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Theorem 206 (Jacobi’s Triple Product Identity, 1829)

The infinite product ∏n≥1(1− q2n)(1 + q2n−1z)(1 + q2n−1z−1) =

∞∑r=−∞

qr2

z r .

This identity has many special cases!

Corollary 207

If we take z = −x1/2 and q = x3/2, the left hand side becomes the left side of Euler’s theorem, and this yields

Euler’s pentagonal formula.

Also, if we take z = −x, q = x1/2, we get Gauss’ formula for (f (q))3.

Finally, if we plug in z = −1, we find that

∏m≥1

1− qm

1 + qm=

∞∑r=−∞

(−1)rqr2 .

Proof sketch. Substitute q → q1/2 (so the first term has all even powers) and z → qz . Then the triple product

identity is equivalently written as (moving the∏(1− q2n) to the other side)

∏n≥1(1 + zqn)(1 + z−1qn−1) =

( ∞∑r=−∞

z rqr(r+1)/2

1∏n≥1(1− qn)

.

Let’s try to interpret this combinatorially! The first term on the left side counts partitions with distinct parts, with

z keeping track of the number of parts. So the coefficient of za for the first part of the left hand side is the generating

function ∑µ partition witha distinct parts

q|λ|,

and the coefficient of z−b for the second part is ∑ν partition withb distinct parts

q|λ|−b,

since there’s a qn−1 in the product.

So somehow we want to relate µ and ν to all partitions λ! We’ll go over this next time.

22 April 3, 2019Recall that last lecture, we formulated the Jacobi Triple Product identity, which can be written equivalently in the

following form: ∏n≥1(1 + zqn)

∏n≥1(1 + z−1qn−1) =

∞∑r=−∞

z rqr(r+1)/2∏n≥1

1

1− qn .

Let’s do a combinatorial proof of this identity! Each of the products has a combinatorial interpretation in terms of

certain partitions.

68

Page 69: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Proof. First of all, the first product’s coefficient of za is∑µ partition

with a distinct parts

q|µ|,

and the second product’s coefficient of z−b is ∑ν partition

with b distinct parts

q|ν|−b|,

since the power is n − 1, not n. Finally, the product on the right is the usual generating function for all partitions:

somehow we want to combine different partitions together. So we want a bijection between

(a, b, µ, ν)→ (r, λ).

where µ has a distinct parts and ν has b distinct parts. We also need to make sure the monomials match up: looking

at powers of z , a − b = r , and looking at powers of q, |µ|+ |ν| − b =r(r + 1)

2+ |λ| .

Since µ and ν have distinct parts, we can represent them with shifted Young diagrams instead! For example, if

µ = (7, 6, 4, 3, 1) and ν = (6, 5, 3), then our Young diagrams look like

µ = ·····

, ν = ···

.

We’re going to transpose ν and remove its b diagonal boxes:

ν ′ =

Now, take µ and ν ′ and glue their last dots together! This now looks like

·····

.

69

Page 70: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

With this, we can now chop off the first two columns off: our partition λ is now

λ = = (5, 5, 4, 4, 3, 3, 3, 2).

We claim that this is the bijection that we want! The number of columns we chop off is a − b = r , and counting the

total number of boxes, we started with |µ| + |ν| boxes, but then we removed all b diagonal boxes from ν: this yields

the left hand side. That left us with |λ|+ 1 + 2 + · · ·+ r boxes, which is the desired right hand side!

We might not be convinced: what if a < b? We have to make a small edit, and we’ll do that by construction. If

µ = (5, 4, 2) and ν = (9, 8, 7, 4, 3, 1), then our shifted Young diagrams look like

µ = ···

, ν = ······

.

Transposing and removing boxes, we have

ν ′ =

and after gluing, our shape is

which yields (after chopping)

λ = = (8, 8, 7, 5, 3, 3).

We need to make sure the identity still works: the total number of boxes here is |µ|+ |ν| − b, but now the size of the

triangle is b− a−1 (since our triangle is now below the dots)! So we have a small triangle that we chopped off, which

70

Page 71: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

is (−r−1)(−r)2 = r(r+1)2 squares, so the same identity holds.

Why is this a bijection? We need to know how to invert this from λ and r : attach a small triangle to the left or

top of λ based on the sign of r , and then we chop along the diagonal. This gives us µ and ν ′, which can give us µ

and ν, which tells us our original partitions and a and b as well!

Let’s move on to the next topic of this class. We’ve been talking about Young diagrams and partitions a lot so far

- in this second half, we’ll start to discuss graphs, networks, and trees! (Graphs are objects with vertices and edges.)

Definition 208

A labeled tree is a connected graph on n nodes with no cycles, where the nodes are labeled 1, 2, · · · , n. Unlabeledtrees are the analogous object where the nodes are not labeled.

Example 209

There are 3 labeled trees on 3 vertices: put 1, 2, 3 at the vertices of an equilateral triangle, and remove one of

the edges. However, there is only 1 unlabeled tree on 3 vertices: it is a path.

Turns out we have an explicit formula for the number of trees:

Theorem 210 (Cayley’s formula)

The number of labeled trees on n nodes is nn−2.

These numbers nn−2 also appear pretty often! This is probably the next most famous set of numbers after Catalan

numbers, and there are many combinatorial interpretations.

Fact 211

In mathematics, there’s a law that mathematical formulas are never named after the person who discovered it.

Cayley wrote a paper in 1889, but the same result was given by Borchord in 1860 and Sylvester in 1857.

Cayley didn’t actually give a complete proof: it’s not a very trivial formula, but Professor Postnikov wants to show

his favorite proof, which is probably the shortest one!

Proof by Rényi, 1967. We’re going to use induction (?!?!). It’s kind of hard to get nn−2 from smaller versions of itself,

though... let’s do a generalization! Let’s prove the more general result:

Definition 212

Define the weight of a tree T to be a monomial xT ≡ xdeg(1)−11 x

deg(2)−12 · · · xdeg(n)−1

n .

Notice that leaves have exponent 0. Now define

Fn(x1, · · · , xn) =∑

labeled trees onn vertices

xT .

We claim that this quantity is equal to (x1 + · · · xn)n−2, and notice that Cayley’s formula follows by setting all

xi = 1. The idea is that the inductive hypothesis is now stronger, so we can actually use induction! Define Rn =

Fn − (x1 + · · ·+ xn)n−2; our goal is to show that Rn = 0.

This is easy to check for base cases n = 1, 2. Now let’s make some observations:

71

Page 72: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

• Rn is a polynomial in x1, · · · , xn of degree ≤ n− 2. This is because the second term has degree n− 2, and every

monomial has degree n − 2: there are n − 1 edges, and each one contributes to 2 exponents (the endpoints of

the edge), and the −1s in the definition of xT subtract n, for a total degree of 2(n − 1)− n = n − 2.

• For any i = 1, 2, · · · , n, if we initialize xi = 0, Rn evaluates to 0. To prove this, we can assume i = n by

symmetry: set xn = 0, and now all xT die except for those where the degree of n is 1: that is, n is a leaf! So

Fn evaluated at xn = 0 is ∑T :n leaf

xT =∑

T ′ with n−1 nodes

xT′(x1 + x2 + · · ·+ xn−1)

since there are n − 1 ways to connect n to one of the other vertices. By the induction hypothesis, this is

Fn−1(x1 + · · ·+ xn−1), so Rn|xn=0 = Rn−1(x1 + · · ·+ xn−1) = 0.

• But now we’re done: if f (x1, · · · , xn) is a polynomial on n variables of degree at most n − 1, and x1, x2, · · · , xnare all factors, then the polynomial must be 0.

This almost feels like cheating! We used almost no properties of trees at all. We’ll talk a bit more about this next

time!

23 April 5, 2019

Recall that we started talking about the Cayley formula last week: the number of labeled trees on n vertices is nn−2.

We gave a proof last time, and we’ll review it in more detail today.

Consider the polynomial

Fn(x1, · · · , xn) =∑

T tree on [n]

n∏i=1

xdeg(i)−1i .

The degree of a vertex in any graph is the number of edges adjacent to that vertex. Then we wish to show the

following result:

Theorem 213

Fn = (x1 + · · ·+ xn)n−2.

Proof. We want to show that Rn = Fn − (x1 + · · · + xn)n−2 is identically zero. We do this by induction: this is true

for n = 1, 2.

First of all, Rn is either a homogeneous polynomial in our variables x1, · · · , xn of degree n − 2 or zero. This is

because each monomial in the sum has total degree∑(deg(i))− n, which is (2n − 2)− n = n − 2.

Now, if we pick any 1 ≤ i ≤ n and evaluate Rn at xi = 0, then we have

Rn−1(x1, · · · , xi−1, xi+1, · · · , n)(x1 + · · ·+ xi−1 + xi+1 + · · ·+ xn).

(we can denote this “skipping” of xi as xi as well). This is because all terms disappear except those where i has degree

1, so it’s a leaf: this can be constructed by having a labeled tree on the other n − 1 vertices and then adding the leaf

anywhere!

But the right hand side is 0 by induction, so that means that f when evaluated at xi = 0 is always 0. Now assume

that our polynomial f is not equal to zero: then it contains at least one monomial of the form xa11 · · · xann . Since the

72

Page 73: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

polynomial Rn has degree n − 2, a1 + · · · + an ≤ n − 1: this means there exists an i with ai = 0 in that monomial.

But when we evaluate this at xi = 0, that monomial survives, and therefore Rn 6= 0: contradiction! So Rn must just

be the zero polynomial, which yields what we want.

(Alternatively, xi is a factor for all i , so Rn must contain a factor x1x2 · · · xn, which has degree larger than Rn unless

Rn = 0.)

Corollary 214

Setting all xi = 1, the number of trees on n vertices is nn−2.

We have barely used any properties of trees here, so it’s a bit hard to believe! In combinatorics, we like to give a

bijective proof, so let’s try to construct a bijection between trees and objects whose object is nn−2.

There are several bijective proofs that exist: let’s go through a few of them.

Proof by Prufer, 1918. We’re going to set up a bijection between trees T on n vertices and sequences (c1, · · · , cn−2),where all ci ∈ [n]! Clearly the latter has nn−2 possible elements. This sequence is called the Prufer code.

We’ll write out the procedure and then do an example.

• Find the leaf (vertex with degree 1) v with the minimal possible label. Any tree with at least 1 vertex contains

a leaf.

• Record (in the code) the label that v is attached to in our tree.

• Remove v (and the adjacent edge) from T .

• Repeat these three steps a total of n − 2 times!

As an example, consider the following tree:

12

3

7 8

45

6

Initially, the smallest leaf has label 2, and it is attached to 8, so we write down 8 : now we erase label 2.

1 3

7 8

45

6

Now, the minimal leaf is 3, and it is attached to 1, so we write down 1 .

73

Page 74: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

1

7 8

45

6

Next, the minimal leaf is 4, and it is attached to 5 :

1

7 8

56

6 is attached to 5 :

1

7 8

5

5 is attached to 1 :

1

7 8

Finally, 1 is attached to 8 :

7 8

and now we’re done: our Prufer code is (8, 1, 5, 5, 1, 8) . To show this is actually a bijection, we need to be able

to invert our construction!

Notice that our vertex 5 has degree 3 originally: it appears twice in the code. Similarly, 1 has degree 3 and appears

twice in the code.

Fact 215

Basically, every vertex appears deg(v)− 1 times in our code!

This is because every time we erase an edge to i , we record i down, except when i is a leaf: then it is removed and

its neighbor is recorded instead.

So the labels that don’t show up in the Prufer code are exactly the leaves in our tree! Here’s the decoding process:

let’s say we’re given (c1, · · · , cn−2) as our initial Prufer code.

• Initially, set (c1, · · · , cn−2) to be our Code, and set Labels to be {1, 2, · · · , n}.

74

Page 75: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

• Find the minimal leaf by finding the smallest element ` of Labels that is not in Code. Connect ` to the first

element c of Code (because this was the first step of our coding process: we removed the smallest leaf and

recorded its neighbor).

• Remove ` from Labels and c from Code.

• Repeat these steps a total of n− 2 times until Code is empty. Now we’ve connected everything except our final

edge.

• There are now two labels left: connect them!

So let’s try doing this in reverse: we start with our Prufer Code (8, 1, 5, 5, 1, 8) and Labels {1, 2, 3, 4, 5, 6, 7, 8}.The minimal element that doesn’t appear is 2, so connect 2 to 8.

12

3

7 8

45

6

Now Code is (1, 5, 5, 1, 8) and Labels is {1, 3, 4, 5, 6, 7, 8}. Now connect 3 to 1:

12

3

7 8

45

6

Now just continue this process! We connect 4 to 5, and then 6 to 5, and now 5 is connected to 1, 1 is connected

to 8, and we finish by connecting 8 and 7. This constructs our original tree, as desired!

Notice that this gives us more than just the bijection.

Proposition 216

If we fix d1, · · · , dn ≥ 1, then the number of labeled trees on n vertices with degrees d1, · · · , dn for vertices

1, 2, · · · , n is the number of codes where i appears di times:(n − 2

(d1 − 1), (d2 − 1), · · · , (dn − 1)

),

as long as d1 + · · ·+ dn = 2n − 2.

There are a lot of other combinatorial proofs: here’s one more.

Proof by Egecioglu-Remmel, 1986, based on Joyal 1981. Let’s assume that node 1 is the “root of the tree:” orient all

edges of our graph towards the root. Let’s use this tree as an example:

75

Page 76: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

1 7 3 8 13 4 10 15

9 12 2 11

5

14 6

The path from our maximal element 15 to 1 is a partial permutation

P = 15, 10, 4, 13, 8, 3, 7, 1.

Mark all left-to-right minima: this is 15, 10, 4, 3, 1, and now we’ll break up our partial permutation into cycles:

P = (15)(10)(4, 13, 8)(3, 7)(1).

Now erase our path, and replace it with a cycle! So our path now becomes a loop at 15, a loop at 10, a cycle between

4, 13, 8, a cycle between 3 and 7, and a loop at 1.

Notice that we will always have a loop at 1 and a loop at 15. Now notice that there’s still exactly one edge coming

out of each vertex, so now we can define a function f such that f (i) = j if i points to j . This is a map from [n] to [n]

that fixes 1 and n, so there are exactly nn−2 such functions.

Turns out this is a bijection between all trees on n nodes and all maps f ! This is a lot like transforming cycle

notation to one-line notation and vice versa: we’ll discuss this a bit more next time.

24 April 8, 2019Problem sets were returned - we’ll be going over some problems today.

Problem 217

Show that the number of noncrossing partitions of {1, 2, · · · , n} is the Catalan number Cn.

Solution by Vanshika. We construct a bijection between a Dyck path of length 2n and a noncrossing partition of [n].

As an example, consider the partition where 1 and 3 are connected, 4, 7, 8 are connected, and 5, 6 are connected. The

idea is that every element should correspond to 2 letters in our Dyck path, so for each partition, draw an extra line

from the first to last number in the partition (so now we have closed cycles). If there’s two arcs to the right, we write

“UU,” if there’s two arcs to the left, we write “DD;” if there’s no arc, we write “UD,” and if there’s an arc going to and

coming out of the number, we write “DU.”

This is a Dyck path because we can’t end an arc before we start it! To reverse it, take each D from left to right

and connect it to the nearest U before it, removing duplicates.

Solution by Sanzeed. Mark all of the “up” steps in order from 1 to n in a Dyck path of length n, and now match the

down steps by finding the corresponding “levels.” Then every maximal continual sequence of down steps is in its own

partition! To reverse this, arrange partitions in descending order, and insert a partition {a1 > a2 > · · · } right after the

a1th up step.

76

Page 77: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Problem 218

Find a closed formula for the number of saturated chains from the minimal element 0 = (1|2| · · · |n) to the maximal

element 1 = (1 · · · n) in the partition lattice Πn.

Proof by Congyue. A saturated chain corresponds to merging elements in some order: for example, we can go from

(1|2|3|4|5) to (12|3|4|5) to (124|3|5) and so on. At the beginning, we have n blocks, so we need n− 1 steps to finish

the process.

On the kth step, there are(n−k+12

)ways to merge blocks, since we have n − k + 1 blocks. Thus, our answer is

n−1∏k=1

(n − k + 12

)=(n − 1)!n!2n−1

.

Problem 219

Find a bijection between partitions with odd distinct parts and self-conjugate partitions.

Solution by Sophia. Consider the Young diagram representation of a partition. Bend each odd/distinct partition at

the middle and join them together along the diagonal! For example,

(6, 4, 4, 4, 1, 1) = ⇐⇒ (11, 5, 3, 1) =

This is reversible, so we do have a bijection.

Problem 220

Find the number of paths in Young’s lattice that take 2n steps from 0 back to itself.

Solution by Yogeshwar. Consider the words of length 2n with n U’s and n D’s: for each one, we need to sum up∑W word

W 0.

Recall that for a sequence of U’s and D’s, such as

DDUDUU0,

each “up” needs to be matched with a “down” to its left: if we have any word, that just means we can match each U

with any D as we want. So if we have the numbers 1, 2, · · · , 2n, there’s 2n − 1 ways to match 1, then 2n − 3 ways

to match the next number in the list that hasn’t been matched, then 2n− 5, and so on, which yields a final answer of

(2n − 1)!!.

77

Page 78: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Problem 221

Show that the Bell number is given by

B(n) =1

e

∞∑k=0

kn

k!.

Solution by Wanlin. From class, we have that

xn =

n∑m=0

S(n,m)(x)m

where (x)m denotes the falling power of x . Replacing x by k ,

kn =

n∑m=0

S(n,m)

(k

m

)m!.

This is also equal to (due to constraints on S and the binomial coefficient)

=

k∑m=0

S(n,m)

(k

m

)m!

and plugging this in, we’re trying to show that

B(n) =1

e

∞∑k=0

k∑m=0

S(n,m)(km

)m!

k!

and now a lot of things cancel:

=1

e

∞∑k=0

k∑m=0

S(n,m)

(k −m)!

Switching the order of summation,

=1

e

∞∑m=0

∞∑k=m

S(n,m)

(k −m)! =∞∑m=0

S(n,m) =

n∑m=0

S(n,m),

which is exactly the Bell number.

Problem 222

Find a bijection between distinct partitions and odd partitions.

Solution by Sarah. Let’s say we have a partition with all distinct parts, λ = λ1 + · · ·+ λn, where λi = λoddi 2

mi . Then

we turn this into λodd1 with multiplicity 2m1 , and so on.

To do the reverse, start with an odd partition n = λa11 λa22 · · · (where the exponents are multiplicity). For each a,

write it in base 2 and expand it as a sum of powers of 2: λa11 then becomes∑λ1 · 2m, where

∑2m = a1.

Problem 223

Construct a non-recursive description of the Fibonacci lattice.

78

Page 79: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Solution by Chiu Yu-Cheng. First of all, we show that the number of compositions of n with all parts equal to 1 or 2

is the Fibonacci number Fn+1: this is because we either start a composition with 1 or 2 and then fill in the rest in Fn−1or Fn ways by induction.

Now, consider a graph where every vertex is a composition of n with 1s and 2s. Two vertices v1, v2 are connected

if v2 is obtained by v1 by either (1) inserting a 1 anywhere to the left of the leftmost 1 in v1 or (2) changing the

leftmost 1 to a 2. Similarly, v1 is obtained from v1 by either (1*) removing the leftmost 1 or (2*) chanigng a 2 to a

1, when 2 is on the left of the leftmost 1.

We claim this graph is isomorphic to the Fibonacci lattice. Two vertices are only connected if the sum of the

composition parts differ by 1, so we can define the rank to be that sum. To show this the isomorphism, we need

to show that for any v1 6= v2 with some rank n, the number of common upper neighbors is equal to the number of

common lower neighbors, and for every v1, it has one more upper neighbor than lower neighbor. This was how we

defined the Fibonacci lattice!

If v1 and v2 are different, a common neighbor must be applied by having one apply 1* and the other apply 2* to

get a lower neighbor, or having one apply 1 and the other apply 2 to get an upper neighbor. So some vertex v ′ is

obtained by 1* on v1 and 2* on v2, we can also apply 2 to v1 and 1 to v2 to get a v ′′, so there’s a bijection between

upper and lower neighbors.

On the other hand, if v1 has i copies of 2 to the left of its leftmost 1, there will be i lower neighbors and i + 1

upper neighbors if there is no 1, and there will be i +1 lower neighbors and i +2 upper neighbors if there is a 1, which

finishes the construction.

Finally, we want to show that this is actually a lattice. Note that a ≤ b if and only if there is a walk with only upper

steps from a to b: it’s not hard to check that this satisfies the poset axioms. We define “join” as follows: if either of

x and y start with 1, there is a unique lower neighborhood, so x ′ ∧ y = x ∧ y . Meanwhile, if they both start with a 2,

the subgraph starting with 2 is isomorphic to the initial graph, so we can just ignore the first term of the composition

and do the rest by induction. Similarly, to find meet, every element of rank at most 2n with n pieces can work up to

2, 2, 2, · · · , so this is a common upper neighbor, and then we can work down from there.

25 April 10, 2019We’re going to continue with problem presentations today.

79

Page 80: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Problem 224

Show that the Bell numbers can be calculated using the Bell triangle:

1

1 2

2 3 5

5 7 10 15

15 20 27 37 52...

......

......

In this triangle, the first number in each row (except the first row) equals the last number in the previous

row; and any other number equals the sum of the two numbers to the left and above it. The Bell numbers

B(0) = 1, B(1) = 1, B(2) = 2, B(3) = 5, B(4) = 15, B(5) = 52, · · · appear as the first entries (and also the last

entries) in rows of this triangle.

Solution by Fadi Atieh. We’ll prove this by induction: the induction case is easy, because B0 = B1 = 1. Now looking

at the induction step, assume that we have already built k rows of this triangle. We know that the leftmost entry is

Bk−1, and the right-most entry is Bk , so the k + 1th row begins with Bk . The next entry is Bk + Bk−1, and notice

that we can recursively push our numbers up and to the left until we reach the left diagonal. We just need to figure

out the actual recurrence relation!

Well, if we try to construct Bk+1, the rightmost entry in the k + 1th row, we can sum it by taking some left and

up steps to the diagonal. To get to Bi , we need i left steps and k − i up steps, which means

Bk+1 =

k∑i=0

(k

i

)Bi .

This is the recursive formula for bell numbers, because we pick some i numbers in our partition to be in the same

partition as k + 1.

Problem 225

Show that the Stirling numbers have the following recurrence relations:

S(n + 1, k) = kS(n, k) + S(n, k − 1)

and

c(n + 1, k) = nc(n, k) + c(n, k − 1).

Solution by Ramya Durvasula. S(n, k) tells us how to place n numbers into a set-partition with k groups. If we

partition n + 1 into k groups, one way is to have n + 1 on its own, in which case we partition 1 through n into k − 1groups: thus there are S(n, k − 1) ways to do this. On the other hand, n + 1 may not be on its own, in which case

we can partition the numbers 1 through n into k sets. Then we put n + 1 into one of the k sets in one of k ways, so

this process has kS(n, k) possible choices.

Putting these together, S(n + 1, k) = kS(n, k) + S(n, k − 1), as desired.

Similarly, c(n, k) tells us how to make a permutation of n numbers with k cycles. If we are trying to compute

c(n + 1, k), again, we think about where n + 1 goes: if it goes in its own cycle, we have c(n, k − 1) ways to do this,

80

Page 81: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

since n+1 gets placed in its own cycle. On the other hand, if n+1 is in a cycle, first create k cycles with the numbers

1 through n: there are c(n, k) ways to do this, and then we can add n + 1 to one of the n spots after any element,

so this process has nc(n, k) ways.

Putting these together, c(n + 1, k) = nc(n, k) + c(n, k − 1), as desired.

Problem 226

We have operators X : f (x) → xf (x) and D : f (x) → f ′(x). Defining fn(x) = (x + D)n(1); for example,

f0(x) = 1, f1(x) = x, f2(x) = x2 + 1, f3(x) = x

3 + 3x . Find the constant term fn(0) in terms of n.

Solution by Ganatra. We know that recursively,

fn(x) = xfn−1(x) + f′n−1(x)

so plugging in x = 0,

fn(x) = f′n−1(x).

The idea is that fn is entirely dependent on the value of fn−1. Writing out a few more values,

f4(x) = x4 + 6x2 + 3, f5(x) = x

5 + 10x3 + 15x, f6(x) = x5 + 15x4 + 45x2 + 15,

f7(x) = x7 + 21x5 + 105x3 + 105x, f8(x) = x

8 + 28x6 + 210x4 + 420x2 + 105.

We start to notice some patterns: xn is always the leading coefficient of fn(x), and the last coefficients are 1, 1, 1, 3, 3, 15, 15, 105, 105.

In fact, we can find a general formula

fn(x) =

bn/2c∑k=0

xn−2k(n)2kk!2k

.

This can be proved with induction. So now(n

k

)=(n)kk!

=⇒ (n)k =n!

(n − k)! , (2k)!! = 2kk!

Plugging these in, we can say that (n)2k = n!(n−2k)! . We’re only concerned with the last term of our formula for fn: if

n is odd, our constant term is 0, and otherwise, our expression simplifies to (for n even) is

fn(0) =n!

n!!= (n − 1)!!.

Professor Postnikov says that it turns out there is a relation between this problem and the previous problem about

up and down operators on Young’s lattice: the key relation is that DU − UD = I, D(∅) = 0. These alone imply that

the number of paths of length 2n is (2n − 1)!!.The coefficients (n)2k

k!2kin fn(x) also tell us something about Young’s lattice: it’s the number of ways to take 2n

steps to get to the kth level.

Time to move on to a new topic! We’re going to discuss spanning trees.

81

Page 82: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Definition 227

Let G = (V, E) be a graph with a set of vertices V and edges E with no loops (edges with both endpoints being

the same vertex), but where multiple edges are allowed. Then a spanning tree of G is a subgraph T with the

same set of vertices T = (V, E′), where E′ ⊂ E which is a tree that connects all vertices.

Notably, it has no cycles, and we can’t have repeated edges either (since they form a cycle). So we’re picking some

|V | − 1 edges that “span” or connect all vertices of the original graph. Define T (G) to be the number of spanning

trees of a graph G.

For example, consider the graph

1 2

3 4

For this graph, T (G) = 12, because there are 4 ways to not use the double edge and 2 · 2 · 2 ways to pick the

double edge.

Fact 228

The number of spanning trees on Kn,

T (Kn) = nn−2.

This is because we can pick any labeled tree!

It turns out there is a formula in general called the matrix-tree theorem!

26 April 12, 2019

Today, we’re going to start talking about the matrix tree theorem. Recall, that if we have a graph G = (V, E) with

no loops but potentially multiple edges, we define a spanning tree to be a subgraph T = (V, E′) (taking some subset

E′ ⊂ E) which is a tree on all |V | vertices. Let T (G) be the number of possible spanning trees: for example, there

are 12 of this graph:

3 4

1 2a

e

f

b dc

There are several matrices we can associate with a graph: let’s talk about some of them! For simplicity, let’s say

we have |E| = m edges, and let’s say the vertices are numbered from 1 to n.

Definition 229

The incidence matrix of a graph G is

C = (cie),

which is an n ×m matrix. cie = 1 if i is incident to e and 0 otherwise.

82

Page 83: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

For example, the incidence matrix of the graph above can be (letting the columns correspond to edges a, b, c, d, e, f )

C =

1 1 0 0 0 0

1 0 1 1 1 0

0 1 1 1 0 0

0 0 0 0 1 1

Definition 230

The adjacency matrix of a graph G is

A = (ai j),

an n × n matrix, where ai j is the number of edges connecting i to j .

Note that the diagonal entries are always 0, because we assume we have no loops. In the graph above,

A =

0 1 1 0

1 0 2 0

1 2 0 1

0 1 1 0

.The next definition is the one we really care about:

Definition 231

The Laplacian matrix of a graph G is an n × n matrix

L = D − A,

where D is a diagonal matrix with di = degG(i).

For example, in our matrix above,

L =

2 −1 −1 0

−1 4 −2 0

−1 −2 4 1

0 −1 −1 2

.Notice that by definition, we have undirected graphs, so both the Laplacian and adjacency matrices are symmetric.

Fact 232

All row sums of L are 0, and this means that the determinant of L is 0.

This is because each edge counts once for the degree of any vertex, but also once negatively in the negative

adjacency matrix!

Now we’re ready to formulate the main result.

83

Page 84: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Theorem 233 (Matrix Tree Theorem)

Fix i ∈ [n], and define

L = Li = L with the ith row and column removed.

This is known as the reduced Laplacian matrix. Then the number of spanning trees of G is just the determinant

det L.

In particular, all of those determinants are the same! This is actually a general fact about matrices:

Fact 234

For any symmetric matrix n × n matrix B with row sums 0, the determinants of Bi and Bj are always equal.

These are called principal cofactors of our matrix B. Moreover, if our eigenvalues are µ1, · · · , µn−1, µn = 0 (we

have one zero because of the zero row sum), then this value is actually just

det(Bi) =µ1 · · ·µn−1

n.

This theorem is also called Kirchhoff’s theorem, and it is related to Kirchhoff’s laws of electricity (found in 1847).

But the matrix tree theorem (MTT) was first proved by Borcherdt in 1860, and it’s closely related to the work of

Sylvester in 1857. Let’s do some examples!

Example 235

Let’s take the graph G above.

Then the second cofactor (removing the second row and column) of the Laplacian matrix is

L =

2 −1 0

−1 4 −10 −1 2

which has determinant 16− 2− 2 = 12, as we expect! Basically, in general it’s best to remove a row and column with

lots of edges coming out of it: that’s why we prefer to remove vertex number 2 in the example above.

Fact 236

The eigenvalues of our adjacency matrix A(G) are called the spectrum of the graph G. Spectral graph theorystudies properties in terms of this spectrum! But don’t confuse the eigenvalues λi of the adjacency matrix with the

eigenvalues µi of the Laplacian matrix. There’s only one specific case where we can say something important: if

G is d-regular (so all degrees are the same), then L = dI−A, so the eigenvalues are all pretty simple: µi = d−λi .

By the way, we can get Cayley’s formula from the matrix tree theorem! Remember that if G = Kn, the complete

graph on n vertices, the Laplacian matrix has all degrees n − 1 and adjacency matrix all non-diagonal entries 1, so

L =

n − 1 −1 · · · −1

−1. . .

......

. . ....

−1 −1 · · · n − 1

.

84

Page 85: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Now we just want the determinant of L, which just has n − 1 on the diagonal entries and −1 everywhere else.

Fact 237

Notice that L − nIn−1 has all entries −1, so it has rank 1. Thus all eigenvalues of the matrix but one are equal

to 0, and the trace of the matrix is 1− n, so the last eigenvalue is 1− n.

So if L−nIn−1 has eigenvalues 0, 0, · · · , 0,−n+1, where there are n−2 zeros, then L has eigenvalues n, n, · · · , n, 1,and thus the determinant is just the product of the eigenvalues, which is nn−2, as desired!

In general, the matrix tree theorem doesn’t tell us that there will be a nice formula, but we actually get a nice

closed form pretty often: here’s a related idea to that. Let’s say G is a graph on n vertices without multiple edges,

and G+ is obtained from G by adding an extra vertex 0 (thinking of this as a root). Assume that 0 is connected to all

other vertices: note that it’s possible, for example, that G+ is connected but G isn’t.

So now define a monomial for our graph G:

FG(x) =∑

T spanningtree of G+

xdegT (0)−1.

The number of spanning trees of G is exactly FG(0)n , because plugging in x = 0 only keeps the trees T where 0 is a

root, and then there are n ways to attach 0: this is very similar to the Cayley formula proof! Now we can use the

following useful fact:

Theorem 238 (Reciprocity Theorem (Bedrosian, 1964))

Let G be the complementary graph to G: we take (V, E), including an edge between two vertices in G if and only

if it is not included in G. Then

FG(x) = (−1)n−1FG(−x − n).

This will be left as an exercise! One way is to express this polynomial in terms of the matrix tree theorem: we

then just need to show that two determinants are equal. There’s also a combinatorial proof. Well, let’s try to use this

theorem! First of all, we’ll prove Cayley’s formula again.

Proof. Let On be the empty graph on n vertices. It has no spanning trees (or even edges), but O+n now has an extra

vertex 0 connected to each of 1, 2, 3, · · · , n: this has exactly one spanning tree, so

FOn(x) = xn−1.

By the reciprocity theorem,

FKn(x) = (−1)n−1(−x − n)n−1 = (x + n)n−1

and now plug in x = 0: our answer isnn−1

n= nn−2.

But we can do more! Let’s consider the disjoint union of two graphs Km ∪ Kn: this means we have m nodes in

a clique, all disconnected from another n nodes in a clique. But adding a new vertex 0 connects the two parts: how

many trees do we have here? We need to pick a tree of Km and a tree of Kn, which will be connected our vertex 0.

85

Page 86: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Then 0 gets the factor of −1 twice, so we just correct for it:

FKm∪Kn(x) = FKm(x) · FKn(x) · x2−1 = x(x +m)m−1(x + n)n−1.

The complement of this graph is the complete bipartite graph Km,n, and we have a graph on m + n vertices where

there are m vertices on the left and n vertices on the right: there are only mn edges between the vertices on the left

and right and nothing else.

Now by the reciprocity theorem, we have to replace x with −x −m − n, so if we do math

FKm,n(x) = (x + n)m−1(x +m)n−1(x +m + n).

Calculating the constant term and dividing by the number of vertices, we get the following:

Corollary 239

The number of spanning trees of the complete bipartite graph Km,n is

mn−1nm−1.

As an exercise, try to prove this combinatorially!

27 April 17, 2019We’re going to talk some more about the matrix tree theorem today. Recall that if we have a graph G with n vertices,

we define the Laplacian matrix L = (Li j) whose entries are

Li j =

degG(i) i = j

−number of edges from i to j i 6= j

This can also be written as

L = D − A,

where D is the diagonal matrix of degrees and A is the adjacency matrix. Last time, we discussed the reducedLaplacian L = Li , which is the Laplacian matrix without row and column i . Then the matrix-tree theorem says that

the number of spanning trees in G is just the determinant of L.

There are many proofs of this: we’ll go through one today, and we’ll generalize the theorem later on. First, though,

let’s look at some more applications!

Definition 240

Define the direct product of two graphs

G = (V1, E1), H = (V2, E2) =⇒ G ×H = (V1 × V2, E3)

where the edges are of the form

E3 = {(i , j), (i ′, j ′)|i = i ′, (j, j ′) ∈ E2 or j = j ′, (i , i ′) ∈ E1}.

For example, the product of two line graphs is a grid graph.

86

Page 87: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Lemma 241

Let A(G) be the adjacency matrix of G, and let’s say it has eigenvalues α1, · · · , αm. Similarly, let’s say A(H) is

the adjacency matrix of H with eigenvalues β1, · · · , βn. Then the adjacency matrix A(G × H) has eigenvalues

αi + βj , where 1 ≤ i ≤ m, 1 ≤ j ≤ n.

This is an exercise in linear algebra. The idea is to notice that the adjacency matrix A(G×H) is a tensor product

A(G ×H) = A(G)⊗ I + I ⊗ A(H).

It turns out this lemma doesn’t help us very much with the matrix tree theorem, except when our graphs are regular!

Proposition 242

Let G be a d1-regular graph and H be a d2-regular graph. Then G ×H is d1 + d2-regular, and its eigenvalues are

d1 + d2 −αi − βj . Then we apply the matrix tree theorem: multiply all the eigenvalues except for 0 and divide by

the number of vertices.

An important application of this is the hypercube graph!

Definition 243

The hypercube graph Hd is a 1-skeleton of a d-dimensional cube. In other words, it’s the product of d copies of

a 2-vertex chain.

For example, H3 has 8 vertices (those of a cube). Note that Hd is always a regular graph, so we can apply the

proposition above! The adjacency matrix of a chain is

A =

(0 1

1 0

)=⇒ λ = ±1.

Repeatedly applying the lemma about the eigenvalues of A(G × H), the adjacency matrix of the hypercube graph

A(Hd) has 2d total eigenvalues of the form

ε1 + ε2 + · · ·+ εd , εi ∈ {−1, 1}.

The smallest eigenvalue is −d , and the largest eigenvalue is d : specifically, there is a multiplicity(dk

)of the

eigenvalue −d + 2k . Since Hd is d-regular, the Laplacian matrix has eigenvalues 2k of multiplicity(dk

).

So now we just apply the matrix tree theorem!

Corollary 244

The number of spanning trees of Hd is

1

2d

d∏k=1

(2k)(dk) = 22

d−d−1d∏k=1

k(dk) .

(by pulling the powers of 2 out).

For example, taking d = 3, the number of spanning trees is

28−3−1 · 13 · 23 · 31 = 384.

87

Page 88: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Some time ago, Richard Stanley proposed the question of finding a combinatorial proof to this. This is pretty hard,

but it was recently solved around 2012 by Bernardi. It’s still open to find an explicit bijection!

By the way, if we use a grid graph (so we have a d-dimensional box), our graph is no longer regular, but if we make

it a torus, we can get a similar product formula.

In the rest of this lecture, we’ll start on a proof of the matrix tree theorem! Recall that we defined the incidence

matrix (which is not a square matrix); we’ll want to make a modification of it.

Proof. Direct our edges of G however we’d like. For example,

3 4

1 2a

e

f

b dc

Let’s say that G has n vertices and m edges.

Define the oriented incidence matrix of G to be a n ×m matrix B = (Bie) where i ∈ V and e ∈ E:

bie =

1 i source of edge e

−1 i target of edge e

0 otherwise.

For example, here we have

B =

1 −1 0 0 0 0

−1 0 −1 1 1 0

0 1 1 −1 0 1

0 0 0 0 −1 −1

.

Lemma 245

The Laplacian of graph G is actually just

L = BBT .

This is because (BBT )i j is the dot product of the ith and jth rows of B. If i = j , the dot product will just count

the number of nonzero entries, which is exactly the degree of that corresponding vertex! On the other hand, when

i 6= j , we get a −1 each time an edge goes from i to j or vice versa. That’s why the orientation is arbitrary!

So if B is the oriented incidence matrix without row i ,

L = BBT ,

by plugging into the definition. Well, we can use the following fact about determinants of non-square matrices:

88

Page 89: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Theorem 246 (Cauchy-Binet formula)

Let A be a k ×m matrix and B be an m × k matrix, where k ≤ m. Then the determinant of AB is∑S⊆{1,2,··· ,m}|S|=k

det(AS) det(BS),

where AS is the k × k submatrix of A with columns in S and BS is the k × k submatrix of B with rows in S.

The best way now is to think of the following product in block form:(Ik A

0 Im

)(A 0

−Im B

)=

(0 AB

−Im B

).

Now we can just take determinants of the square matrices! The determinant of the first one is 1 (because it is an

upper triangular matrix with diagonal entries 1), and the determinant of the right matrix is ± det(AB). Now we claim

that the determinant of the middle matrix is exactly the right hand side of Cauchy-Binet (up to a ± sign which we’ll

figure out)! The main idea here is by example: apply the usual product over all permutations of rows. For example,

consider k = 2, m = 4:

a11 a12 a13 a14 0 0

a21 a22 a23 a24 0 0

−1 0 0 0 b11 b12

0 −1 0 0 b21 b22

0 0 −1 0 b31 b32

0 0 0 −1 b41 b42

.

The determinant of this matrix must take some permutation: we want to place rooks on this shape so that we have

exactly 1 rook on each row and each column. In particular, we should have one rook in each of the last two columns,

and then we must pick the top and bottom −1, and then we finish by picking some square 2× 2 matrix in the top 2

rows. Also all the signs magically work out.

We’re almost done, and we’ll continue this proof next time!

28 April 19, 2019Last lecture, we found that we could write the reduced Laplacian matrix from the matrix tree theorem as

L = B · BT ,

where B is our oriented incidence matrix with one row removed. This means that B is an (n − 1)×m matrix, where

n is the number of vertices in our graph and m is the number of edges.

By the Cauchy-Binet formula, this can be written as a sum. If E is the set of edges,

det(L) = det(B · BT ) =∑S⊂E|S|=n−1

(det BS

)2

(where the square comes from detA = detAT for a square matrix). Our goal is to show that this is the number of

spanning trees!

89

Page 90: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Lemma 247

The determinant

det BS =

±1 S is the edges of a spanning tree

0 otherwise.

Note that this lemma finishes the problem, because each spanning tree gives (±1)2 = 1, and everything else gives

0.

Proof. For example, consider our graph G:

3 4

1 2a

e

f

b dc

This has the oriented incidence matrix (with columns a, b, c, d, e, f in that order)

B =

1 −1 0 0 0 0

−1 0 −1 −1 1 0

0 1 1 1 0 1

0 0 0 0 −1 −1

and let’s let B be B with the last row removed. Now note that the determinant

det(B{a,b,c}) = 0

because the graph formed by a, b, c is not a tree. Specifically, this is because we have a cycle! The column vectors

~a + ~b − ~c = 0, and therefore the columns are linearly dependent.

In general, if we take a cycle with C = e1, · · · , ek , pick some orientation of the cycle. Then there will be some

relation

±~e1 ± ~e2 · · · ± ~ek = 0,

where the ±s are + if the edges agree with C’s orientation and − otherwise! So the rows are dependent, and now

we’ve proved the “otherwise” part of the claim.

Now let’s try to investigate the others: if we take the determinant

det(B{a,c,f }) = det

1 0 0

−1 −1 0

0 1 1

= ±1.One way to think of this is that we can always pick a vertex which is a leaf, so that will only have one entry! We can

do row and column operations to make that the top left corner, and now we can just use induction.

Formally, let S be some edges that form a spanning tree. All trees on at least two vertices have at least two leaves,

so pick any leaf ` such that ` is not the index of the removed row. Then the `th row of the matrix BS has only one

nonzero entry, and it is a ±1. Expanding out the determinant by this row, the determinant

det(BS) = ± detB′,

90

Page 91: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

where B′ is an (n − 2)× (n − 2) matrix. This corresponds to a smaller tree, so we can use induction! Eventually, we

get to a tree on 2 vertices, which has determinant ±1, and we’re done!

Let’s think about some generalizations: first of all, let’s make a weighted version of the matrix tree theorem.

Suppose that to every edge e of G, we assign a weight xe , and define the weight of a spanning tree

wt(T ) =∏

e edge of T

xe .

Note that this is a product over edges, not a product over vertices (in contrast to the Cayley formula)! Analogously

to Cayley, though, we can define a polynomial

FG =∑

T spanning tree

wt(T )

Our goal is to find this polynomial FG . Similarly, we can also define a weighted Laplacian matrix:

Definition 248

Given a weighted graph {G, {xe}}, we define the weighted Laplacian Li j via

Li j =

∑e incident to

vertex ixe i = j

−xe e = (i , j), i 6= j

0 otherwise

.

Theorem 249 (Weighted matrix tree theorem)

The polynomial

FG = det(L),

where we remove one row and one column to L.

Let’s do an example! If we have a weighted graph

3 4

1 2x

t

u

y z

Then our Laplacian is

L =

x + y −x −y 0

−x x + z + t −z −t−y −z y + z + u −u0 −t −u u + t

,and we claim that any 3× 3 minor is actually going to give us the sum of weights of all spanning trees.

Proof. We can think of this graph as a network - specifically, we can think of our weights as conductances of edges.

But there’s another way to think of this: if the weights are all nonnegative integers, a weight of k could be thought

of as k edges between the relevant vertices!

91

Page 92: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

In that case, FG is just the number of spanning trees of Gm, the graph where each edge e is replaced by xeunweighted copies of the edge. Thus we can use the regular matrix tree theorem to prove this for all positive integers!

And now the weighted matrix tree theorem holds in general: we have two polynomials that agree on infinitely many

points, so they must be the same polynomial.

Here’s another generalization to directed graphs! Let G be a digraph (directed graph) with no loops, but where

multiple edges are allowed. There’s two different versions of “spanning trees” for our diagraph:

• An out-tree oriented at a vertex r is a spanning tree of G in the usual undirected sense, except that for every

vertex i , all edges in the shortest path from r to i are directed away from the root.

• An in-tree is the same, except that all edges in the path from r to i are directed toward the root instead.

Note that these numbers may not be equal, especially for a given vertex r . But we claim that we can still find them

as the determinant of some matrix! We again have two versions of our Laplacian matrix: we define Lin and Lout:

(Lin)i j =

indegree(i) i = j

−number of directed edges i → j i 6= j.

(Lout)i j =

outdegree(i) i = j

−number of directed edges i → j i 6= j.

So here Lout = Dout − A, Lin = Din − A, where A is the directed adjacency matrix. (Note that the outdegree is the

number of edges leaving a vertex, and the indegree is the number of edges entering a vertex.)

These vertices may not be symmetric anymore, but they still have some important properties! For example, all

column sums of Lout are zero, but not necessarily row sums, and vice versa for Lin.

Definition 250

Given a square matrix L, define Li j = (−1)i j det(L∗), where L∗ is the matrix L with the ith row and jth column

removed.

Theorem 251 (Directed Matrix Tree Theorem)

The number of out-trees rooted at r , is the cofactor

(Lin)i r

for any i = 1, 2, · · · , n, and the number of in-trees rooted at r is

(Lout)r i

for any i = 1, 2, · · · , n.

We’ll see how to prove this next time! This is even more general, but the proof is actually easier.

29 April 22, 2019Last time, we mentioned the directed version of the matrix tree theorem. We’re going to prove this theorem today!

As a reminder, here’s the statement: given a directed graph G on n vertices (with no loops), A = (ai j) is the adjacency

92

Page 93: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

matrix which tracks the number of edges from i to j . (This is a matrix with nonnegative integer entries, particularly

zero on the diagonal.)

We also have two diagonal matrices Din and Dout: the former is the diagonal matrix with entries equal to indegrees

of the vertices, and the latter is the diagonal matrix with entries equal to outdegrees.

Then we have two Laplacian matrices:

Lin = Din − A,Lout = Dout − A.

We also defined the cofactors of a matrix L

Li j = (−1)i+j det(L without the ith row and jth column).

Theorem 252 (Directed matrix tree theorem)

Fixing a root r , the number of in-trees rooted at r (that is, all edges point toward the root) is (Lout)rk , where k

is an arbitrary vertex.

Meanwhile, the number of out-trees rooted at r (all edges growing out of the root) is (Lin)kr , where k is an

arbitrary index.

By the way, this implies the undirected version, since in-degree and out-degrees are equal, and Lin = Lout becomes

the usual Laplacian matrix. Also, these two statements are obtained by reversing all directions of a graph, so we just

need to prove one of them!

Example 253

Consider the graph

1 2

3

1 to 3, 2 edges 1 to 2, 2 to 3, 3 to 2.

Its adjacency matrix is

A =

0 2 1

0 0 1

0 1 0

,and we have the Laplacian matrices

Lout =

3 −2 −10 1 −10 −1 1

, Lin =

0 −2 −10 3 −10 01 2

.Since

(Lout)1,1 = det

(1 −1−1 1

)= 0,

93

Page 94: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

there are no intrees rooted at 1 (which makes sense because no edges are entering 1 anyway). Similarly ,

(Lout)2,1 = − det

(−2 −1−1 1

)= 3,

and indeed there are 3 in-trees rooted at 2 here. Finally,

(Lin)2,1 = − det

(−2 −1−1 2

)= 5 :

indeed there are 5 out-trees with root 1.

Let’s prove this more general version: it turns out this is easier, just like in the Cayley formula proof! Again, this

is doable because our induction hypothesis is stronger.

Proof. We’ll do induction on the number of edges from i → j of G, where i is not the root r of our graph. In other

words, this is the number of edges that don’t come from the root!

Denote Inr (G) to be the number of in-trees of G rooted at r . Our goal is to show that this is the cofactor (Lout)rk .

Our base case is where G is the graph where there are no edges out of non-root vertices: then there are no in-trees,

since nothing goes into r anyway. Then Lout has all nonzero entries except for possibly the row corresponding to r :

any cofactor (Lout)rk is zero, because it must remove the r th row.

So now for the induction step: pick any edge e from i to j , where i is not the root. We construct two other graphs:

G1 is the graph G with edge e removed, and G2 is G with all edges e ′ from i to j ′ except e (this is all edges with the

same source as e).

Fact 254

We can define in-trees rooted at r to be all trees T such that the outdegree of any vertex is 1 (except the root,

whose outdegree is 0).

To use the inductive step, note that

Inr (G) = Inr (G1) + Inr (G2),

because vertex i has to use either edge e or one of the other ones through vertex i .

Fact 255

By the way, if there’s only one edge from vertex i , we can just contract it, and the proof continues to work!

Now by induction, if we look at the Laplacian matrices, the ith row of Lout(G) has some entries (a1, · · · , an). Lout

looks almost identical, except that one edge is removed: in particular, this means in row i , we decrease ai by one and

increase aj by one. On the other hand, Lout(G2) also looks identical to Lout(G) except in row i : then we have all 0s,

except a 1 in the ith column and a −1 in the jth column.

In particular, the sum of the ith rows of Lout(G1) and Lout(G2) add up to the ith row of Lout(G). By linearity of

determinants, this just means that whenever we don’t remove the ith row,

(Lout(G))rk = (Lout(G1))rk + (Lout(G2))

rk ,

and we’re done by induction, since the right hand side counts the number of in-trees for graph G1 and G2 separately!

94

Page 95: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

But often it’s better to do a combinatorial proof: for example, why do we need to use Lout for in-trees and

vice versa? Let’s see another proof based on the involution principle (which we used for Euler’s pentagonal number

theorem)! Remember that last time we did this, we tried to construct Young diagrams for partitions.

Slightly less general proof. Assign a weight xi j to each i → j : now the adjacency matrix just has entries xi j , where

xi i = 0. Think of xi j as multiplicity of the directed edges from i to j . Since the diagonal entry (Dout)i i is supposed to

count the outdegree, we define it to be ∑j 6=ixi j .

Our goal is to show that the cofactors for Lout do count the number of in-trees! We’re going to prove the directed

matrix tree theorem for k = r only: this will make things a bit simpler. Now our goal is to show that

(Lout)r r =∑

in-trees rooted at r

weight(T ).

For simplicity, let’s look at n = 3, r = 3: then our Laplacian martix isx12 + x13 −x12 −x13−x21 x21 + x23 −x23−x31 −x32 x31 + x32

.Then removing the last row and last column yields a cofactor of

(x12 + x13)(x21 + x23)− x12x21 = x12x23 + x13x21 + x13x23,

which is basically all paths we can take to make an in-tree rooted at vertex 3. We claim this works in general! We’ll

do this next time, but here’s the main point: open up the determinant as a sum over all permutations, and we’ll get

collection of monomials that correspond to graphs. We can then construct a sign-reversing involution which preserves

weights but changes + signs to − signs, so the only remaining terms are those coming from trees.

Also, as a problem in the next problem set: we can use the directed matrix tree theorem to prove lots of identities.

In particular,

Proposition 256 (Abel’s Identity)

We have (for any z)

(x + y)n =

n∑k=0

(n

k

)y(y + kz)k−1(x − kz)n−k .

When z = 0, this is just the binomial theorem.

30 April 24, 2019Recall from last class that we thought about the weighted matrix tree theorem: we have variables xi j for 1 ≤ i , j ≤ n,where xi i = 0 (since we have no loops). Then we defined the Laplacian matrix

(Lout)i j =

∑k 6=i xik i = j

−xi j i 6= j.

We could then formulate a general statement:

95

Page 96: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Theorem 257

The cofactor (Lout)r r is the sum over all spanning in-trees∑T in-tree

rooted at r

weight(T ),

where the weight of a tree is the product of its edges.

We will always have nn−2 terms on the right hand side, because we can take any undirected tree on n vertices and

then direct everything towards the root! Then take the product of all xi j , where there is an edge in our tree from i to

j .

Let’s show an interesting method for the proof.

Proof. Without loss of generality, let r = n. By definition, the cofactor (Lout)nn is just a sum over permutations

∑w∈Sn−1

(−1)`(w)n−1∏i=1

(Lout)iwi .

where `(w) is the sign of the permutation w . Permutations break into cycles, so we can instead write this as a product

over the individual cycles:

∑subdivision of [n]

into disjoint cyclesC1∪C2···Cm∪{fixed points}

±

∏i→j edge of

some Cj

xi j

· ∏f fixed point

∑j 6=fxf j

.

Basically, this just writes our terms out in terms of the xi js by the definition of the Laplacian matrix!

Question 258. What do we know about the ±?

Claim 259. For a permutation σ with a single cycle of size c ,

(−1)`(σ) = (−1)c−1.

For example, we get a −1 from a transposition, 1 from a 3-cycle, and so on. But we also get an additional

contribution of (−1)c , because our Laplacian matrix has entries equal to −xi j ! This means that every cycle contributes

a −1, and therefore we get a (−1)m at the front if we have m cycles.

How do we write this down combinatorially? Every cycle looks like some union of fixed points and cycles on the

numbers 1 through n − 1: let’s say the cycles are colored in red. To represent the∑xf j term, we pick an arbitrary

green edge out from a fixed point into other vertices, potentially including n. So then we are summing over directed

graphs H on the vertices {1, 2, · · · , n} with n − 1 edges colored in red or green with the following conditions:

• For all vertices i = 1, · · · , n − 1, the outdegree is 1.

• The red edges form a disjoint union of cycles.

This means we can rewrite the sum as∑graphs H

(−1)number of red cycles∏

i→j edge

xi j

96

Page 97: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

This looks a lot like what we want in the theorem. In-trees rooted at n exactly correspond to digraphs without cycles

with n − 1 edges, such that the outdegree of every non-root vertex is 1! Now the in-trees have zero red cycles, and

basically our goal is for the sum of all the other terms! So our goal is to show a weight-preserving, sign-reversing

involution ω on graphs H with at least one cycle.

That’s not hard to create: first of all, fix a total ordering of edges i → j . (We can just do this lexicographically.)

Thus, we can also order all possible cycles lexicographically. Now find the first cycle in H and switch its color between

green and red!

So our resulting graph has the same edges but a different parity of the number of red cycles, so those terms always

cancel out. Thus our sum only leaves the contributions from in-trees, and we’re done!

Remember that we did this with the Euler’s pentagonal number theorem as well, and we’ll see it later on as well.

This is called the involution principle.Our next topic is about electrical networks, and this is related to the matrix tree theorem! Let’s start by something

we may have learned in physics class.

Given a graph G, think of edges as resistors - that’s the only circuit element that we’ll use today. Select two

vertices A and B to be connected to some source of electricity.

Some current will then be generated through the edges: our goal is to find the voltages, currents, and so on.

To talk about this rigorously, we’ll fix the orientation of edges. (The current is just negated if we flip the orientation,

so the actual direction isn’t particularly important.) Then for any edge e from vertices u to v , we have three numbers:

• A current Ie through the edge

• A potential difference or voltage Ve across the edge

• A resistance Re which is a positive real number.

If we were physicists, we would mention units, but because this is mathematics, we don’t need them.

Theorem 260 (First Kirchhoff’s law)

The sum of the in-currents of any vertex is the same as the sum of the out-currents. In other words, for any

vertex v , ∑e:u→v

Ie =∑e ′v→w

Ie ′ .

The first Kirchhoff’s law can be thought of as a “conservation of charge” statement.

Theorem 261 (Second Kirchhoff’s law)

For any cycle C in our graph with edges e1, · · · , em, the sum of the voltages is 0 if we direct all the signs.

Specifically,m∑i=1

±Vei = 0

where we fix the orientation of our cycle, and we have a − exactly when an edge disagrees with the orientation of

the cycle.

97

Page 98: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Fact 262

The second law is equivalent to the existence of a potential function

U : {vertices} → R

such that for any edge e : u → v , Ve = U(v)− U(u).

Specifically, this means we can “ground” one vertex at voltage 0, and then we can iteratively figure out the voltages

of the whole graph by following edges arbitrarily. The second law then tells us that there aren’t any contradictions,

since two paths will always have the same voltage!

Theorem 263 (Ohm’s law)

For any edge e,

Ve = IeRe .

This is really a statement that defines resistance, so it doesn’t really warrant a proof: it explains the setup of why

we have resistances, currents, and voltages.

A typical problem is of the form “given all resistances, find all the currents and voltages.” Basically, we can write

a bunch of linear equations, and we can use those to calculate the answer. It turns out we can represent this as

a Kirchhoff matrix: it’s actually the same thing as the Laplacian matrix! Our weights will basically look like the

conductances, which are inversely proportional to the resistances.

31 April 26, 2019Today we will continue with high school physics! Just to recap, let G be a connected digraph - directions don’t actually

matter, but they are used for convenience, and we select two vertices A and B to be connected to a battery. Then

we have some current I through the battery, and our goal is to find all the relevant currents and voltages Ie , Ve given

the resistances Re for each edge. Alternatively, how can we find the resistance of the whole electrical network RAB?

First of all, remember that we have three laws that govern electricity. Let’s try to write them out as matrix laws!

• Kirchhoff’s second law says that we can define a potential function U on the vertices of our graph such that

Ve = Uv − Uu

for any edge e : u → v .

• Ohm’s law gives us a proportionality relationship:

Ie =VeRe=Uv − UuRe

.

• For any vertex v , the in-current is equal to the out-current. For example, if e1 : v1 → v and e2 : v2 → v lead

into v , and e3, e4, e5 lead out of v (from v to v3, v4, v5 respectively), we can write that as

Uv − Uv1R1

+Uv − Uv2R2

=Uv3 − UvR3

+Uv4 − UvR4

+Uv5 − UvR5

.

98

Page 99: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

For this last bullet point, let’s instead move all terms to the left hand side: now we get the nice symmetric form∑i neighbor

Uv − UviRi

= 0.

This isn’t quite true always, though: we get some additional current if we’re at A or B. We can instead write this as

(1

R1+ · · ·+

1

Rd

)Uv −

d∑i=1

1

RiUvi =

0 v 6= A,B

−I v = A

I v = B

Now let’s label our vertices with the integers from 1 to n, such that A = 1 is the first one and B = n is the last

one. Denote Ri j to be the resistance of edge (i , j), and since we have reciprocals in our equation, define Ci j to be 1Ri j

if (i , j) is an edge of our graph and 0 otherwise. (Think of this as non-edges having infinite resistance!)

Definition 264

The Kirchhoff matrix K is an n × n matrix whose entries are equal to

Ki j =

∑6=i ci` i = j

−ci j i 6= j

Now we can write all three electrical laws in terms of this matrix! Specifically, if ~u =

U1...

UN

is the vector of

potentials, we have

KU =

−I0...

0

I

. (1)

Notice that the Kirchhoff matrix is really just the Laplacian matrix for graphs whose edge-weights are conductances!

Note that this system has many solutions, since all rows of our Kirchhoff matrix add to 0. But that makes sense:

our potential functions can be shifted up and down by a constant! This is because K, our Laplacian or Kirchhoff

matrix, has rank n − 1 if G is connected - this means that we have at least one spanning tree by the matrix tree

theorem, so all cofactors have to be nonzero.

Fact 265

In general, the rank of the matrix is n minus the number of connected components of our graph.

In particular, can we use this to calculate the resistance between A and B

RAB(G) =Un − U1I

?

Let’s try to calculate this more explicitly. Note that we can simultaneously rescale the U vector and I in our

equation (1) above without changing K: let’s assume I = 1, and then we can also assume by adding our constant

99

Page 100: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

that U1 = 0 (by grounding the first vertex). Then the resistance of the whole circuit is just Un. (1) then becomes

K(1)

U2...

Un

=0...

1

.where K(1) denotes the (n − 1)× (n − 1) matrix obtained by removing the first row and column of K.

This is a matrix equation, and we should use Cramer’s rule (despite professor Strang in 18.06 saying to never do

so)! Since our goal is to calculate Un,

RAB(G) = Un =det ˜K(1)

detK(1),

where ˜K(1) is obtained by replacing the last column with the vector

0...

1

. Notice that expanding this determinant

along the last column is actually just going to give us the determinant of the upper left (n − 2) × (n − 2) square of

K(1)! Denote this as K(1,n), where we remove the first and last rows and columns of our matrix.

The bottom line is that we get the following:

Theorem 266

The overall resistance of our graph G

RAB(G) =detK(1,n)

detK(1)=

∑T spanningtree of G

weight(T )∑T spanningtree of G

weight(T ),

where the weight of a tree is the product of the conductances

weight(T ) =∏

e edge of T

1

Re,

and G is obtained by gluing edges A and B together (or by connecting the two with an edge of infinite conductance).

Equivalently, we can think of the numerator a little differently: a spanning tree T of G is a forest of two components,

such that A and B are in different components, so that the two are joined together when A and B are glued together.

Let’s do an example!

Example 267

Consider a graph with three vertices A,B, C, where the resistances are R1 between A and C, R2 between B and

C, and R3 between A and B.

Then our theorem says that the total resistance between A and B is governed by spanning trees! G makes A and

B the same edge, so it only contains the edges R1 and R2: either of those is a spanning tree, so

RAB(G) =(R1)

−1 + (R2)−1

(R1R2)−1 + (R1R3)−1 + (R2R3)−1.

We could have also done this by using series and parallel connections:

100

Page 101: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Proposition 268 (Series connection)

If we have two graphs G1 and G2, only connected by one vertex C, and A ∈ G1, B ∈ G2, then

RAB = RAC + RBC ;

this can be also stated as R(G1 + G2) = R(G1) + R(G2).

Proposition 269 (Parallel connection)

If we have two graphs G1 and G2 that are disjoint but share two vertices A and B, then

R(G1 ‖ G2)−1 = R(G1)−1 + R(G2)−1.

Using these two processes, we can generate many graphs, but not all of them!

Fact 270

The smallest graph that doesn’t work is the Wheatstone bridge: this is a 4-cycle with one diagonal. Then finding

the resistance between the two other vertices can’t be directly found by series and parallel connections.

That’s an example where the general formula helps! By the way, we can easily deduce the series and parallel laws

from the electrical network theorem, but we might come back to that later.

Now let’s look at something a bit different: this time, if we’re trying to work with our graph from A to B, rescale

the currents and potentials so that UA = 0, UB = 1: all other vertices have potentials between 0 and 1. Can we phrase

this as a probability?!

Proposition 271

Consider a random walk on the vertices of G, where the probability of us jumping from u to v is

Pr(u, v) =

1Ruv∑w 6=u

1Ruw

,

where the denominator is a normalizing factor. Then the probability that a random walk starting at vertex v hits

B before it hits A is Uv .

This should look a lot like the drunk man problem from the first class! We can think of A as the point x = 0, B

as the house at x = N, and then U is the probability that the man survives.

Proof. Let PV be the probability of survival: writing out the linear equations for the random walk gives you the same

equations as Kirchhoff’s law!

We’ll continue with the best theorem next time.

32 April 29, 2019Today we’re going to talk about Eulerian cycles!

101

Page 102: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Definition 272

An Eulerian cycle or circuit / tour / walk in a digraph G is a closed directed walk on G such that we return to

the same point where we start, and every edge is visited exactly once.

We have the following famous result:

Theorem 273 (Euler, 1736)

A digraph G contains an Eulerian cycle if G is connected as an undirected graph and all vertices have equal indegree

and outdegree.

We can also say something similar for undirected graphs:

Corollary 274

An undirected graph G contains an (undirected) Eulerian cycle if and only if G is connected and all vertices have

even degree.

The story behind these is the bridges of Konigsberg: Euler wanted to use each bridge excatly once. This is pretty

easy to prove:

Proof of directed version. It is clear that the conditions are necessary: the graph must be connected, and each edge is

entered and exited an equal number of times. To show that this is sufficient, pick some arbitrary edge and keep going

until we get stuck at some point (because there are finitely many edges). We can then only get stuck at our initial

vertex, because the outdegree is equal to the indegree: for any other vertex, if we enter a times, we should be able to

exit a times.

So if we end up at our starting vertex, we are either done, or there are some edges we haven’t used. Find a vertex

for which an edge hasn’t been used: just keep going and repeatedly add edges until everything is used.

What we’re discussing, then, is the next question: how many Eulerian cycles exist? To avoid overcounting, we’ll

fix our starting edge: basically, we are given a root r and edge e as reference, and we want to see how many Eulerian

cycles are distinct up to that. (Since each edge is used exactly once in each Eulerian cycle, it doesn’t actually matter

which one we use.)

Theorem 275 (B.E.S.T Theorem, 1951)

Let G be a connected digraph, where the indegree of each vertex is equal to its outdegree, and fix a root r . Then

the number of Eulerian cycles in G is equal to

# of Eulerian cycles in G = Inr (G) ·∏v vertex

(outdegree(v)− 1)!,

where Inr (G) is the number of in-trees rooted at r .

B.E.S.T actually stands for de Bruijn, von Aardenne-Ehrenfest, Smith, and Tutte. Note that we know the value

of Inr (G) from the directed matrix tree theorem!

102

Page 103: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Fact 276

Since our graph is Eulerian (it satisfies the two requirements), the two Laplacian matrices Lin = Lout, and all row

and column sums of our Laplacian matrix are zero: this implies that all cofactors of L are the same! Therefore,

the number of in-trees rooted at r is the same as the number of out-trees rooted at r , and this is the same for all

r .

Example 277

Consider a 4-cycle, where there are a pair of oppositely-directed edges between two opposite vertices in the cycle.

We have two in-trees, and the outdegrees are 2, 1, 2, 1, so we should have 2 · 1!0!1!0! = 2 Eulerian cycles.

Proof. Fix our starting root r and starting edge e. Given any Eulerian cycle C, list them in the order they appear in

our cycle starting from e: this will order all edges in some manner

e1e2 · · · eN .

This is a total ordering, and it will be denoted by <C .For any vertex v 6= r , mark the edge from v which is maximal

among all outgoing edges in the order <C : that is, we color the outgoing edge that occurs last in our Eulerian cycle.

Let T be the subgraph formed by those colored edges. We claim that T is an in-tree rooted at r : this follows from

the following facts:

• T has n − 1 edges, where G has n vertices.

• There is no fork: for every vertex, we picked exactly one outgoing edge.

• There are no edges out of the root.

• There are no directed cycles.

This last claim is the least obvious: let’s prove it.

Proof. If there were a cycle in T , denoted as C, it does not visit the root (because there are no outgoing edges). So

let f be the maximal edge in C (by the ordering <C). f is not the last edge in our Eulerian walk (because it doesn’t

go to the root), so we can let f ′ be the next edge in our Eulerian cycle C. Meanwhile, define f ′′ to be the edge that

follows f in the cycle C.

f ′ 6= f ′′, because f is supposed to be the largest edge in our cycle, and f <C f ′. On the other hand, if f ′ and f ′′

are different edges, we know that f ′′ <C f by maximality of f , and then f ′ > f ′′: then we shouldn’t have included f ′′

in T in the first place by maximality of construction of T !. So this is a contradiction, and no such cycle can exist.

This means that we have a graph with outdegree 1 everywhere except at the root, which is enough to make it an

in-tree! So how do we finish the proof? For any vertex v , let wv be the ordering of all edges outgoing from v except

for e and the tree T , given by our order <C . T and e remove 1 from each outdegree, so each wv corresponds to a

permutation of size outdegree(v)− 1.And now the wv s, plus the intrees, are enough to tell us the whole ordering: we claim this map

C (Eulerian cycle)→ (T, {wv}v vertex)

103

Page 104: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

is a bijection! To do this, just keep going along, picking the smallest unmarked edge, and only use a marked edge from

T if we have no other choice. Then we can never get stuck, because we always use the last edge from each vertex

when absolutely necessary by construction!

33 May 1, 2019Today we’re going to discuss parking functions! Sometimes, it’s hard to find a good parking spot.

Let’s say we have a one-way road, and there are n cars on the road. All n cars are trying to park, and there are n

parking spots along the road. However, the drivers prefer some spots to others: specifically, we have a function

f : [n]→ [n]

(from cars to spots), such that the ith car prefers to park in the f (i)th spot. It’s possible that two cars prefer the

same spot: what’s the process? Each car tries to park in its favorite spot sequentially, and if the spot is already taken,

the car keeps driving and will take the next available spot afterwards.

Example 278

For example, if (f (1), f (2), f (3), f (4)) = (2, 3, 1, 2), the first car parks in spot 2, the second car parks in spot 3,

the third parks in spot 1, and the fourth parks in spot 4.

Example 279

On the other hand, if (f (1), f (2), f (3), f (4)) = (2, 3, 3, 2), the first car parks in spot 2, the second parks in spot

3, the third parks in spot 4, but the fourth car is out of luck!

Definition 280

Call such a function f a parking function if all n cars are able to park.

So the first example is a parking function, while the second is not. As an observation, all permutations are parking

functions (since there are no conflicts), but there are others as well.

What are some examples of bad functions? In the bad example above, there are 4 cars that all want spots 2, 3, or

4, which is not satisfiable. It turns out this describes all parking functions!

Lemma 281

f is a parking function if and only if for any 1 ≤ k ≤ n, the number of is for which f (i) ≥ n+ 1− k is at most k .

The idea is that permutations are good, and that we can also take a permutation and decrease some of the entries!

For example, (2, 3, 1, 2) is obtained by decreasing some entries of (2, 3, 1, 4).

Lemma 282

f is a parking function if and only if there exists a permutation w(1), · · · , w(n) of 1 through n such that f (i) ≤ w(i)for all i .

104

Page 105: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

These proofs will be left as an exercise! So let’s try to find the number of parking functions in terms of n. One

thing that makes our life easier: the last lemma tells us that the order in how the cars come in does not matter!For n = 2, we can have (1, 1), (1, 2), or (2, 1), so there are 3 parking functions. For n = 3, there are 6 permutations,

and then we can decrease some of the entries. There are 3 ways to get (1, 2, 2), 3 ways to get (1, 1, 3), 3 ways to

get (1, 1, 2), and 1 way to get (1, 1, 1), for a total of 16 parking functions. This looks a lot like Cayley’s formula!

Theorem 283 (Pyke, 1959, Konheim-Weiss 1966)

The number of parking functions f : [n]→ [n] is (n + 1)n−1.

The following will either be left as an exercise or covered later: can we find a bijection between spanning trees and

parking functions from [n] to [n]? Instead, we’re going to come up with a very short proof that doesn’t need them at

all!

Proof. Assume we have n+1 parking spots instead, and let’s say we have a circular road, so cars drive counterclockwise.

So now our function goes from [n]→ [n + 1] - we still have the same preferences.

The important difference here is that all cars will always park (by the Pigeonhole principle, and also because we

can loop around). In addition, one spot will stay empty!

Lemma 284

The total number of functions f : [n]→ [n + 1] such that the ith spot stays empty is the same for all i .

This is because the problem is entirely symmetric: if we have a function that leaves the ith spot empty, just add 1

to all values of f , mod (n + 1), and we get a function that leaves the (i + 1)th spot empty.

Lemma 285

Functions f that result in spot n + 1 staying empty are exactly the parking functions.

This is because n+1 staying empty means no cars want spot n+1, and no cars pass by the first n spots (because

then they would take it)!

So because there are (n+1)n total functions, and 1n+1 of them are parking functions, we have (n+1)n−1 functions

in total, as desired.

This doesn’t explain why this is related to trees, but it proves the formula!

So let’s go back to our original set-up, and let’s pick a uniformly random function [n] → [n]. The probability this

is a parking function is(n + 1)n−1

nn=1

n

(1 +1

n

)n−1.

As n →∞, this approaches

≈1

n· e =

e

n,

so the probability is proportional to 1n as n grows large. That explains why it’s so hard to park in real life (or something)!

Now let’s think a little bit about statistics on parking functions. First of all, can we say anything about the sum

f → s(f ) =n∑i=1

f (i)?

105

Page 106: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

We know that f is always dominated by a permutation, so the sum is at most

s(f ) ≤(n + 1

2

).

This is obtained by the n! permutations. On the other hand, the minimum value n is only obtained by (1, 1, · · · , 1).

Problem 286

What’s the number of parking functions with some given sum?

Alternatively, we can try to understand this statistic in terms of trees. It turns out there’s a natural way to interpret

it there!

Definition 287

Let T be a labeled tree on (n + 1) vertices, where we label the vertices 0, 1, · · · , n. (Think of 0 as the root.) A

pair (i , j) for 1 ≤ i < j ≤ n is called an inversion if j belongs to the shortest path from vertex i to the root 0.

Denote the number of inversions of T as inv(T ).

Theorem 288 (Kreweras, 1980)

Summing over all parking functions, ∑f :[n]→[n]

parking function

x(n+12)−s(f ) =

∑T tree on0,··· ,n

x inv(T ).

This is called the inversion polynomial for trees, In(x).

For example, In(1) = (n + 1)n−1, since we just count each term on the left side once. Similarly, In(0) = n!, since

we want to the permutations with maximal sum of entries.

The n! trees with no inversions are called increasing trees: we see now that there are n! of them! This is because

we add 1 to the root (since nothing can be between it and 0), and then add 2 in one of the two spots, then 3 in any

of the three spots, and so on.

There are some other interesting values that we can plug in as well: if we plug in x = −1, we count the difference

between the number of trees with an even versus odd number of inversions: it turns out to be plus or minus the number

of alternating permutations of size n, which is defined to be those where w1 < w2 > w3 < · · · . These are related to

the Euler and Bernoulli numbers!

The problem set will be posted soon, and there will be several questions around this theorem.

34 May 3, 2019

The problem set is posted! It will be due in a week (on May 10). Today, we’ll go over some concepts that will be

helpful for the problem set. (Again, solving six problems completely is generally good enough.)

Last time, we considered the tree inversion polynomial

In(x) =∑

T spanningtrees of Kn+1

x inv(T) =∑

f :[n]→[n]parking function

x(n+12)−

∑i f (i).

106

Page 107: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Three problems from the problem set are related to alternating permutations w ∈ Sn, which satisfy the condition

w1 < w2 > w3 · · · . Letting An be the number of alternating permutations of Sn (also known as Euler, Andre, zigzag,

tangent and secant numbers, up-down numbers, and so on), these are closely related to the Bernoulli numbers Bn!

Fact 289

Plugging in x = −1 yields the Euler numbers An.

Fact 290

Taking the exponential generating function ∑n≥0Anxn

n!

(we do this so that our series is not divergent!), we get tan(x) + sec(x). In fact, if we only add odd or even n,∑n≥1 odd

Anxn

n!= tan x,

∑n≥0 even

Anxn

n!= sec x.

Fact 291

We can draw something similar to the Pascal triangle:

1

0 1

1 1 0

0 1 2 2

5 5 4 2 0

Basically, alternate from left to right, adding up the entries from the row above! Then the nonzero numbers on

the sides of the triangle are just An.

We can call the right side the “Bernoulli side” and the left side the “Euler side:” the right side is then the numbers

that appear in the series expansion of tan x , and the left side is those for sec x .

Definition 292

The Bernoulli numbers Bn are given by ∑n≥0Bnxn

n!=

x

ex − 1 .

If we expand out, we have

x

ex − 1 = 1 +(−1

2

)x +1

6·x2

2!+

(−1

30

)x4

4!+1

42·x6

6!+ · · ·

Note that all Bn are only nonzero if n is even or n = 1. The exact formula is actually given by (through the tan x

expansion)

B2n = (−1)n−12n

42n − 22nA2n−1.

So really the Ans are the heart of the combinatorial tricks here!

107

Page 108: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Fact 293

By the way, these are related to the Riemann zeta function, which can written in integral form as

ζ(x) =1

Γ(x)

∫ ∞0

ux−1

eu − 1du.

We can find that at integer values, there’s a useful relationship:

B2n =(−1)n−1 · 2(2n)!

(2π)2nζ(2n),

which allows us to find ζ(2), ζ(4), and so on.

One thing that makes it easier for us to deal with Bernoulli numbers is the useful recurrence relation for An:

Proposition 294

We have for all n ≥ 1 that

2An+1 =

n∑k=0

(n

k

)AkAn−k .

(Also, we have the initial conditions A0 = A1 = 1.)

This looks a little like the Catalan number relation (if we remove the 2 and(nk

)). So these are somehow the

“labeled” version of the Catalan numbers!

Proof. The left hand side is the number of ways to have alternating permutations on n + 1 elements that are either

up-down or down-up: w1 < w2 > w3 · · · or w1 > w2 < w3 · · · .Take any permutation in this set, and find the position of (n + 1): let’s say it’s in spot k + 1. In front, we have k

entries, and after, we have n− k entries: both must be alternating, and the orientation (up-down or down-up) is fixed,

because (n + 1) is the largest element. Thus we have(nk

)ways to pick which k elements are before n + 1, Ak · An−k

ways to arrange the remaining elements, and then summing over all k gives the result!

It turns out that we can turn this recurrence relation to a differential equation for our generating function A(x):

2A′(x) = A2(x) + 1.

This is good to look over as an exercise! Note that A′(x) for an exponential generating function shifts the indices by

one, and also notice how similar this looks to the Catalan functional equation.

It turns out these ideas are also related to binary trees! There are two versions: a regular binary tree is one where

every vertex has at most 2 children: a left child and a right child. There’s also a notion of a full binary tree: this is

the subset of normal binary trees where every vertex either has no children (is a leaf) or has both children.

Fact 295

Each full binary tree has an odd number of vertices, because we always add 2 vertices as a time.

It turns out both kinds of binary trees are related to Catalan numbers!

Claim 296. The Catalan number Cn is the number of (regular) binary trees on n vertices, and it’s also the number of

full binary trees on 2n + 1 vertices.

108

Page 109: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Proof. It’s pretty easy to find a bijection between the sets of trees here: given a binary tree on n vertices, add all

missing children (so add both children to each leaf as well). This will create a full binary tree with n non-leafs and

n+1 leaves: that means we indeed have a 2n+1 vertex full binary tree! To go backwards, just remove all leaves from

our tree.

To show that these are equal to Cn, let’s find a bijection between Dyck paths of length 2n and full binary trees

with 2n+1 vertices. Given any Dyck path, we can break it up into consecutive up-steps: let a1, a2, · · · be the lengths

of those groups. (If we have consecutive down-steps, then we still have ai = 0 in the middle: basically, ai counts the

number of up steps on the ith diagonal.)

Now we can construct our tree: attach a1 vertices along a left chain (with all children), attach a2 vertices starting

from the bottom-most right child of the a1-chain, and now repeat. If we have ai = 0, then move one up the diagonal

and keep going! This is one way to search through a binary tree.

Next lecture, we’ll discuss what happens when we label the vertices of our binary trees by numbers (with increasing

labels downward). Then the number of increasing-labeled binary trees on n nodes is equal to n!, and the number of

increasing-labeled full binary trees on 2n+ 1 nodes is equal to An. So alternating numbers are the “labeled version” of

Catalan numbers!

35 May 6, 2019Last lecture, we were discussing binary trees: we found that when our trees are unlabeled, the number of binary trees

on n vertices are the same as the number of full binary trees on 2n + 1 vertices, and both are equal to the Catalan

number Cn.

Here’s the weighted version of that:

Theorem 297

We have lots of results here!

• The number of labeled binary trees on n vertices - that is, the binary trees where the vertices are marked

with the numbers 1 through n - is n!Cn.

• The number of increasing binary trees - that is, those whose entries are larger as we move away from the

root - is n!.

• The number of left-increasing binary trees - that is, those who always have left children larger than parent

- is (n + 1)n−1.

• The number of increasing full binary trees (those whose vertices either are leaves or have both children) on

2n + 1 vertices is A2n+1, the number of alternating permutations on 2n + 1 numbers.

We can come up with simple bijections for some of these.

Proof. We can construct a bijection between increasing binary trees on n vertices and permutations in Sn: this will

prove the second and fourth point. Basically, we just stick 1 in our permutation, put everything on its left before it,

and put everything on its right after it: this is inductively “unfolding” the tree!

It’s easy to go backwards: just find 1 and make it the root of our large tree, and for each of the left and right

parts, find the smallest number in that subsequence and make those the roots of the smaller trees.

109

Page 110: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

So this is a bijection, and since there are n! permutations, there are n! increasing binary trees. But if our tree is

full, we will always get a down-up permutation of size 2n + 1 (which are just mirrors of the number of alternating

permutations)!

As an exercise, we should find the other bijections.

It’s time for us to start talking about non-crossing paths, which might help with the remaining problems on the

problem set.

Problem 298

Let’s say we have two vertices A and B in a square grid, where B is a steps up and b steps to the right: we want

to find the number of lattice paths from A to B that go only up and right.

This is just the binomial coefficient(a+ba

).

Problem 299

Now let’s say we have two initial vertices A1, A2 and two targets B1, B2 in the square grid, and we want to connect

A1 to B1 and A2 to B2. How many ways can we pick two paths that are non-crossing (in other words, they share

no vertices)?

This is actually possible, and it’s known as the Lindstrom or Gessel-Viennot lemma!

Let G be an acyclic digraph (no directed loops), and let’s say we have selected vertices A1, · · · , Ak , B1, · · · , Bk .Define N(A1, · · · , Ak , B1, · · · , Bk) to be the number of ways to connect each Ai with its corresponding Bis using k

pairwise non-crossing paths, such that the paths do not share any vertices.

Suppose that N(A1, · · · , Ak , Bw(1), · · · , Bw(k)) = 0 unless w is the identity (in other words, the only way toconnect them is in the original configuration). In particular, this means our lemma holds for the case where both

the Ais and the Bis are arranged southeast of each other, but not for the case where the Ais are arranged going

northeast and the Bis are arranged going southeast!

Theorem 300 (Lindstrom)

Then N(A1, . . . , Ak , B1, · · · , Bk) is the determinant of the matrix C, where

Ci j = N(Ai , Bj).

Example 301

Let A1 = (0, 1), A2 = (1, 0), B1 = (2, 3) and B2 = (3, 3). How many noncrossing paths are there from A1 to B1and A2 to B2?

110

Page 111: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Then by Lindstrom, we can just find the determinant

det

((42

) (52

)(41

) (52

)) = 20.

Theorem 302

If we remove the bolded condition above, then we get a slightly more complicated formula: the determinant of C

is equal to ∑w∈Sn

(−1)`(w)N(A1, · · · , Ak , Bw(1), · · · , Bw(k)).

It turns out the theorem and proof are both very nice in this case!

Proof. We use the involution principle. Let P (A1, · · · , Ak , B1, · · · , Bk) be the number of ways to connect the Ais with

Bis with any paths: this is just

P (A1, B1) · P (A2, B2) · · ·

where each P (Ai , Bi) is just the binomial coefficient representing the number of ways to get from start to finish with

no restrictions. Now by definition of the determinant,

detC =∑w∈Sk

(−1)`(w)C1,w(1)C2,w(2) · · · ck,w(k),

and now we can represent this as ∑w∈Sk

P (A1, · · · , Ak , Bw(1), · · · , Bw(k)),

because we construct our paths independently. Essentially, think of this as constructing all possible paths fromthe Ais to the Bis, not caring about whether or not our paths cross. Our goal is to cancel out all families of paths

with at least one crossing: we’ll do this with a sign-reversing involution!

Basically, find the “first crossing” of two paths: let’s say they intersect at point X. Now just take everything after

point X and swap it: the rest of path Pi goes to Pj , and the rest of path Pj goes to Pi . (Keep all the other paths the

same.) So now our permutation has introduced the transposition (i j), so the sign reverses.

What does “first crossing” mean? We want to make sure it’s consistent for both the forward and reverse direction.

We have to be careful: if we try the lexicographic minimum (i , j), that doesn’t quite work! Swapping might create a

different lexicographic minimum.

So instead, we find the minimal i for which the path intersects anything. Now, find the first intersection point

on that path: find the minimal j that goes through that path, and take (i , j)!

36 May 8, 2019We’ll start by finishing the Lindstrom-Gessel-Viennot lemma proof. Recall the statement:

111

Page 112: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Theorem 303

Given a directed acyclic digraph G with some vertices A1, · · ·Ak , B1, · · · , Bk , the (weighted with a ±) number of

ways to connect each Ai to Bi for 1 ≤ i ≤ k is the determinant∑w∈Sn

(−1)`(w)N(A1, · · · , Ak , Bw(1), · · · , Bw(k)) = detC

where Ci j is the number of ways to connect Ai to Bj with no other restrictions.

Proof. First, expand out detC as we did last class - see the notes there for details.

The idea is to construct a sign-reversing involution σ on all bad collections of paths: basically, if we have two

collections of paths with intersection, we find the “first intersection” (Pi , Pj , X), where the paths Pi and Pj intersect

at a point X, and then swap Pi and Pj after point X.

We can’t just take the lexicographic minimum (i , j), because the minimum is not preserved - there might be a new

lexicographic minimum! Instead, take the minimal index i such that Pi has an intersection with another path. Let the

first intersection along that path (with another Pj) be point X: however, there can still be a bunch of other paths

through X. Among all of those, find Pj with the smallest index j .Then after we apply σ, we’ll still pick Pj and Pi at point X, and indeed σ reverses the sign of our permutation!

Thus all such terms do cancel out, as desired.

This lemma has a weighted version as well! Let’s now say that every edge e in G is assigned some positive weight

xe > 0, and define

N(A1, · · · , Ak , B1, · · · , Bk) =∑

noncrossing pathsP1,P2,··· ,Pk

∏i

∏e∈Pi

xe .

Theorem 304

Then this quantity ∑w∈Sn

(−1)`(w)N(A1, · · · , Ak , Bw(1), · · · , Bw(k))

is again the determinant of C, where ci j = N(Ai , Bj).

The same proof works: we just need to see that the sign-reversing involution also preserves the weights, because

the multiset of all edges is preserved!

Fact 305

Also, we can make the same assumption that we had before: if the only way to connect the Ais to the Bjs is

A1 → B1, A2 → B2, · · · , then the left side is just N(A1, · · · , Ak , B1, · · · , Bk).

So how can we make sure that this assumption is indeed true, so that our theorem is a lot simpler?

Example 306

Let’s say G is a planar graph that can be drawn in a square so that all the sources A1, · · · , Ak are on the left

side, and all the sinks B1, · · · , Bk are on the right side.

112

Page 113: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Then we can’t connect A1 to anything beside B1, and so on! In particular, our matrix C will have determinant

detC = N(A1, · · · , An, B1, · · · , Bn) ≥ 0,

because it’s just some weighted sum of positive-valued paths. We can actually say a lot more about matrices of this

form!

Definition 307

A matrix C with real entries is totally positive (respectively, totally nonnegative) if all minors (determinants of

square submatrices) are greater than 0 (respectively, nonnegative).

This is much stronger than having a matrix that is positive definite, which only requires that principal minors are

positive!

Example 308

For a 3 by 3 totally positive matrix, we know that all entries are positive, and any square submatrix also has

positive determinant! This is a lot of conditions.

Well, note that in our planar graph, we can always remove any k entries from the left and any k entries from the

right, and we still have only one unique way to choose our path endpoints! So all such matrices C resulting fromplanar graphs G this way are totally nonnegative.

Fact 309

It turns out that a matrix C is totally nonnegative if and only if it can be represnted by a planar graph in this

way!

So somehow there’s a deep connection between these two ideas of planarity and total nonnegativity. How can we

generally get any m by n totally positive matrix?

Start by drawing an m by n grid, so that all vertical edges are directed up and all horizontal edges are directed to

the right. We’ll only put weights on the horizontal edges to avoid redundacy: now label them x11, x12, · · · on the top

row, x21, x22, · · · on the next row, and so on.

We’ll put our Ais from left to right on the bottom row, and we’ll put our Bis from top to bottom on the right

column (this is equivalent to putting the As on the left by deformation). Now we have some matrix C such that

ci j = N(Ai , Bj).

Theorem 310

Then any totally positive matrix can be represented using some xi js.

Example 311

Take m = n = 2.

Here’s what our graph looks like:

113

Page 114: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

A1 A2

B2

B1

z

x

t

y

In this case, all entries are positive (since weights are positive), and the determinant is also positive (in particular,

the only way to connect Ais to Bjs is by using edges x, y , t, so the determinant is xyt).

Corollary 312

Thus, the space of all totally positive m × n matrices is isomorphic to (R>0)mn.

Let’s talk about another application of the Lindstrom lemma: we’re going to go back to Young diagram-like objects

by thinking about plane partitions!

Consider an m × n rectangle broken up into 1 by 1 grid squares. We again put numbers into our grid squares, but

our entries are now weakly decreasing, and we’re allowed to repeat numbers. Here’s an example:

7 7 6 6 4

7 6 5 4 3

5 5 3 3 3

3 3 3 2 1

2 2 2 1 1

Let’s say that all entries are in {1, k}. Is it possible to calculate the number of such plane partitions? Here’s the

complete list for m = n = k = 2:

1 1

1 1, 2 1

1 1, 2 2

1 1, 2 1

2 1, 2 2

2 1, 2 2

2 2

Example 313

For k = 2, the number of such plane partitions is(n+mn

): this is because we just need to find the path that

separates the 1s and 2s from each other.

Can we extend this logic in general? We can again draw paths Pk that separate entries > k from those ≤ k for all

k , and this creates (k − 1) weakly noncrossing paths in an m × n grid: they can intersect but not cross over each

other.

But now just slightly perturb each path: have Pk−1 starting at Ak−1 = (0, 0) and ending at Bk−1 = (m, n), Pk−2starting at (1,−1) and ending at (m + 1, n − 1), and so on. Now the paths are non-crossing, and we can apply the

Lindstrom lemma: we have a (k − 1) by (k − 1) matrix with entries ci j =(m+nm+i−j

)(which is just the number of ways

to get from Ai to Bj . There’s actually an explicit product formula, but we’ll skip over it for now!

Well, we can think of our plane partitions as three-dimensional Young diagrams: make each number c into a tower

of c cubes stacked on top of each other! In general, if we rotate our picture, this can be bijected into rhombus tilings

114

Page 115: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

of hexagons with pairs of opposites of length m, n, k . This tells us that the condition is actually symmetric on m, n, k ,

and we’ll look more at the explicit formula at some point.

The last problem set is due on Friday!

37 May 10, 2019Remember that last lecture, we started talking about plane partitions. As a review, these are m× n arrays of integers

that are weakly decreasing across rows and columns. Let’s assume that the numbers that appear are in the set

{0, 1, 2, · · · , k}.Denote P (m, n, k) to be the number of such plane partitions: we learned that there are alternate ways to interpret

this number. First of all, we can represent plane partitions with k weakly noncrossing paths (it’s okay to intersect but

not cross), and then we can shift them a bit to get noncrossing paths. The Lindstrom lemma then tells us that

P (m, n, k) = detC,

where our matrix has size k × k and entries

ci j =

(m + n

m + i − j

).

Here, we still have to calculate a determinant, but it’s a bit of work.

Proposition 314 (MacMahon, 1895)

It turns out we can write this as

P (m, n, k) =

m∏i=1

n∏j=1

k∏`=1

i + j + `− 1i + j + `− 2 .

Example 315

Let’s set (m, n, k) = (5, 4, 3): then the value should be the determinant

det

((95

) (94

)(96

) (95

)) = 2(9!)2

(5!)2 · 3!4!

which is the same as the product formula answer if we bash.

Notice that this formula is symmetric in m, n, k , which may not be obvious from the determinant formula!

It’s good that plane partitions can be thought about in many ways. One thing we did last class was think of a

plane partition as a set of cubes, where the numbers on top of the squares represent the height or number of cubes:

for example, 2 22 1

is a 2× 2× 2 cube with one cube removed.

This is (in some way) a three-dimensional Young diagram! Basically, we want to put a bunch of cubes in our

k ×m × n box so that they’re all “justified” towards a specific corner. If we deform the shape a bit, we can also view

this as an equiangular hexagon with a rhombus tiling:

115

Page 116: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Proposition 316

P (m, n, k) is the number of ways to tile an equiangular hexagon with sides of length m, n, k,m, n, k with tiles

, , .

Example 317

Take m = n = k = 3.

It’s important to note that by default, we tile our rhombus like this:

.

Now the center of the hexagon is our “justified corner” for our cubes. For example, the plane partition 2 22 1

will

yield the following rhombus tiling (which can also be interpreted as being inside a cube):

.

Another way to think of this is to start with an equilateral triangle tiling of our hexagon.

Then rhombi are formed by connecting two faces with an edge, and therefore we can draw the planar dual graphof our equilateral triangle grid. We now have a hexagonal tiling, and rhombus tiling is now a perfect matching of the

edges of a hexagon, which is also called a dimer model by physicists.

Next, we’ll talk about another combinatorial object that looks similar: domino tilings!

116

Page 117: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Definition 318

Start with an m × n rectangular grid. A domino tiling is a covering of the mn squares with 1× 2 dominoes with

no holes: define N(m, n) to be the number of such domino tilings.

Is there anything we can say about these?

Lemma 319

If m and n are both odd, then N(m, n) = 0.

This is because there are an odd number of squares, and each domino takes up an even number of spots. In general,

the best way to approach this is to color our m×n rectangle in the usual chessboard way: we want a perfect matching

of the white and black vertices, which form a bipartite graph.

It turns out this is related to the permanent of a matrix, which is like the determinant but without any negative

signs. Unfortunately, this is much harder to calculate because we don’t have tools like eigenvalues to calculate it!

Well, Kasteleyn figured out how to deal with this: instead of using the adjacency matrix as usual, we replace vertical

1s in the matrix with is.

Theorem 320 (Kasteleyn, 1961)

Take n to be even without loss of generality. Then the number of ways to tile an m × n rectangle is

N(m, n) =

n/2∏k=1

bm/2c∏`=1

(4 cos2

πk

n + 1+ 4 cos2

π`

m + 1

)

times another (2 cos πbm/2+1cm+1 ) when m is odd.

This problem has applications to statistical physics: it’s used because in physics, we care about the asymptotic

number of matchings as our grid gets larger! We won’t prove this unless we have time to come back to it later.

Let’s look at another domino-tiling result:

Theorem 321 (Temperley, 1974)

Suppose m, n are both odd. Then the number of ways to tile an m × n grid without a corner square, if m =

2k + 1, n = 2`+ 1, is the number of spanning trees of a k × ` grid.

This is a good way to get approximate asymptotics! We can prove this with Temperley’s bijection. Given a

domino tiling, color the underlying (2k + 1) by (2`+ 1) grid black and white so that the corners are black: now take

those black entries (i , j) where i , j are both odd, and color them red.

117

Page 118: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Now we form a spanning tree on the red k × ` grid as follows: if there’s a domino that is pointed along the line

between two adjacent nodes, connect those two, and otherwise don’t. As an exercise, show that this always forms a

spanning tree!

Fact 322

By the way, if we remove some other box (which is of the same checkerboard color as the corner) along a side,

then the number of domino tilings is still the same. Try to find a bijection!

Next class, we’ll do presentations on the problem set due today!

38 May 13, 2019We’re going over the problem set solutions today.

Problem 323

Find a bijective proof for the number of spanning trees in a complete bipartite graph (mn−1nm−1).

Solution by Sanzeed. We will construct a sequence of vertices of length m + n − 2. Notice that if one side has more

vertices than the other, then there will be at least one vertex with degree 1 on that side. Pick the vertex with degree

1 with smallest index on that side, and just like in the Prufer code, add its neighbor to our sequence.

Now repeat this: check which side has more vertices, remove the vertex of smallest index with degree 1, and add its

neighbor to our code. Just like in the Prufer code, we can recover our original tree with this sequence. Since we start

with m and n vertices, respectively, we’ll get n − 1 and m − 1 vertices from each part of our bipartition, respectively,

in our sequence. This can be written in any of mn−1nm−1 ways, as desired!

Problem 324

Prove the equivalence of the parking functions conditions: (1) f is a parking function if and only if (2) the number

of f (i)s that are ≥ n − k + 1 is at least k for all i , which happens if and only if (3) there is a permutation w(i)

such that f (i) ≤ w(i) for all i .

SOlution by Fadi. Show (1) implies (2) with the contrapositive. If there are more than k cars that want to park in

the last k spots, f can’t be a parking function because there aren’t enough spots!

For (2) implies (1), again use the contrapositive. assume f is not a parking function: then there has to exist some

car i that doesn’t park. Spots f (i), f (i) + 1, · · · must all be full, all cars that park in the spots after i must have had

their initial values of f at least equal to f (i) + 1, which violates condition 2.

118

Page 119: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

For (1) implies (3), make the permutation where i goes to its eventual parking spot: each eventual spot is at least

the value of f (i).

Finally, (3) implies (1) comes from decreasing entries one by one: (2) is never violated, so we must always have a

parking function.

Problem 325

Show Abel’s identity (that will be seen in the proof).

Solution by Congyue. Consider the graph of n + 2 vertices A, B, and n others, where we have edges A → B with

weight 1, A → [n] with weight x , and B → [n] with weight y . Finally, all edges in [n] have directed weight z in both

directions.

The number of out-trees spanning trees here rooted at A can be found by taking A → B, and now we put some

k vertices in the same connected component as A and n − k vertices in that of B. The number of forests of i + 1

components in Kk is(k−1i

)kk−1−i , and then we need to pick i +1 edges: this gives a weight of x i+1. We also need to

pick some edges below to connect the rest of the k vertices, which gives a weight of zk−1−i .

So this contribution isk−1∑i=0

(k − 1i

)kk−1−ix i+1zk−i−1 = x(x + kz)k−1.

Similarly, the other n − k vertices give a contribution of

y(y + (n − k)z)n−k−1,

so for all trees, we have a weighted sum of

n∑k=0

(n

k

)x(x + kz)k−1y(y + (n − k)z)n−k−1.

But on the other hand, we can use the directed matrix tree theorem to compute the weight: the Laplacian has form

Lin =

0 −1 −x · · · − x0 1 −y · · · − y0 0 A

where A is an n by n matrix with diagonal entries x + y + (n− 1)z and all other entries −z , which has a determinant

that evaluates to (x + y)(x + y + nz)n−1 by taking the product of eigenvalues. This yields the desired result

(x + y)(x + y + nz)n−1 =

n∑k=0

(n

k

)x(x + kz)k−1y(y + (n − k)z)n−k−1.

For the first identity, we can replace y + nz = sand finish by induction on n.

Alternative solution by Ganatra. The second one follows from the first: we’ll show an algebraic proof for the first one.

We’ll induct on n. n = 0 is trivia, and so is n = 1: (x + y) =∑1k=0

(1k

)y(y + kz)k−1(x − kz)1−k can be directly

verified.

Assume for n ≥ 2 that we already know

(x + y)n−1 =

n−1∑k=0

(n − 1k

)y(y +Kz)k−1(x − kz)n−k−1.

119

Page 120: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

We just need to show that we have equality of derivatives to show that the coefficients are the same. The derivative

with respect to x and y are essentially symmetric: the derivative

d

dx[(x + y)n] = n(x + y)n−1,

andd

dx

[n∑k=0

(n

k

)y(y + kz)k−1x(x − kz)n−k

]=

[n∑k=0

(n

k

)y(y + kz)k−1(n − k)(x − kz)n−k−1

].

Since(nk

)(n − k) = n

(n−1k

), this now simplifies to

n

n−1∑k=0

(n − 1k

)y(y + kz)k−1(x − kz)n−k−1,

and by the induction hypothesis, this is just n(x + y)n−1, which is just the derivative. Now check the constant terms:

replacing x = −y , the left side becomes 0, and we can show that the right hand side also vanishes because we have

alternating binomial coefficients.

Problem 326

Compute the number of Eulerian cycles in a bidirected n-cube graph.

Solution by Sophia. By the BEST theorem, this number is just the number of intrees rooted at some vertex r , multiplied

by (outdeg(v)− 1)! for all v .

An n-cube has 2n vertices, and each term has outdegree n, so this product becomes

[(n − 1)!]2n .

We also know the number of spanning trees on an n-cube: the number of spanning trees is equal to the number of

in-trees, because we can direct all edges of a spanning tree towards the root. That gives us a factor of

22n−n−1

n∏k=1

k(nk)

and multiplying these gives the answer.

Problem 327

Prove that the generating function ∑ Ann!xn = tan x + sec x.

Solution by Song Wenzhu. We proved during lecture that

2An =

n∑k=1

(n

k

)Ak−1An−k

which simplifies to

(n − 1)!n∑k=1

Ak−1(k − 1)!

An−k(n − k)! .

120

Page 121: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

We know that our generating function (if we denote ck = Akk! )

G(x) =∑ckx

k

satisfies

G(x)2 = c20 +

1∑k=0

(ckc1−k)x + · · ·+n∑k=0

(ckcn−k)xn

and plugging in the recurrence relation,

= c20 + 2

∞∑k=2

kckxk−1 = 2G′(x) + 1.

This is a differential equation:G2 + 1

G′=1

2=⇒

1

2x + C = arctanG,

and use initial conditions to yield

G = tan

(1

2x + C

)= tan x + sec x.

Problem 328

Find bijections between the following sets: (1) the set of labelled trees on n + 1 vertices, (2) the set of plane

binary trees on n vertices labelled by [n] such that the left child of a vertex always has a bigger label than its

parent, (3) the set of Dyck paths of length 2n with up steps labelled by [n] (and unlabelled down steps) such that,

for any two consecutive up steps, the label of the second step is greater than the label of the first step, (4) the

set of parking functions of size n.

Proof by Vanshika. We’ll do just one of them for time. Do a “depth-first search:” go around the tree starting from the

left, turning back whenever you run out of space. Every time you go down, go up on the Dyck path, and every time

we go up, go down on the Dyck path. This works because consecutive sequences of up steps are always increasing,

and by construction, we never go below the x-axis. To go backwards, construct a sequence of arrows: go down every

time we go up, and vice versa. There’s n numbers in our tree, so we have 2n number in our Dyck path.

To construct the parking function, put f (x) = d if x is in the dth diagonal.

39 May 15, 2019We’ll talk some more about plane partitions today! Remember that we take an m × n rectangle, where we have m

columns and n rows. We fill the grid with weakly decreasing numbers from 0 to k , inclusive.

Then the number of possible plane partitions, by the Lindstrom lemma, is the determinant of the k × k matrix C

where entries are

ci j =

(m + n

m + i − j

).

MacMahon also gave us the formula

=

m∏i=1

n∏j=1

k∏`=1

i + j + `− 1i + j + `− 2 .

121

Page 122: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

There are several geometric ways to think about this: plane partitions correspond to rhombus tilings of hexagons with

side lengths m, n, k,m, n, k , as well as perfect matchings in a honeycomb graph. In fact, there’s another way to think

about these plane partitions: we can also treat them as pseudo-line arrangements.Basically, pseudo-lines are like lines, but they don’t have to be straight. We can convert any rhombus tiling into

a pseudo-line diagram! Here’s the process: start on one side of the region. For each pair of opposite sides of our

hexagon, draw pseudo-lines by following the common edges of rhombi! For example, if we’re drawing pseudo-lines

from top to bottom, start with a rhombus that has a horizontal edge along the top edge of the hexagon, and then

connect this rhombus to the rhombus that shares the bottom horizontal edge. Repeat until we reach the bottom edge

of our hexagon. Here’s an example of a pseudo-line:

Then we’ll have some intersections between the pseudo-lines we’ve drawn, and this is in one-to-one correspondence

with our original tiling! This comes from the theory of symmetric polynomials, which are related to Young diagrams

and the Schensted correspondence, among many other things we’ve discussed in this class!

Definition 329

A polynomial f (x1, · · · , xn) is symmetric if it is invariant under the permutations of the variables: f (x1, · · · , xn) =f (xw(1), · · · , xw(n)) for all permutations w ∈ Sn.

The simplest polynomials are called the elementary symmetric polynomials e1, · · · , en: we have

e1 = x1 + · · ·+ xn,

e2 = x1x2 + x1x3 + · · ·+ xn−1xn,...

and in general, ek is the sum of all square-free monomials of degree k . We have an important result:

Theorem 330

Any symmetric polynomial f (x1, · · · , xn) can be written uniquely as a polynomial in the elementary symmetric

polynomials e1, · · · en.

To show why this is useful, we’ll introduce a new combinatorial object:

Definition 331

A semi-standard Young tableau (SSYT) for a Young diagram λ is a filling of λ with the numbers 1, 2, · · · such

that the entries increase strictly in columns and weakly in rows.

122

Page 123: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

Remember that standard Young tableau require us to use each number exactly once; this is no longer true here!

Here’s an example:1 1 1 1 2 2 2 3

2 2 2 3 3 4 4

3 3 3 4 4

4 4 6 6

Definition 332

Let λ be a Young diagram with at most n rows. Define the Schur polynomial

sλ(x1, · · · , xn) =∑

SSYT ofshape λ

filled with[1,2,··· ,n]

x#1’s1 · · · x#n’sn

(Note that we need at most n rows, because the first entries of the rows are 1, 2, · · · , and so on.)

Example 333

The Schur polynomial for a single box is just x1 + x2 + · · ·+ xn = e1, and in general, the polynomial for a column

of k boxes is the kth symmetric polynomial, since we pick some k of the n numbers to put in our semistandard

Young tableau.

When we add multiple columns, though, things become more interesting!

Example 334

The Schur polynomial for a horizontal domino is now∑i≤j xixj = x

21 + x1x2 + x

22 + · · · = e21 − e2.

Theorem 335

Any symmetric polynomial f (x1, · · · , xn) can actually be written uniquely as a linear combination

f =∑λ

cλsλ(x1, · · · , xn)

where sλ is a Schur polynomial.

In other words, the Schur polynomials form a linear basis, and the elementary polynomials form an algebraic basis.How are these two theorems related to each other?

Theorem 336 (Jacobi-Trudi)

Let λ = (λ1, · · · , λe) be a partition, where e ≤ n, and let λ′ = (λ′1, · · · , λ′m) be its conjugate partition (basically,

we take the size of the columns instead of the size of the rows). Then

sλ(x1, · · · , xn) = det

eλ′1 eλ′1+1 · · · eλ′1+(m−1)eλ′2−1 eλ′2 · · · eλ′2+(m−2)...

.... . .

...

eλ′m−(m−1) eλ′m−(m−2) · · · eλ′m

where we assume e0 = 1 and e−k = 0 for all k < 0.

123

Page 124: 18.212: Algebraic Combinatoricslindrew/18.212.pdfRichard Stanley’s Enumerative Combinatorics, volumes 1 and 2. This is a graduate-level book, and there is a lot of material there

For example, the Schur polynomial of the horizontal domino, where λ = (2) and λ′ = (1, 1), is

det

(e1 e2

e0 e1

)

This looks a lot like the binomial coefficients we got from the Lindstrom lemma, and indeed it’s possible to connect

these ideas! We can think of semistandard Young Tableau as noncrossing lattice paths, and this will indeed prove

Jacobi-Trudi from the Lindstrom lemma.

But how are these connected to semistandard Young tableaux? For example, what if we want to calculate the

number of them?

Theorem 337

We can just plug in x1 = x2 = · · · = xn: this yields

sλ(1, 1, · · · , 1) = detC,

where the entries of our m ×m matrix

ci j =

(n

λ′i + j − i

).

It turns out that there are two ways to write this determinant as a product: it’s equal to

=∏

1≤i<j≤n

λi − λj + j − ij − i =

∏a∈λ

n + c(a)

h(a).

The latter is called the hook-content formula: here, h(a) is the same hook length as we’ve been discussing, and

c(a) is the content, equal to j − i .How is all of this related to plane partitions? We’ll connect semi-standard Young tableaux with reverse plane

partitions, which are those where the entries are increasing in rows and columns. If our SSYTs are filled with

numbers from 1 to n, and our reverse plane partitions are filled with numbers from 0 to k , we have an exact product

formula for any shape for Young tableaux but only really for rectangular plane partitions. Why are rectangular shapes

better for reverse plane partitions?

Lemma 338

RPP’s of rectangular shape n×m filled with numbers 0, 1, · · · , k are in bijection with semistandard Young tableaux

of the same shape n ×m filled with 1, 2, · · · , k + n: add i to all entries in the ith row.

But notice that this bijection doesn’t work for any other shapes! Rectangles only have one outer corner, and it’s

enough to say that the bottom right corner is at most k to force the numbers to be between 0 and k . Unfortunately,

with nonrectangles, the multiple corners mess things up, and that means we don’t actually have nice explicit formulas

for other shapes of RPPs.

There are many books we can read and many other classes to learn about algebraic combinatorics!

124