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

Exercise 1.2.6-59

proved in Lean solution written

RatingM25
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

Find a closed form for the array defined by An0=1A_{n0} = 1, A0k=[k=0]A_{0k} = [k = 0] and Ank=An−1,k+An−1,k−1+(nk)A_{nk} = A_{n-1,k} + A_{n-1,k-1} + \binom{n}{k} for n,k≥1n, k \ge 1.

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

Compute a few rows and look for a pattern.

Hint 2

Guess a combination of (nk)\binom{n}{k} and (nk+1)\binom{n}{k+1}, and check it by induction with eq. 1.2.6(9).

Solution

Show the solution

The first rows are A1⋅=1,2,0,…A_{1\cdot} = 1, 2, 0, \ldots and A2⋅=1,5,3,0,…A_{2\cdot} = 1, 5, 3, 0, \ldots (for example A11=A01+A00+(11)=0+1+1=2A_{11} = A_{01} + A_{00} + \binom11 = 0 + 1 + 1 = 2 and A21=A11+A10+(21)=2+1+2=5A_{21} = A_{11} + A_{10} + \binom21 = 2 + 1 + 2 = 5). These match (n+1)(nk)−(nk+1)(n+1)\binom{n}{k} - \binom{n}{k+1}, so we prove that by induction on nn.

Boundary: for k=0k = 0, (n+1)⋅1−n=1=An0(n+1)\cdot 1 - n = 1 = A_{n0}. For n=0n = 0, (0k)−(0k+1)=[k=0]\binom{0}{k} - \binom{0}{k+1} = [k = 0], which is A0kA_{0k}.

Step: let n,k≥1n, k \ge 1 and assume the formula for n−1n - 1. By eq. 1.2.6(9), An−1,k+An−1,k−1=n[(n−1k)+(n−1k−1)]−[(n−1k+1)+(n−1k)]=n(nk)−(nk+1).A_{n-1,k} + A_{n-1,k-1} = n\Bigl[\tbinom{n-1}{k} + \tbinom{n-1}{k-1}\Bigr] - \Bigl[\tbinom{n-1}{k+1} + \tbinom{n-1}{k}\Bigr] = n\tbinom{n}{k} - \tbinom{n}{k+1}. Add (nk)\binom{n}{k}: Ank=(n+1)(nk)−(nk+1)A_{nk} = (n+1)\binom{n}{k} - \binom{n}{k+1}.

Check

A31=4⋅3−3=9A_{31} = 4\cdot 3 - 3 = 9, and the recurrence gives A21+A20+(31)=5+1+3=9A_{21} + A_{20} + \binom31 = 5 + 1 + 3 = 9. Also A32=4⋅3−1=11A_{32} = 4\cdot 3 - 1 = 11, and A22+A21+(32)=3+5+3=11A_{22} + A_{21} + \binom32 = 3 + 5 + 3 = 11.

Remarks

The formula gives Ann=n+1A_{nn} = n + 1 and Ank=0A_{nk} = 0 for k>nk > n. So the row sums are (n+1)2n−2n+1=n2n+1(n+1)2^n - 2^n + 1 = n2^n + 1.

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.