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

Exercise 1.2.6-7

proved in Lean solution written

Rating12
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

For a fixed positive nn, find the kk that makes (nk)\binom{n}{k} largest.

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

Compare neighbours. Find when (nk+1)>(nk)\binom{n}{k+1} > \binom{n}{k}.

Hint 2

Use eq. 1.2.6(7), or the ratio (nk+1)/(nk)\binom{n}{k+1} / \binom{n}{k}.

Solution

Show the solution

For 0≤k<n0 \le k < n, the product form of eq. 1.2.6(3) gives (nk+1)=(nk)⋅n−kk+1.\binom{n}{k+1} = \binom{n}{k} \cdot \frac{n-k}{k+1}. All the coefficients are positive, so (nk+1)\binom{n}{k+1} is larger than, equal to, or smaller than (nk)\binom{n}{k} as n−kn - k is larger than, equal to, or smaller than k+1k + 1. That is, as 2k+1<n2k + 1 < n, 2k+1=n2k + 1 = n or 2k+1>n2k + 1 > n.

Let n=2mn = 2m. Then 2k+1<2m2k + 1 < 2m holds exactly for k≤m−1k \le m - 1, and 2k+1=2m2k + 1 = 2m never holds. So the row increases strictly up to k=mk = m and then decreases strictly. The maximum is at k=m=n/2k = m = n/2 alone.

Let n=2m+1n = 2m + 1. Then 2k+1<n2k + 1 < n exactly for k≤m−1k \le m - 1, the equality 2k+1=n2k + 1 = n holds for k=mk = m, and 2k+1>n2k + 1 > n for k≥m+1k \ge m + 1. So the row increases up to k=mk = m, has (nm)=(nm+1)\binom{n}{m} = \binom{n}{m+1}, and decreases after m+1m + 1. The maximum is at k=mk = m and k=m+1k = m + 1.

In both cases the maxima are at k=⌊n/2⌋k = \lfloor n/2 \rfloor and k=⌈n/2⌉k = \lceil n/2 \rceil. They are one value for even nn and two values for odd nn.

Check

Row 55 is 1,5,10,10,5,11, 5, 10, 10, 5, 1, with maxima at k=2k = 2 and k=3k = 3. Row 66 is 1,6,15,20,15,6,11, 6, 15, 20, 15, 6, 1, with the single maximum at k=3k = 3.

Remarks

The row is unimodal, and also symmetric by eq. 1.2.6(6). The size of the middle coefficient is about 2n/πn/22^n / \sqrt{\pi n / 2}, see Exercise 1.2.6-46.

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.