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.10-13

Exercise 1.2.10-13

not stated yet in Lean solution written

RatingHM38
MarkersHM (needs higher mathematics)
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.10 of Volume 1. Companion chapter: Analysis of an algorithm

The task

Show that the distribution (8) approaches a normal distribution in the sense of the limit with μn\mu_n and σn\sigma_n.

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 Gn(z)G_n(z) with the Gamma function and use Gauss's limit for Γ(z+1)\Gamma(z+1).

Hint 2

Put zn=eit/σnz_n=e^{it/\sigma_n} and expand the exponent. Use μn=Hn−1\mu_n=H_n-1 and σn2=Hn−Hn(2)∼ln⁡n\sigma_n^2=H_n-H_n^{(2)}\sim\ln n.

Solution

Show the solution

Plan. Find a form Gn(z)≈nz−1/Γ(z+1)G_n(z)\approx n^{z-1}/\Gamma(z+1) that holds near z=1z=1, then insert z=eit/σnz=e^{it/\sigma_n}.

Step 1. By (8), Gn(z)=(z+1)(z+2)⋯(z+n−1)n!G_n(z)=\frac{(z+1)(z+2)\cdots(z+n-1)}{n!}. Gauss's formula says that n! nz(z+1)(z+2)⋯(z+n)→Γ(z+1)\frac{n!\,n^z}{(z+1)(z+2)\cdots(z+n)}\to\Gamma(z+1), and the convergence is uniform for zz in a compact set that avoids the poles z=−1,−2,…z=-1,-2,\ldots. Dividing, and using (z+1)⋯(z+n)=(z+n)⋅(z+1)⋯(z+n−1)(z+1)\cdots(z+n)=(z+n)\cdot(z+1)\cdots(z+n-1),

Gn(z)=nz(z+n) Γ(z+1)(1+εn(z)),εn(z)→0 uniformly near z=1.G_n(z)=\frac{n^{z}}{(z+n)\,\Gamma(z+1)}\bigl(1+\varepsilon_n(z)\bigr),\qquad\varepsilon_n(z)\to0\ \text{uniformly near }z=1.

Also nzz+n=nz−1(1+O(1/n))\frac{n^z}{z+n}=n^{z-1}\bigl(1+O(1/n)\bigr), so Gn(z)=nz−1Γ(z+1)(1+o(1))G_n(z)=\frac{n^{z-1}}{\Gamma(z+1)}(1+o(1)) uniformly near z=1z=1.

Step 2. Let tt be real and fixed, zn=eit/σnz_n=e^{it/\sigma_n}. Since σn→∞\sigma_n\to\infty, zn→1z_n\to1, so Γ(zn+1)→Γ(2)=1\Gamma(z_n+1)\to\Gamma(2)=1 and the 1+o(1)1+o(1) factor tends to 11. Then

e−itμn/σnGn(zn)=exp⁡(−itμnσn+(zn−1)ln⁡n) (1+o(1)).e^{-it\mu_n/\sigma_n}G_n(z_n)=\exp\Bigl(-\frac{it\mu_n}{\sigma_n}+(z_n-1)\ln n\Bigr)\,(1+o(1)).

Now zn−1=itσn−t22σn2+O(σn−3)z_n-1=\frac{it}{\sigma_n}-\frac{t^2}{2\sigma_n^2}+O(\sigma_n^{-3}) and μn=ln⁡n+γ−1+O(1/n)\mu_n=\ln n+\gamma-1+O(1/n). So the exponent is

itσn(ln⁡n−μn)−t2ln⁡n2σn2+O(ln⁡nσn3)=−it(γ−1)σn−t2ln⁡n2σn2+O(1σn).\frac{it}{\sigma_n}\bigl(\ln n-\mu_n\bigr)-\frac{t^2\ln n}{2\sigma_n^2}+O\Bigl(\frac{\ln n}{\sigma_n^3}\Bigr)=-\frac{it(\gamma-1)}{\sigma_n}-\frac{t^2\ln n}{2\sigma_n^2}+O\Bigl(\frac1{\sigma_n}\Bigr).

Since σn2=ln⁡n+γ−π2/6+O(1/n)\sigma_n^2=\ln n+\gamma-\pi^2/6+O(1/n), we have ln⁡n/σn2→1\ln n/\sigma_n^2\to1 and the terms of order 1/σn1/\sigma_n tend to 00. So the exponent tends to −t2/2-t^2/2 and the limit is e−t2/2e^{-t^2/2} for every real tt.

Check

Take t=1t=1. The value e−itμn/σnGn(eit/σn)e^{-it\mu_n/\sigma_n}G_n(e^{it/\sigma_n}) is 0.6084−0.0355i0.6084-0.0355i for n=103n=10^3, 0.6076−0.0263i0.6076-0.0263i for n=106n=10^6 and 0.6071−0.0190i0.6071-0.0190i for n=1012n=10^{12}, computed with the Gamma function. The limit is e−1/2=0.60653e^{-1/2}=0.60653. The approach is slow, with an error of order 1/σn∼1/ln⁡n1/\sigma_n\sim1/\sqrt{\ln n}.

Remarks

This is a theorem of Goncharov about Stirling numbers of the first kind, in the form of the central limit theorem for the number of cycles of a random permutation. The slow rate comes from σn2∼ln⁡n\sigma_n^2\sim\ln n.

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

In Lean

not stated yet The exercise is not stated in Lean yet.

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

Something is wrong? Report it.