Counting Permutations by Putting Balls into...

35
Counting Permutations by Putting Balls into Boxes Ira M. Gessel Brandeis University C&O@40 Conference June 19, 2007

Transcript of Counting Permutations by Putting Balls into...

Page 1: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

Counting Permutationsby Putting Balls into Boxes

Ira M. Gessel

Brandeis University

C&O@40 ConferenceJune 19, 2007

Page 2: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

I will tell you shamelessly what my bottom line is: It is placingballs into boxes.

—Gian-Carlo Rota, Indiscrete Thoughts

Page 3: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

Eulerian polynomials

If π is a permutation of [n] = {1, 2, . . . , n}, a descent of π is ani , with 1 ≤ i ≤ n − 1, such that π(i) > π(i + 1).

Example: 1 3 • 2 6 • 4 5 has two descents.Let Sn be the group of permutations of [n]. How manypermutations in Sn have i descents? Let us define the Eulerianpolynomials

En(t) =∑

π∈Sn

tdes(π).

Then E1(t) = 1, E2(t) = 1 + t , E3(t) = 1 + 4t + t2.

Page 4: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

Theorem.∞∑

k=1

kntk−1 =

∑π∈Sn

tdes(π)

(1− t)n+1

Proof. kn is the number of placements of n balls, labeled 1, 2,. . . , n, into k boxes. We will associate to each placement apermutation π ∈ Sn so that the total contribution from π istdes(π)/(1− t)n+1. We represent a placement

2 5 1 3 4

more compactly as2 5 | 1 | | 3 | 4 |

The balls in each box are in increasing order.

Page 5: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

We remove the bars from the placement 2 5 | 1 | | 3 | 4 | to getthe permutation 2 5 1 3 4.

So we can think of a placement as a permutation with bars in it:a barred permutation.

Which barred permutations correspond to 2 5 1 3 4?

We needat least one bar in every descent, so we start with

2 5 | 1 3 4

Then we put any number of additional bars in each of the 6spaces to get 2 5 | 1 | | 3 | 4 | . We assign the weight t to eachbar. Then the contribution from this permutation is

t(1 + t + t2 + · · · )6 =t

(1− t)6

Page 6: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

We remove the bars from the placement 2 5 | 1 | | 3 | 4 | to getthe permutation 2 5 1 3 4.

So we can think of a placement as a permutation with bars in it:a barred permutation.

Which barred permutations correspond to 2 5 1 3 4? We needat least one bar in every descent, so we start with

2 5 | 1 3 4

Then we put any number of additional bars in each of the 6spaces to get 2 5 | 1 | | 3 | 4 | . We assign the weight t to eachbar. Then the contribution from this permutation is

t(1 + t + t2 + · · · )6 =t

(1− t)6

Page 7: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

We remove the bars from the placement 2 5 | 1 | | 3 | 4 | to getthe permutation 2 5 1 3 4.

So we can think of a placement as a permutation with bars in it:a barred permutation.

Which barred permutations correspond to 2 5 1 3 4? We needat least one bar in every descent, so we start with

2 5 | 1 3 4

Then we put any number of additional bars in each of the 6spaces to get 2 5 | 1 | | 3 | 4 | . We assign the weight t to eachbar. Then the contribution from this permutation is

t(1 + t + t2 + · · · )6 =t

(1− t)6

Page 8: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

In general, the contribution from a permutation π of [n] is

tdes(π)

(1− t)n+1

so∞∑

k=1

kntk−1 =

∑π∈Sn

tdes(π)

(1− t)n+1 .

Note that if there are k boxes then there are k − 1 bars.

Page 9: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

The Method of Barred Permutations

A barred permutation is a permutation of balls numbered 1 to nwith bars in it. Between (and before and after) the bars areboxes and between (and before and after) the balls are spaces.

spaces

boxes

0

21

05

2

| 11|2

3

| 43|4

34|5

5|6

We can count barred permutations in two ways:

1) Start with bars, and put balls into boxes.

2) Start with a permutation, and put bars into spaces.

Note: The method of barred permutations is closely related tothe method of P-partitions (MacMahon, Knuth, Stanley).

Page 10: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

2-descents

We consider barred permutations in which consecutive ballscannot be in the same box.

3 | 5 7 || 1 | 2 6 | 4

How many placements of n balls in k boxes are there?

Ball 1: k boxesBall 2: k − 1 boxesBall 3: k − 1 boxes

. . .Ball n: k − 1 boxes

So there are k(k − 1)n−1 placements.

Page 11: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

2-descents

We consider barred permutations in which consecutive ballscannot be in the same box.

3 | 5 7 || 1 | 2 6 | 4

How many placements of n balls in k boxes are there?

