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-17

Exercise 1.2.9-17

proved in Lean solution written

RatingM25
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 coefficient of znwmz^nw^m in the expansion of (1−z)−w(1-z)^{-w} as a double power series.

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

Write (1−z)−w=exp⁡(wln⁡11−z)(1-z)^{-w}=\exp\bigl(w\ln\frac1{1-z}\bigr).

Hint 2

Expand the exponential in powers of ww and use Eq. (26).

Solution

Show the solution

For ∣z∣<1|z|<1 and any ww, (1−z)−w=ew L(z)(1-z)^{-w}=e^{w\,L(z)} with L(z)=ln⁡11−zL(z)=\ln\frac1{1-z}. The series of the exponential gives ewL=∑m≥0wmL(z)m/m!e^{wL}=\sum_{m\ge0}w^mL(z)^m/m!. By Eq. (26), L(z)m=m!∑n[nm]zn/n!L(z)^m=m!\sum_n\left[{n\atop m}\right]z^n/n!. So

(1−z)−w=∑m≥0wm∑n≥0[nm]znn!,(1-z)^{-w}=\sum_{m\ge0}w^m\sum_{n\ge0}\left[{n\atop m}\right]\frac{z^n}{n!},

and the coefficient of znwmz^nw^m is [nm]/n!\left[{n\atop m}\right]/n!. This is the number of permutations of nn objects with mm cycles divided by n!n!.

A second route uses (1−z)−w=∑n(w+n−1n)zn(1-z)^{-w}=\sum_n\binom{w+n-1}nz^n and the product w(w+1)⋯(w+n−1)=∑m[nm]wmw(w+1)\cdots(w+n-1)=\sum_m\left[{n\atop m}\right]w^m of Section 1.2.6. Dividing by n!n! gives the same coefficient.

Check

For n=3n=3: (w+23)=w(w+1)(w+2)/6=(w3+3w2+2w)/6\binom{w+2}3=w(w+1)(w+2)/6=(w^3+3w^2+2w)/6. The coefficients [31]=2\left[{3\atop1}\right]=2, [32]=3\left[{3\atop2}\right]=3, [33]=1\left[{3\atop3}\right]=1 divided by 3!3! agree. Python gives the same for the z2z^2 terms: 12w+12w2\frac12w+\frac12w^2.

Remarks

The second kind has the double series ew(ez−1)=∑{nm}wmzn/n!e^{w(e^z-1)}=\sum\left\{{n\atop m}\right\}w^mz^n/n!. Setting w=1w=1 gives ∑m[nm]/n!=1\sum_m\left[{n\atop m}\right]/n!=1, the coefficient of znz^n in (1−z)−1(1-z)^{-1}.

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.