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.11.2-9

Exercise 1.2.11.2-9

not stated yet in Lean solution written

RatingM25
MarkersM (mathematical)
KindK4, find an estimate: give an asymptotic form or a bound from the written solution
SectionSection 1.2.11.2 of Volume 1. Companion chapter: Euler's summation formula

The task

Find (2nn)\binom{2n}n asymptotically, with relative error O(n−3)O(n^{-3}), by two methods.

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

Method one: Stirling's formula (18) for ln⁡(2n)!−2ln⁡n!\ln(2n)!-2\ln n!.

Hint 2

Method two: the ratio un/un−1u_n/u_{n-1} of un=(2nn)4−nu_n=\binom{2n}n4^{-n} is 1−12n1-\frac1{2n}. Assume an expansion in 1/n1/n.

Solution

Show the solution

Method one. By (18) with the terms to 1/n1/n: ln⁡(2n)!=(2n+12)ln⁡2n−2n+σ+124n+O(n−3)\ln(2n)!=(2n+\frac12)\ln2n-2n+\sigma+\frac1{24n}+O(n^{-3}) and 2ln⁡n!=(2n+1)ln⁡n−2n+2σ+16n+O(n−3)2\ln n!=(2n+1)\ln n-2n+2\sigma+\frac1{6n}+O(n^{-3}). Subtract:

ln⁡(2nn)=2nln⁡2+12ln⁡2−12ln⁡n−σ−18n+O(n−3).\ln\binom{2n}n=2n\ln2+\tfrac12\ln2-\tfrac12\ln n-\sigma-\frac1{8n}+O(n^{-3}).

With eσ=2πe^\sigma=\sqrt{2\pi}: (2nn)=4nπnexp⁡(−18n+O(n−3))\binom{2n}n=\frac{4^n}{\sqrt{\pi n}}\exp\bigl(-\frac1{8n}+O(n^{-3})\bigr). Expand e−x=1−x+x22−⋯e^{-x}=1-x+\frac{x^2}2-\cdots with x=18nx=\frac1{8n}:

(2nn)=4nπn(1−18n+1128n2+O(n−3)).\binom{2n}n=\frac{4^n}{\sqrt{\pi n}}\Bigl(1-\frac1{8n}+\frac1{128n^2}+O(n^{-3})\Bigr).

Method two. The numbers un=(2nn)4−nu_n=\binom{2n}n4^{-n} satisfy un=un−12n−12nu_n=u_{n-1}\frac{2n-1}{2n}. Take the form un=Cn(1+a1n+a2n2+a3n3+⋯ )u_n=\frac C{\sqrt n}\bigl(1+\frac{a_1}n+\frac{a_2}{n^2}+\frac{a_3}{n^3}+\cdots\bigr), which exists by method one. Then with t=1/nt=1/n the ratio unun−1=1−t 1+a1t+a2t2+a3t31+a1t1−t+a2t2(1−t)2+a3t3(1−t)3\frac{u_n}{u_{n-1}}=\sqrt{1-t}\,\frac{1+a_1t+a_2t^2+a_3t^3}{1+a_1\frac t{1-t}+a_2\frac{t^2}{(1-t)^2}+a_3\frac{t^3}{(1-t)^3}} must equal 1−t21-\frac t2. Compare coefficients of t2,t3,t4t^2,t^3,t^4 (the coefficients of 11 and tt already agree): sympy solves them as a1=−18a_1=-\frac18, a2=1128a_2=\frac1{128}, a3=51024a_3=\frac5{1024}. The constant C=π−1/2C=\pi^{-1/2} comes from Wallis's product (Exercise 1.2.11.2-5, Step 2): un−2/(2n+1)→π/2u_n^{-2}/(2n+1)\to\pi/2 gives un2n→1/πu_n^2n\to1/\pi. So the result is again

(2nn)=4nπn(1−18n+1128n2+51024n3+O(n−4)).\binom{2n}n=\frac{4^n}{\sqrt{\pi n}}\Bigl(1-\frac1{8n}+\frac1{128n^2}+\frac5{1024n^3}+O(n^{-4})\Bigr).

The term 51024n3\frac5{1024n^3} is the next one; the answer with relative error O(n−3)O(n^{-3}) stops at n−2n^{-2}.

Check

For n=100n=100 the ratio (2nn)πn/4n\binom{2n}n\sqrt{\pi n}/4^n is 0.998750786126250.99875078612625, and 1−1800+1128⋅104=0.998750781251-\frac1{800}+\frac1{128\cdot10^4}=0.99875078125. The difference times n3n^3 is 0.0048760.004876, close to 51024=0.004883\frac5{1024}=0.004883. For n=10n=10 the difference times n3n^3 is 0.004800.00480.

Remarks

Method two shows why the denominators are powers of 22. The first values of the series are 1−18n+1128n2+51024n3−2132768n41-\frac1{8n}+\frac1{128n^2}+\frac5{1024n^3}-\frac{21}{32768n^4}.

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.