Ball 1: k boxesBall 2: k − 1 boxesBall 3: k − 1 boxes

. . .Ball n: k − 1 boxes

So there are k(k − 1)n−1 placements.

Page 12: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

If we start with a permutation (for example, 4 1 2 5 3 6) we mustput a bar in each descent, but also in any space where m isfollowed by m + 1:

4 | 1 | 2 5 | 3 6

Then we put an arbitrary number of additional bars in eachspace:

|| 4 | 1 || 2 5 | 3 || 6 |

We call i a 2-descent of π if π(i) + 2 > π(i + 1). Then by thesame reasoning as before,

∞∑k=1

k(k − 1)n−1tk−1 =

∑π∈Sn

t2-des(π)

(1− t)n+1 .

Page 13: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

If we start with a permutation (for example, 4 1 2 5 3 6) we mustput a bar in each descent, but also in any space where m isfollowed by m + 1:

4 | 1 | 2 5 | 3 6

Then we put an arbitrary number of additional bars in eachspace:

|| 4 | 1 || 2 5 | 3 || 6 |

We call i a 2-descent of π if π(i) + 2 > π(i + 1). Then by thesame reasoning as before,

∞∑k=1

k(k − 1)n−1tk−1 =

∑π∈Sn

t2-des(π)

(1− t)n+1 .

Page 14: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

If we start with a permutation (for example, 4 1 2 5 3 6) we mustput a bar in each descent, but also in any space where m isfollowed by m + 1:

4 | 1 | 2 5 | 3 6

Then we put an arbitrary number of additional bars in eachspace:

|| 4 | 1 || 2 5 | 3 || 6 |

We call i a 2-descent of π if π(i) + 2 > π(i + 1). Then by thesame reasoning as before,

∞∑k=1

k(k − 1)n−1tk−1 =

∑π∈Sn

t2-des(π)

(1− t)n+1 .

Page 15: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

If we start with a permutation (for example, 4 1 2 5 3 6) we mustput a bar in each descent, but also in any space where m isfollowed by m + 1:

4 | 1 | 2 5 | 3 6

Then we put an arbitrary number of additional bars in eachspace:

|| 4 | 1 || 2 5 | 3 || 6 |

We call i a 2-descent of π if π(i) + 2 > π(i + 1). Then by thesame reasoning as before,

∞∑k=1

k(k − 1)n−1tk−1 =

∑π∈Sn

t2-des(π)

(1− t)n+1 .

Page 16: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

We could define r -descents similarly: π(i) + r > π(i + 1). Thesame reasoning would give

∞∑k=1

k(k−1)(k−2) · · · (k−r+2)(k−r+1)n−r+1tk−1 =

∑π∈Sn

t r-des(π)

(1− t)n+1 .

(Foata-Schützenberger)

Note that k(k − 1)(k − 2) · · · (k − r + 2)(k − r + 1)n−r+1 is thechromatic polynomial of the graph with vertex set [n] in whichtwo vertices are adjacent if and only if they differ by at mostr − 1; i.e., they are not allowed in the same box. A similar resultholds for the chromatic polynomial of any chordal graph.

Page 17: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

We could define r -descents similarly: π(i) + r > π(i + 1). Thesame reasoning would give

∞∑k=1

k(k−1)(k−2) · · · (k−r+2)(k−r+1)n−r+1tk−1 =

∑π∈Sn

t r-des(π)

(1− t)n+1 .

(Foata-Schützenberger)

Note that k(k − 1)(k − 2) · · · (k − r + 2)(k − r + 1)n−r+1 is thechromatic polynomial of the graph with vertex set [n] in whichtwo vertices are adjacent if and only if they differ by at mostr − 1; i.e., they are not allowed in the same box. A similar resultholds for the chromatic polynomial of any chordal graph.

Page 18: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

Signed Permutations

A signed permutation of [n] is permutation of [n] in which theentries may have minus signs:

−4 2 − 1 − 5 3

It’s convenient to write i for −i so we’ll write this signedpermutation as

4 2 1 5 3

Sometimes it’s useful to think of a signed permutation as apermutation of the set {−n,−n + 1, . . . , n − 1, n} (with orwithout 0) with the property that π(−i) = −π(i). We denote byBn the set (or group) of signed permutations of [n]. (This is thehyperoctahedral group, the Coxeter group of type Bn.)

Descents of signed permutations are defined as usual exceptthat if π(1) < 0 then 0 is a descent of π. (Think of π(0) = 0.)

Page 19: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

Theorem. (Steingrímsson)

∞∑k=0

(2k + 1)ntk =

∑π∈Bn

tdes(π)

(1− t)n+1

To prove this formula, we count barred signed permutations.

2 4 | 3 1 5 | | 6

