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

Exercise 1.2.9-7

proved in Lean solution written

RatingM15
MarkersM (mathematical)
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.9 of Volume 1. Companion chapter: Generating functions

The task

Check each step that leads from ∏j(1−xjz)−1\prod_j(1-x_jz)^{-1} to the formula (38) for hmh_m.

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

Take the logarithm of the product (36) and use the series of ln⁡11−w\ln\frac1{1-w}.

Hint 2

Exponentiate with eu=∑uk/k!e^u=\sum u^k/k! and collect the power of zz by the rule k1+2k2+⋯=mk_1+2k_2+\cdots=m.

Solution

Show the solution

Define hm=∑j1≤⋯≤jmxj1⋯xjmh_m=\sum_{j_1\le\cdots\le j_m}x_{j_1}\cdots x_{j_m} and G(z)=∑mhmzmG(z)=\sum_mh_mz^m with h0=1h_0=1.

Step 1. Each xjx_j contributes the geometric series ∑k≥0xjkzk=1/(1−xjz)\sum_{k\ge0}x_j^kz^k=1/(1-x_jz). A product of these series for j=1,…,nj=1,\ldots,n gives the monomials x1c1⋯xncnzc1+⋯+cnx_1^{c_1}\cdots x_n^{c_n}z^{c_1+\cdots+c_n}, each exactly once. Such a monomial is the product xj1⋯xjmx_{j_1}\cdots x_{j_m} of a multiset j1≤⋯≤jmj_1\le\cdots\le j_m with cic_i copies of ii. So G(z)=∏j(1−xjz)−1G(z)=\prod_j(1-x_jz)^{-1}, which is Eq. (36).

Step 2. For formal series with constant term 11, ln⁡\ln turns a product into a sum, so ln⁡G=∑jln⁡11−xjz\ln G=\sum_j\ln\frac1{1-x_jz}. With ln⁡11−w=∑k≥1wk/k\ln\frac1{1-w}=\sum_{k\ge1}w^k/k this is ∑j∑k≥1xjkzk/k=∑k≥1Skzk/k\sum_j\sum_{k\ge1}x_j^kz^k/k=\sum_{k\ge1}S_kz^k/k by exchanging the two sums, which is Eq. (37).

Step 3. Exponentiate: G=exp⁡(∑kSkzk/k)=∏k≥1exp⁡(Skzk/k)G=\exp\bigl(\sum_kS_kz^k/k\bigr)=\prod_{k\ge1}\exp(S_kz^k/k), since eu+v=eueve^{u+v}=e^ue^v for series. The factor with index kk is ∑kj≥0(Skzk/k)kjkj!\sum_{k_j\ge0}\frac{(S_kz^k/k)^{k_j}}{k_j!}. Multiply all of them. A product of terms, one from each factor with exponent kjk_j for the jj-th factor, has total power zk1+2k2+3k3+⋯z^{k_1+2k_2+3k_3+\cdots}. Collecting the terms with total power mm gives (38). Only kjk_j with j≤mj\le m can be nonzero, because jkj≤mjk_j\le m, so the sum is finite.

Step 4. The count of terms is the number of solutions of k1+2k2+⋯+mkm=mk_1+2k_2+\cdots+mk_m=m, which is the number of partitions of mm with kjk_j parts equal to jj.

Check

For m=2m=2 the solutions are (k1,k2)=(2,0)(k_1,k_2)=(2,0) and (0,1)(0,1). The formula gives h2=S12/2+S2/2h_2=S_1^2/2+S_2/2. For x=(1,2)x=(1,2): h2=1+2+4=7h_2=1+2+4=7, and (9+5)/2=7(9+5)/2=7.

Remarks

Eq. (39) comes from the same series by differentiating G=exp⁡(⋯ )G=\exp(\cdots), see Exercise 1.2.9-11. With xj=1x_j=1 the formula gives (n+m−1m)\binom{n+m-1}m.

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.