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.6-46

Exercise 1.2.6-46

stated 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.6 of Volume 1. Companion chapter: Binomial coefficients

The task

Use Stirling's formula for the factorial to find the size of (x+yy)\binom{x+y}{y} for large xx and yy, and of (2nn)\binom{2n}{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 (x+yy)=(x+y)!/(x! y!)\binom{x+y}{y} = (x+y)!/(x!\,y!).

Hint 2

Put Stirling's formula m!≈2πm (m/e)mm! \approx \sqrt{2\pi m}\,(m/e)^m in all three factorials. The powers of ee cancel.

Solution

Show the solution

With m!≈2πm (m/e)mm! \approx \sqrt{2\pi m}\,(m/e)^m for m=x+ym = x+y, xx and yy, (x+yy)≈2π(x+y) (x+y)x+ye−(x+y)2πx xxe−x 2πy yye−y.\binom{x+y}{y} \approx \frac{\sqrt{2\pi(x+y)}\,(x+y)^{x+y}e^{-(x+y)}}{\sqrt{2\pi x}\,x^xe^{-x}\,\sqrt{2\pi y}\,y^ye^{-y}}. The exponentials cancel since −(x+y)+x+y=0-(x+y) + x + y = 0. The roots give 2π(x+y)/(2πxy)=(x+y)/(2πxy)\sqrt{2\pi(x+y)}/(2\pi\sqrt{xy}) = \sqrt{(x+y)/(2\pi xy)}. So (x+yy)≈x+y2πxy  (x+y)x+yxx yy.\binom{x+y}{y} \approx \sqrt{\frac{x+y}{2\pi xy}}\;\frac{(x+y)^{x+y}}{x^x\,y^y}. For x=y=nx = y = n the root is 2n/(2πn2)=1/πn\sqrt{2n/(2\pi n^2)} = 1/\sqrt{\pi n}, and (2n)2n/n2n=4n(2n)^{2n}/n^{2n} = 4^n. So (2nn)≈4n/πn\binom{2n}{n} \approx 4^n/\sqrt{\pi n}.

Check

For x=50x = 50, y=70y = 70 the exact value is 1.83617⋅10341.83617\cdot 10^{34} and the formula gives 1.84015⋅10341.84015\cdot 10^{34}. For n=20n = 20, (4020)=137846528820\binom{40}{20} = 137846528820 and the formula gives 1.38711⋅10111.38711\cdot 10^{11}. The relative error is about 1/(8n)1/(8n).

Remarks

The form (x+yx)x(x+yy)y\bigl(\frac{x+y}{x}\bigr)^x\bigl(\frac{x+y}{y}\bigr)^y of the second factor shows the entropy of the split x:yx : y. The central coefficient is the largest in its row.

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

In Lean

stated The statement is in Lean and it builds. The proof is not in Lean yet.

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

Something is wrong? Report it.