In the first box (box 0) only positive numbers can appear but inthe other boxes, positive and negative numbers can appear.

How many barred permutations have k bars? For each of the nballs, we can make it positive and put it in any of k + 1 boxes ormake it negative and put it in any of k boxes. So there are(k + 1) + k = 2k + 1 possibilities for each ball, so (2k + 1)n inall.

Page 20: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

Theorem. (Steingrímsson)

∞∑k=0

(2k + 1)ntk =

∑π∈Bn

tdes(π)

(1− t)n+1

To prove this formula, we count barred signed permutations.

2 4 | 3 1 5 | | 6

In the first box (box 0) only positive numbers can appear but inthe other boxes, positive and negative numbers can appear.

How many barred permutations have k bars? For each of the nballs, we can make it positive and put it in any of k + 1 boxes ormake it negative and put it in any of k boxes. So there are(k + 1) + k = 2k + 1 possibilities for each ball, so (2k + 1)n inall.

Page 21: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

Flag descentsAdin, Brenti, and Roichman (2001) defined the flag-descentnumber of a signed permutation π by

fdes(π) = 2 des π − χ(π(1) < 0).

In other words all descents are counted twice, except that adescent in position 0 is counted only once. They proved

∞∑k=1

kntk−1 =

∑π∈Bn

t fdes(π)

(1− t)(1− t2)n .

Comparing this with our formula for Eulerian polynomials,∞∑

k=1

kntk−1 =

∑π∈Sn

tdes(π)

(1− t)n+1 ,

we see that their result is equivalent to∑π∈Bn

t fdes(π) = (1 + t)n∑

π∈Sn

tdes(π).

Page 22: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

Flag descentsAdin, Brenti, and Roichman (2001) defined the flag-descentnumber of a signed permutation π by

fdes(π) = 2 des π − χ(π(1) < 0).

In other words all descents are counted twice, except that adescent in position 0 is counted only once. They proved

∞∑k=1

kntk−1 =

∑π∈Bn

t fdes(π)

(1− t)(1− t2)n .

Comparing this with our formula for Eulerian polynomials,∞∑

k=1

kntk−1 =

∑π∈Sn

tdes(π)

(1− t)n+1 ,

we see that their result is equivalent to∑π∈Bn

t fdes(π) = (1 + t)n∑

π∈Sn

tdes(π).

Page 23: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

Their proof was by induction, but we can give a direct proofusing barred permutations. Let’s first go back to theenumeration of signed permutations by descents. Instead oflooking at the sequence π(1) π(2) · · ·π(n), let’s look at

π(−n) · · ·π(−1) π(0) π(1) · · ·π(n),

where π(−i) = −π(i) and in particular, π(0) = 0. We consideronly “symmetric" barred permutations, for example

| 1 || 3 2 | 0 | 2 3 ||1|

or| 1 || 3 | 2 0 2 | 3 ||1|

These symmetric barred permutations have 2(n + 1) spacesand 2k bars for some k . (So if we want to weight all the barsequally, we should weight each one by

√t rather than t).

If we know the right half of a such a barred permutation (thepart to the right of the 0) then the left half is determined. Sowhat have we gained?

Page 24: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

We can give a slightly different argument from before that thenumber of barred permutations with 2k bars (corresponding tok bars before) is (2k + 1)n. With 2k bars there are now 2k + 1spaces, so we put the numbers 1, 2,. . . , n arbitrarily into these2k + 1 spaces, and then the locations of −1, −2, . . . , −n (and0) are determined

| | | | | | | |

| | | 3 | 2 | | |1|

| 1 | | 3 | 2 0 2 | 3 | |1|

Page 25: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

We can give a slightly different argument from before that thenumber of barred permutations with 2k bars (corresponding tok bars before) is (2k + 1)n. With 2k bars there are now 2k + 1spaces, so we put the numbers 1, 2,. . . , n arbitrarily into these2k + 1 spaces, and then the locations of −1, −2, . . . , −n (and0) are determined

| | | | | | | |

| | | 3 | 2 | | |1|

| 1 | | 3 | 2 0 2 | 3 | |1|

Page 26: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

We can give a slightly different argument from before that thenumber of barred permutations with 2k bars (corresponding tok bars before) is (2k + 1)n. With 2k bars there are now 2k + 1spaces, so we put the numbers 1, 2,. . . , n arbitrarily into these2k + 1 spaces, and then the locations of −1, −2, . . . , −n (and0) are determined

| | | | | | | |

| | | 3 | 2 | | |1|

| 1 | | 3 | 2 0 2 | 3 | |1|

Page 27: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

For flag descents, we do the same thing, but without 0. Forexample, if we start with the permutation 3 2 1, adding in itsnegative half gives

1 2 3 3 2 1

