taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.9-20

Exercise 1.2.9-20

proved in Lean solution written

RatingM21
MarkersM (mathematical)
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.2.9 of Volume 1. Companion chapter: Generating functions

The task

Find the coefficients cmkc_{mk} with ∑nnmzn=∑kcmkzk/(1−z)k+1\sum_nn^mz^n=\sum_kc_{mk}z^k/(1-z)^{k+1}.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Express nmn^m with the binomial coefficients (nk)\binom nk and the Stirling numbers of the second kind.

Hint 2

Sum over nn with ∑n(nk)zn=zk/(1−z)k+1\sum_n\binom nkz^n=z^k/(1-z)^{k+1}.

Solution

Show the solution

Count the maps from an mm-set to an nn-set by the number kk of values in the image. A map with image of size kk is a partition of the mm-set into kk blocks, with an injective assignment of the blocks to elements of the nn-set. There are {mk}\left\{{m\atop k}\right\} partitions and n(n−1)⋯(n−k+1)=k!(nk)n(n-1)\cdots(n-k+1)=k!\binom nk injections, so

nm=∑k=0mk!{mk}(nk).n^m=\sum_{k=0}^mk!\left\{{m\atop k}\right\}\binom nk.

By (16) and the shift rule, ∑n(nk)zn=zk/(1−z)k+1\sum_n\binom nkz^n=z^k/(1-z)^{k+1}. Multiply by k!{mk}k!\left\{{m\atop k}\right\} and sum over kk. Then ∑nnmzn=∑k=0mk!{mk}zk/(1−z)k+1\sum_nn^mz^n=\sum_{k=0}^mk!\left\{{m\atop k}\right\}z^k/(1-z)^{k+1}, so cmk=k!{mk}c_{mk}=k!\left\{{m\atop k}\right\}.

The cmkc_{mk} are unique. The functions zk/(1−z)k+1z^k/(1-z)^{k+1} for k=0,…,mk=0,\ldots,m vanish to different orders at z=0z=0, so they are linearly independent.

Check

For m=2m=2: c20=0c_{20}=0, c21=1c_{21}=1, c22=2c_{22}=2. So ∑n2zn=z/(1−z)2+2z2/(1−z)3=z(1−z)+2z2(1−z)3=z+z2(1−z)3=z+4z2+9z3+⋯\sum n^2z^n=z/(1-z)^2+2z^2/(1-z)^3=\frac{z(1-z)+2z^2}{(1-z)^3}=\frac{z+z^2}{(1-z)^3}=z+4z^2+9z^3+\cdots. Python confirms the identity for m≤4m\le4.

Remarks

The numerator z+z2z+z^2 for m=2m=2 is the Eulerian polynomial. The cmkc_{mk} are the Fubini numbers when summed over kk.

This solution is drafted, and a person has not reviewed it yet. The source.

In Lean

proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.