Chapter 4: Asymptotic Approximations
Exercise 4.1
Expanding 2N and N! gives
thus 2N=o(N!).
Clearly, limN→∞e1/N=e0=1, so Ne∼1.
Exercise 4.2 🌟
This exercise demonstrates that g(N)=O(f(N)) also encompasses asymptotically negative functions. Certain references, like CLRS's Introduction to Algorithms, restrict g(N) to nonnegative functions and employ a specific notation O' to remove this limitation within O-notation.
Start by factoring N/(N+1)=1−1/(N+1). Let’s show that the second summand is O(1/N)
thus, N/(N+1)=1+O(1/N). We also have
hence, N/(N+1)∼1−1/N.
Exercise 4.3
Therefore, Nα=o(Nβ) for α<β.
Exercise 4.4
The O- and o-notations provide ways to express upper bounds (with o being the stronger assertion). Consequently, g(N)=o(f(N))⟹g(N)=O(f(N)). By combining the results from the previous two exercises, for r≥0 fixed, we can conclude (see also section 4.3 of the book)
Alternative Proof
Instead of relying on basic algebraic manipulations involving the O-notation, we can represent the numerator of (rN) as a polynomial P(N)=N(N−1)⋯(N−r+1). Since there are r terms in this product, multiplying the N from each term gives us a leading factor of Nr. To find the next term (the coefficient of Nr−1), we sum the constant terms from each factor
Thus, the numerator expands to
Dividing by r! gives
The first term is our leading term. All subsequent terms form a polynomial of degree r−1. Therefore, their sum is O(Nr−1) (see also the previous exercise). An analogous reasoning applies for the case (rN+r).
Exercise 4.5
Exercise 4.6
The cosine function oscillates between -1 and 1, thus as N→∞ we have 1/(2+cosN)∈[1/3,1]. Clearly, it’s bounded from above, but doesn’t tend to 0. Therefore, it is O(1) but not o(1).
Exercise 4.7
The definition in the book "...we often refer informally to a quantity as being exponentially small if it is smaller than any negative power of N—that is, O(1/NM) for any positive M." is imprecise. Namely, the word "smaller" pertains to an asymptotic property of a decay, so instead of O- it should use o-notation. In this context, the O-notation is abused to mean something different than a tight upper bound.
The last line follows from Exercise 4.5, thus e−Nϵ is exponentially small.
Exercise 4.8
In the last line MlnN=o(log2N), since after cancelling one logarithm on both sides, we are left with a constant term "against" a logarithm that grows to infinity. Observe that we don’t care about the base of a logarithm on the RHS, as it’s just a constant multiple of a natural logarithm. Therefore, e−log2N is exponentially small.
By employing the same reasoning as previously, we see that now loglogn grows faster than any constant. Therefore, (logN)−logN is exponentially small.
Exercise 4.9 🌟
This exercise shows why focusing on an asymptotically most significant term is beneficial. As the calculation reveals, it’s a reliable estimator of the performance for sufficiently large problem sizes.
The absolute error is αN, whilst the relative error is αN/(αN+βN). We have
For N=10 the absolute error is ≈2.6 and the relative error is ≈29.52%.
For N=100 the absolute error is ≈13,781 and the relative error is ≈0.02%.
Exercise 4.10
See the remark for Exercise 4.7.
Let f(N) be exponentially small, meaning for any fixed M>0, f(N)=o(N−M). For any polynomial g(N)=O(Nd), where d≥0 is the degree of the polynomial, we can choose M′=M+d, such that f(N)g(N)=o(N−M′)O(Nd)=o(N−M). This concludes the proof.
Exercise 4.11
Chapter 2 of the book explains the Master Theorem with a note that floors/ceilings can be ignored without breaking the asymptotic result. The term a⌊n/2⌋+O(1) implies that every time we recurse, we introduce a small discrepancy O(1) due to potential rounding errors. This gives
In a binary recursion tree, where every internal node has 2 children, the number of nodes doubles at every level. The sum of this error across the whole tree is proportional to the number of nodes in the tree
Consequently, an=(Ideal Solution)+O(n), where ideal solution denotes the case when n is a power of two. We’ll derive these ideal solutions and see that the extra O(n) error has no significance on them (asymptotically speaking).
an=2an/2+O(n) essentially falls under case 2 of the Master Theorem. We have lgn levels in the recursion tree taking O(n) work per level. Therefore, an=O(nlogn). We cannot use Θ-notation because the term O(n) allows for the driving function to be 0 or even negative (see the next exercise).
an=2an/2+o(n) can also be handled using the summation approach. We have lgn levels in the recursion tree taking o(n) work per level. Therefore, an=o(nlogn).
an∼2an/2+n means that an=2an/2+n+o(n). Dividing by n and letting bn=an/n yields bn=bn/2+1+o(1). Iterating this recurrence gives bn=b0+lgn+o(lgn), so an=nlgn+o(nlgn). Therefore, an∼nlgn.
Exercise 4.12
This is a continuation of the previous exercise, where the first case is already covered:
an=2an/2+Θ(n) entails that an=Θ(nlogn).
an=2an/2+Ω(n) entails that an=Ω(nlogn).
Exercise 4.13
Both a(x) and b(x) grow like xα, and the additive perturbation c in the argument of b(x) becomes asymptotically negligible. To see this, we just need to iterate the recurrences until hitting the base cases.
For a(x) the recursion unfolds as (see also Exercise 2.68)
where x/βk<1 eventually, so the sum terminates. Since f(x)=xα, each term is (x/βi)α, and the sum behaves like a convergent infinite geometric series as x→∞
For b(x) the recurrence is slightly perturbed
But asymptotically x/βi+O(1)∼x/βi, so each term in the sum is still ∼(x/βi)α, and the same geometric series argument applies. Because α>0, the geometric series is "head-dominated" (the first few terms contribute the most to the sum). The errors introduced by the perturbation c accumulate at the tail end of the series where the terms are small. See the next section of why/how f(x)=xα belongs to the class of functions that permits this reasoning.
Extending the Class of Functions
In order to apply the above logic to a broader class of functions f(x), we would need the following to hold:
The term f(x/βi) behaves like β−αif(x), so we can factor f(x) out of the sum, just like we did with xα.
The perturbation c disappears for large x, since we expect f(x)f(x+c)→1 for this class of functions.
If f(x) is a positive non-decreasing regularly varying function with index ρ∈R (see Definition 4 in the cited paper), meaning
then we may assume the previously listed properties. This covers most functions polynomial in x and logx. For example, f(x)=x2logx satisfies this, since
Let’s employ the squeeze theorem to prove that we can perturb the arguments without impacting the asymptotic behavior. For any ϵ>0, we can choose x large enough, such that the perturbed argument x+c is eventually "sandwiched" between two constant scalings of x. The rest follows from f being a positive non-decreasing regularly varying function.
The conclusion follows by letting ϵ→0.
A full generalization of this exercise is part of the Akra-Bazzi method, which should be included in the toolbox of techniques for finding asymptotic approximations of divide-and-conquer recurrences.
Exercise 4.14
According to Exercise 3.17
Thus, β=2, ν=1, g′(1/2)=−2 and f(1/2)=1, so the approximate solution is an∼2n as before.
The text of the exercise repeats the initial conditions, so we assume that it refers to the example given in section 3.3 of the book with a0=0 and a1=1.
Thus, β=2, ν=2, g′′(1/2)=8 and f(1/2)=1/2, so the approximate solution is an∼n2n−1 as before.
Exercise 4.15
According to Exercise 3.18
We have two poles of the same modulus, so we must take the one of highest multiplicity. Thus, β=1, ν=2, g′′(1)=4 and f(1)=1, so the approximate solution is an∼n/2 as expected.
Exercise 4.16
According to Exercise 3.20
Thus, β=1, ν=3, g(3)(1)=−6 and f(1)=1, so the approximate solution is an∼n2/2 as expected.
Exercise 4.17 🌟
This exercise introduces several important theorems from real analysis.
According to the fundamental theorem of algebra a degree t polynomial has exactly t roots, counted with multiplicity.
Showing that the Roots are Distinct
We can rewrite P(z)=zt–zt–1–…–z–1 as
Observe that P(1)=1−t=0 for t>1, thus z=1 isn’t a root. Consequently, the roots of P(z) are exactly the roots of Q(z), excluding z=1. A polynomial Q(z) has multiple roots only if Q(z) and its derivative Q′(z) share a root.
The unique roots of the derivative are z=0 and z=t+12t. Apparently Q(0)=1, so z=0 isn’t shared. For the other candidate, we have
We would need (t+12t)tt+12=1. But for all t>1, t+12t>1, so the power term grows exponentially. Therefore, all roots of P(z) are distinct.
Showing that Exactly One Root has Modulus > 1
Because the coefficients of P(z) are real, the singleton dominant root must be a real number. We can verify that P(1)=1−t<0 and P(2)=1>0, hence by the intermediate value theorem, there is a real root in (1,2).
By using Rouché's theorem on the unit disk, we show that the remaining t−1 roots of P(z) lie inside the unit circle ∣z∣≤1; this theorem relates the number of zeros of two functions, f(z) and f(z)+g(z), inside a region. Let’s rearrange the terms of Q(z)
We focus our attention on a circle of radius ∣z∣=1+ϵ (where ϵ is a very small positive number). The magnitudes of our functions on the contour line are:
∣f(z)∣=∣−2zt∣=2(1+ϵ)t≈2+2tϵ
∣g(z)∣≤∣z∣t+1+1=(1+ϵ)t+1+1≈1+(1+(t+1)ϵ)=2+(t+1)ϵ
Since t>1, we have 2t>t+1, thus ∣f(z)∣>∣g(z)∣. By Rouché's theorem, the polynomial Q(z)=f(z)+g(z) has the same number of roots inside the circle ∣z∣=1+ϵ as f(z).
f(z) has a root of multiplicity t at the origin (z=0). Therefore, Q(z) has exactly t roots strictly inside the circle ∣z∣<1+ϵ. Consequently, P(z) has exactly t−1 roots inside the same disk; recall that we must exclude z=1, which was counted for Q(z).
Exercise 4.18
We need to apply the result from the previous exercise. Since the recurrence formula reflects P(z)=zt–zt–1–…–z–1, we know there is a single root β (approaches 2 as t→∞) of highest modulus. According to Theorem 4.1, FN[t]∼CβN. Wikipedia describes this variant as n-acci sequence and provides an expression for the leading term.
Exercise 4.19
According to Exercise 3.55
Thus, β=1, ν=t and f(1)=1. We need to compute g(t)(1).
Each factor can be written as
Apparently, hi(1)=di and g(z)=(1−z)th(z), where h(z)=∏i=1thi(z). Consequently, h(1)=∏i=1tdi. By the general Leibniz rule we have
At z=1 all terms with k<t vanish because dzkdk(1−z)t still contains a factor of 1−z. For k=t we have dztdt(1−z)t=(−1)tt!. Thus,
By inserting all components into the formula from Theorem 4.1, we get the required identity of this exercise.
Exercise 4.20
The Python script below generates the extended table. It uses pandas to produce formatted output.
The code displays the following table:
Exercise 4.21
Substitute y=−x+x2 and expand ln(1+y). Tool support is useful, once the underlying mechanisms are properly understood, to save time and reduce a chance for an error. For example, we can type in WolframAlpha the following command
It produces the requested expansion
Exercise 4.22
Exercise 4.23 🌟
This exercise demonstrates how to convert an asymptotic expansion to another scale.
Let’s start with a Taylor expansion of the expression in terms of x=1/(N−1)
A more streamlined version would be stated in terms of 1/N, since N−1∼N. By taking x=1/N in the geometric series, we get 1/(N−1)=1/N+1/N2+1/N3+O(N−4). Replacing the factors involving 1/(N−1) in the above series with the given expansion of 1/(N−1) gives
Exercise 4.24
Let x=0.1, so ln0.9=ln(1−0.1). By using Table 4.2 and expanding each function to within O(x5), we get
The computed value is 2.20553, which is to within 10−4.
Exercise 4.25
Observe that 9801=992=(100−1)2, so
Table 4.2 has an expansion of the geometric series. By differentiating both sides of that identity, we get
Now, we substitute x into our derived series
Vertical bars are used to delineate slots populated with successive natural numbers. Each slot accommodates two digits, enabling this sequence to progress up to the number 97. In other words, we can predict digits in this manner within 100−196. The pattern breaks at slot 98 due to the carry from the 100th term:
We can generalize this to generate sequences of integers padded to n digits
For example, 1/81=0.012345679… (8 is missing due to the carry-over from 9).
Exercise 4.26
If we apply the nonasymptotic version of Stirling’s formula to describe (N2N), we get
Our equation becomes
where RN,AN,EN represent the reference, approximate and error terms, respectively.
Since 0<θN<1 and 0<θ2N<1, we have the following bounds
This gives
Let the relative error δN be defined such that RN=AN(1+δN). This gives
We can assert that δN=O(1/N).
Exercise 4.27
According to Table 4.4, H1000=7.4854709.
The specific bounds implied by the absolute formula are
The specific bounds implied by the relative formula are
The LHS is truncated to zero as a negative lower bound is meaningless. The RHS is huge, since the assumed constant is too large. In a relative formula, we expect h(N)=o(1) that should decay rapidly even for small problem sizes.
Recall that O(h(N)) with a constant ∣C∣<10 covers the range ±Ch(N).
Exercise 4.28
The exact value is T10=16,796.
The specific bounds implied by the relative formula are
Exercise 4.29
Let’s split the original recurrence at the threshold value M>0
Since f(N) converges then RM(N) converges, too. We can rearrange the remainder term as
Hence, RM(N)=O(N−M), which concludes the proof.
Exercise 4.30
We can apply Borel's integral summation method, which relies on the Laplace transform (see Exercise 3.14). This immediately gives
The derivation uses the exponential integral to craft the "closed-form" solution (see also section 4.8 of the book). The last line follows after employing the substitution u=z−N.
Exercise 4.31
There is a complementary ω-notation for the opposite direction with respect to the o-notation. It denotes a strict lower bound (grows strictly faster than). We use it in our list below:
eN=O(N2) is false, since limN→∞N2eN=∞. We can say that eN=ω(N2).
eN=O(2N) is false (see Exercise 4.9). We can say that eN=ω(2N).
2−N is exponentially small, so 2−N=O(1/N10) is true (see Exercise 4.7).
NlnN=O(eln2N) is true, since NlnN=(elnN)lnN=eln2N.
Exercise 4.32
The Taylor expansion of ex in terms of x=1/(N+1) is
We can provide a more streamlined version in terms of 1/N (see also Exercise 4.23). The book shows the expansion of 1/(N+1)=1/N−1/N2+O(N−3). We need to replace the factors involving 1/(N+1) in the expansion of e1/(N+1) with the given expansion of 1/(N+1). We get
Exercise 4.33
We can expand the number of terms for HN from Table 4.6. The approximation to within O(1/N) is
The approximation to within o(1/N) simply includes γ/N that was previously absorbed into O(1/N). Thus,
Exercise 4.34
Exercise 4.35
Exercise 4.36
A full treatment of this topic is available in the paper Asymptotic Expansions of Central Binomial Coefficients and Catalan Numbers.
Exercise 4.37
Exercise 4.38
Exercise 4.39
Based on the asymptotic expansion, the approximate value of the expression is e−λ for large N.
Exercise 4.40
The middle term in the penultimate line must be expanded as 1+x+x2/2, where x is the argument to the exponential function. We must retain the three asymptotically largest components.
Exercise 4.41
When interest is compounded daily at a 10% annual rate on a $10,000 principal, after 365 days, the amount is $10,000(1+0.1/365)365. Instead of computing this value directly, let’s apply the result from Exercise 4.39. Here, we have λ=−0.1, so the total amount increases to ≈$10,000×e0.1=$11,051.7. This is about $51.7 more than what would be paid if interest were paid once a year.
The exact formula gives ≈$11,051.6, which is $0.1 less than our quick calculation. This showcases the advantages of using asymptotic approximations.
Exercise 4.42
Exercise 4.43
Exercise 4.44
At this point, we could say that the order of growth of sin(tan(1/N))–tan(sin(1/N)) is O(N−5), but this would be a loose bound. Since the first two terms match, we must expand until we find a difference. Let x=1/N and leverage WolframAlpha to perform the hard work.
Apparently, we have a mismatch at the 4th term, thus the order of growth of sin(tan(1/N))–tan(sin(1/N)) is O(N−7).
Exercise 4.45
By substituting N=TN into the expansion of HN, we get
Exercise 4.46
This exercise is about the asymptotic expansion of the Lambert W function. The cited article contains the full expansion in terms of substitutions L1=lnn and L2=lnlnn. We sketch the steps leading to that expression using the reversion technique from the book.
Start with the basic equation marked with an asterisk
The first iteration of bootstrapping gives an∼L1. The second iteration gives an∼L1−L2. The third iteration gives
By carrying out two additional iterations, we get the equation from the cited article to within the requested accuracy. For the sake of completeness, here is the identity without using symbols L1 and L2
Exercise 4.47 🌟
This exercise generalizes the reversion method presented in the book.
By applying the hint from the book, this equation transform into z=x+c2′x2+c3′x3+O(x4). We already know the reversion of this form from the book:
Now, we just need to express it again in terms of y and the original coefficients
The expansion of x is in powers of the small quantity y−c0, not y itself (unless c0=0). Using purely y is incorrect when c0=0 because y doesn’t tend to zero.
Exercise 4.48
∑k≥11/k2=π2/6 is known as the Basel problem. According to the direct comparison test, the sum ∑k≥11/(k2Hk) also converges to some constant C. The tail RN can be approximated using the asymptotic expansion of HN∼lnN (see Table 4.6). This gives
We can estimate RN by using integration by parts to find the leading asymptotic term. Let u=(lnx)−1 and dv=x−2dx. Then du=−x−1(lnx)−2dx and v=−x−1.
This gives
so that 1+1/6+1/16.5+1/(3ln3)≈1.53 is already a good approximation to the constant C, just by taking the first 3 terms (together with a correction factor). It is a trivial matter to calculate the value of this constant to any reasonable desired accuracy.
Exercise 4.49
The infinite sum converges to the reciprocal Fibonacci constant ψ. Fibonacci numbers grow exponentially, Fk∼ϕk/5 where ϕ is the golden ratio. Consequently, the terms in the tail decay exponentially and the tail sum can be approximated by a geometric series. Thus, RN=O(ϕ−N).
Exercise 4.50
The tail can be bounded analogously to the example given in the book pertaining to tries. Therefore, RN=O(2−N).
Exercise 4.51
Here, we need to use the tail, since the terms in a finite sum are rapidly increasing.
Exercise 4.52
Notice the usage of the falling factorial (see also Chapter 3 of the book).
Exercise 4.53
Let h(x)=1+x1, so h(n)(x)=(−1)n(1+x)n+1n!. This gives
Exercise 4.54
Let h(x)=1+x21, so h′(x)=−(1+x2)22x. We don’t need higher derivatives, since only the first Bernoulli correction is required. This gives
The definite integral can be computed using WolframAlpha by issuing Integrate[1/(1+x^2),{x,0,1}].
Exercise 4.55
Let’s use the formula from the book
The following Python script dumps the value of γ accurate to 10 decimal places. By uncommenting (adding) additional correction terms, we can attain the same accuracy in third of the time, since we only need to take seven summands from the harmonic sum.
The code prints
Wikipedia has a full description of the Euler’s constant.
Exercise 4.56
We’ve already mentioned in Exercise 4.48 that ∑k=1∞k21=ζ(2)=π2/6. Let’s take f(x)=1/x2 and compute the Euler-Maclaurin constant
Employing Theorem 4.3 gives
Exercise 4.57
This is a variation of the previous exercise. The infinite sum converges to the Apéry's constant. Without repeating the technical details, we get
Further generalization is covered in the article about asymptotic expansions of the generalized harmonic numbers on StackExchange for Mathematics.
Exercise 4.58
Using Theorem 4.3, as in the previous two exercises, we obtain the following asymptotic estimates
The fractional arguments of the Riemann zeta function do not have known simple closed forms, like in Exercise 4.56; they’re typically evaluated numerically.
Exercise 4.59 🌟
This exercise introduces a summation technique for alternating series.
The main idea is presented in the article about the asymptotic expansion of the alternating harmonic numbers on Wikipedia. In both subtasks, we separate the terms based on the parity of N.
Expansion of ∑1≤k≤Nk(−1)k
Let’s start by assuming N=2n. This gives
When N=2n−1, we’ve
The last line follows by transforming 1/(N+1) in terms of 1/N, as explained in the book (see also Exercise 4.32). But notice the similarity, only the signs are flipped. Therefore, we can combine the two cases into the following generic formula
Euler–Boole summation is a method for summing alternating series, that could be regarded as an alternating equivalent of Euler-Maclaurin summation.
Expansion of ∑1≤k≤Nk(−1)k
The alternating zeta function is known as the Dirichlet eta function.
Let’s start by assuming N=2n. This gives (see also the previous exercise about the expansion of Hn(1/2))
When N=2n−1, we’ve
As before, we can conclude that the odd case differs only in flipped signs. Thus,
Exercise 4.60
To find the asymptotic behavior of the generalized binomial coefficient, our primary goal is to determine the asymptotic expansion of the ratio Γ(n+1)Γ(n+α+1) as n→∞. According to corollary of Theorem 4.3, we’ve
The continuous extension for large x is
Substituting the two equations gives
We can apply Taylor expansion on ln(n+α) to get
Now, substituting back this expansion and simplifying yields
We get the required result
Exercise 4.61
Replace the asymptotic estimate used in the derivation of Theorem 4.5 with the inequality −ln(1+x)≥−x, valid for all x≥0. See the proof of the corollary of Theorem 4.5 for context.
Exercise 4.62
The proofs of the relative bounds for the Ramanujan Q- and R-distributions are literally the same. Stirling’s formula for lnN! is available in Table 4.6 in the book.
Notice that the above approximation is valid only for k=o(N2/3). Under this regime, both Stirling error terms, O(1/N) and O(1/(N−k)), "vanish" for large N. Furthermore, the O(k4/N3) term is absorbed into O(k3/N2).
The R-distribution is handled in an analogous fashion starting with
Exercise 4.63
The best approach here is to simply reuse a high-quality implementation of the PMF for the binomial distribution. The following Python snippet demonstrates the typical usage scenario.
Exercise 4.64
If k=N+O(1) we cannot reach the required accuracy by relying on Theorem 4.6 alone. We must go back to the proof from the book and add more terms to every component in the product. The augmented central binomial coefficient is
The extended product of the Ramanujan Q- and R-distributions is
The last two steps follow from substituting k=N+δ, where δ is the displacement (hidden constant inside the O-notation) and expanding ex. Multiplying together the two components, we get
To get an absolute error, we would just distribute the leading term all the way through in the formula above and simplify.
Exercise 4.65