There are now 7 spaces, rather than 8, and they are paired,except for the central space. Then if we count the barredpermutations corresponding to this permutation (weightingeach bar with t), the bars in the n noncentral spaces come inpairs, but the bars in the center space do not.

|| 2 | 1 3 ||| 3 1 | 2 ||

So the sum of the weights of the barred permutationcorresponding to a given permutation π is

t fdes(π)

(1− t)(1− t2)n

Page 28: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

For flag descents, we do the same thing, but without 0. Forexample, if we start with the permutation 3 2 1, adding in itsnegative half gives

1 2 3 3 2 1

There are now 7 spaces, rather than 8, and they are paired,except for the central space. Then if we count the barredpermutations corresponding to this permutation (weightingeach bar with t), the bars in the n noncentral spaces come inpairs, but the bars in the center space do not.

|| 2 | 1 3 ||| 3 1 | 2 ||

So the sum of the weights of the barred permutationcorresponding to a given permutation π is

t fdes(π)

(1− t)(1− t2)n

Page 29: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

To get the other side of the equation, we note that the numberof bars need not be even; it can be any number. If there arek − 1 bars, there are k boxes, and thus kn ways to put 1, 2, . . . ,n into the boxes, and as before the locations of 1, 2, . . . , n aredetermined.

So we have Adin, Brenti, and Roichman’s identity

∞∑k=1

kntk−1 =

∑π∈Bn

t fdes(π)

(1− t)(1− t2)n .

Page 30: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

To get the other side of the equation, we note that the numberof bars need not be even; it can be any number. If there arek − 1 bars, there are k boxes, and thus kn ways to put 1, 2, . . . ,n into the boxes, and as before the locations of 1, 2, . . . , n aredetermined.

So we have Adin, Brenti, and Roichman’s identity

∞∑k=1

kntk−1 =

∑π∈Bn

t fdes(π)

(1− t)(1− t2)n .

Page 31: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

We do not have a bijective proof of∑π∈Bn

t fdes(π) = (1 + t)n∑

σ∈Sn

tdes(σ).

However, our approach gives a refinement of this formula, bytelling us which permutations in Bn correspond to eachpermutation in Sn.

For σ ∈ Sn, let B(σ) be the set of 2n signed permutations in Bnobtained from σ by the following procedure:

• First we cut σ into two parts:

1425637 → 142 5637

• Next we reverse and negate the first part:

241 5637

• Finally we shuffle the two parts:

2564137

Page 32: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

We do not have a bijective proof of∑π∈Bn

t fdes(π) = (1 + t)n∑

σ∈Sn

tdes(σ).

However, our approach gives a refinement of this formula, bytelling us which permutations in Bn correspond to eachpermutation in Sn.

For σ ∈ Sn, let B(σ) be the set of 2n signed permutations in Bnobtained from σ by the following procedure:

• First we cut σ into two parts:

1425637 → 142 5637

• Next we reverse and negate the first part:

241 5637

• Finally we shuffle the two parts:

2564137

Page 33: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

We do not have a bijective proof of∑π∈Bn

t fdes(π) = (1 + t)n∑

σ∈Sn

tdes(σ).

However, our approach gives a refinement of this formula, bytelling us which permutations in Bn correspond to eachpermutation in Sn.

For σ ∈ Sn, let B(σ) be the set of 2n signed permutations in Bnobtained from σ by the following procedure:

• First we cut σ into two parts:

1425637 → 142 5637

• Next we reverse and negate the first part:

241 5637

• Finally we shuffle the two parts:

2564137

Page 34: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

Then ∑π∈B(σ)

t fdes(π) = (1 + t)ntdes(σ)

Proof sketch. The set of barred permutations of σ (in Sn) is the

same as the set of barred permutations of elements of B(σ) (inBn). Therefore

tdes(σ)

(1− t)n+1 =

∑π∈B(σ) t fdes(π)

(1− t)(1− t2)n .

Example.

3 | 1 ||| 2 → 2 3 | 1 || 1 | 3 2

3 1 2 → 1 3 2

Page 35: Counting Permutations by Putting Balls into Boxespeople.brandeis.edu/~gessel/homepage/slides/balls-into-boxes.pdf · I will tell you shamelessly what my bottom line is: It is placing

Then ∑π∈B(σ)

t fdes(π) = (1 + t)ntdes(σ)

Proof sketch. The set of barred permutations of σ (in Sn) is the

same as the set of barred permutations of elements of B(σ) (inBn). Therefore

tdes(σ)

(1− t)n+1 =

∑π∈B(σ) t fdes(π)

(1− t)(1− t2)n .

Example.

3 | 1 ||| 2 → 2 3 | 1 || 1 | 3 2

3 1 2 → 1 3 2