Exercise 4.66
This is the case when the binomial distribution can be efficiently approximated by a normal distribution centered at pN (mean). For example, the book already uses such an approximation ∼1/πN/2 with p=1/2 in Figure 4.3. More generally, the estimated probability is
Exercise 4.67
The paper The Normal Approximation to the Binomial Distribution shows a full derivation by employing the hint from the book (see section 2); the shift factor k is denoted as δ. At the end, we get a formula similar to the one from Theorem 4.6.
More formally, this is known as the De Moivre–Laplace theorem; take a look at the alternative proof employing the log/exp technique from the book.
Exercise 4.68 🌟
This exercise demonstrates the principles of reuse within mathematics. Rather than constructing analyses from the ground up, it presents a systematic approach to modifying existing work to accommodate varying conditions.
Theorem 4.7 isn’t appropriate here because the mean μ=pN=λN isn’t bounded as N→∞. The previous exercise handles the case when p is fixed. Nonetheless, we can tweak the method from the cited paper to arrive at a different approximation. In other words, the method itself needs to be adapted to a different asymptotic regime.
We list here the recipe for arriving at the final formula:
Our starting point with Stirling's formula is precisely equation (1) in the notes.
The k in this exercise is analogous to δ in the paper. We set x=Np+δ. The standard deviation in our new regime is σ=Npq=Np(1−p)∼λN=λN1/4. So, allowing δ=O(N1/4) is exactly the same as allowing x to deviate by a few standard deviations.
The notes expand ln(Np/x) and ln(Nq/(N−x)) in powers of δ/(Np) and δ/(Nq). Nonetheless, δ/(Np)≫δ/(Nq), hence δ/(Nq) term's higher-order corrections are negligible compared to the former (only the one contributing to the exponent of e matters). Observe that the largest correction O(δ3/(Np)2) cannot hide p, since it isn’t a constant anymore. At any rate, this boils down to O(δ3/N).
The square root pre-factor is 2π(np+δ)(nq−δ)n=2πnpq1(1+npδ)−1/2(1−nqδ)−1/2 Using the Taylor expansion (1+u)−1/2∼1−21u for small u, we get that the dominant correction term becomes O(δ/(Np))=O(δ/N).
After incorporating all previously mentioned changes, we obtain (using k instead of δ)
If k=O(σ) then the relative error is O(N−1/4). If k=O(N1/3) then the error jumps to O(1), so we must have at least k=o(N1/3). Finally, the baseline error term O(N−1/2) covers the edge case k=0.
Exercise 4.69
This is a variation of the previous exercise, so we don’t repeat all the steps again; the methodology is the same. Let μ=Np=λN/lnN and σ2=Npq=μ(1−p)=μ(1−λ/lnN)∼μ. The following asymptotic holds:
If k=O(σ) then the relative error is O(NlnN). Notice, as in the previous exercise, the explicit baseline error term that covers k=0.
Exercise 4.70
Let x=k/N so that dk=Ndx. This gives
The definite integrals can be easily computed in WolframAlpha.
Exercise 4.71
Let’s follow the hint from the book’s website for this exercise. This gives
Notice that pk is strictly decreasing as k grows and has the same asymptotic approximation as the Q-distribution. Hence, by the same arguments as in the proof of Theorem 4.8, together with the solution of the previous exercise, we can confirm the validity of the approximation of P(N).
Exercise 4.72
The paper On Ramanujan's Q-function by Flajolet et al. elaborates in detail the developments around Q- and R- distributions and provides the proof of this exercise.
Exercise 4.73
Assume N is even for simplicity (odd N gives the same asymptotic behavior). Let k=N/2±δ with δ=o(N2/3). We know that most of the probability mass will be concentrated around the mean. We can now apply Theorem 4.6 to get
Here, we’re only working with binomial coefficients rather than distribution. Therefore, we don’t divide by the normalization factor. By leveraging the Laplace method, similarly as in Theorem 4.8, we can uniformly bundle the diminishing tails (far away from the mean) into a single formula.
For the generalized version of this exercise refer to the article An Asymptotic Formula for Binomial Sums (see the beginning of section 4). A sequence of values of the sum for different N is known as the Franel numbers.
Exercise 4.74
Theorem 7.4 (Involutions) from the book provides all the details.
Wikipedia also offers a summary of the problem, including the required asymptotic estimate, known as telephone numbers.
Exercise 4.75 🌟
This exercise demonstrates in detail the Laplace method for sums.
To derive the asymptotic estimate for our sum, we use Stirling's approximation (see Table 4.6) to transform the discrete sum into a continuous integral dominated by a single "peak". This is the main idea behind the Laplace method. We start by dissecting the summand
Observe that it’s nonzero for 0≤k≤N/2, so let k=αN with 0≤α≤1/2. Substituting the approximation for each factorial and simplifying, we get
where
We can find the maximum α0 by typing in WolframAlpha
It outputs α0=1/2−1/(25). At this specific point, ef(α0)=ϕ (golden ratio). To see this, we should just raise e to the maximum value reported by WolframAlpha. The square of this value is ϕ2.
Since the function (kN−k)2 drops rapidly from α0, we can approximate the sum using the Euler-Maclaurin formula. We expand 2Nf(α) as a Taylor series around α0
With the help of WolframAlpha, we can compute symbolically the second derivative and evaluate it at α0
This gives
The sum is then approximated by the integral
In essence, the Laplace method relies on the fact that as N→∞, the function becomes so incredibly "sharp" at the peak α0 that the tails of the distribution become negligible. Therefore, the error introduced by extending the integration limits to ±∞ is exponentially small. For example, just at some ϵ>0 distance from α0 the contribution decreases to only ϕ2N⋅e−N(55)ϵ2 (see also Exercise 4.10).
Exercise 4.76
We’ve a flipped Figure 4.7, where the first lgN terms are negligible, whilst the rest contribute around 1. Using the same bounds as in Theorem 4.10, we get
As noted in Theorem 4.10, the error bound can be tightened all the way down to O(1).
Exercise 4.77
The first tN terms are significant, whilst the rest drops very quickly to zero. For large N, we can approximate this sum with an integral over the whole possible range for j. This gives
The second line follows after the substitution u=N/xt, so that
The last integral can be evaluated using integration by parts. Let α=1/t. Notice that t>1 implies 0<α<1. Using v=(1−e−u) and dw=u−1−αdu gives
Thus,
Last updated