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

Exercise 1.2.9-25

proved in Lean solution written

RatingM23
MarkersM (mathematical)
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.2.9 of Volume 1. Companion chapter: Generating functions

The task

Evaluate ∑k(nk)(2n−2kn−k)(−2)k\sum_k\binom nk\binom{2n-2k}{n-k}(-2)^k by turning it into a coefficient of one polynomial.

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 the term as a product of the coefficient [wk](1−2w)n[w^k](1-2w)^n and the coefficient [zn−k](1+z)2n−2k[z^{n-k}](1+z)^{2n-2k}.

Hint 2

Move zkz^k inside the coefficient, so that every term becomes [zn][z^n] of a single series in zz.

Hint 3

Substitute w=z/(1+z)2w=z/(1+z)^2.

Solution

Show the solution

Since (nk)(−2)k=[wk](1−2w)n\binom nk(-2)^k=[w^k](1-2w)^n and (2n−2kn−k)=[zn−k](1+z)2n−2k\binom{2n-2k}{n-k}=[z^{n-k}](1+z)^{2n-2k}, the sum is ∑k[wk](1−2w)n⋅[zn−k](1+z)2n−2k\sum_k[w^k](1-2w)^n\cdot[z^{n-k}](1+z)^{2n-2k}. Write [zn−k](1+z)2n−2k=[zn] zk(1+z)2n−2k[z^{n-k}](1+z)^{2n-2k}=[z^n]\,z^k(1+z)^{2n-2k} and put ak=[wk](1−2w)na_k=[w^k](1-2w)^n (zero for k>nk>n). Then

∑kak[zn]zk(1+z)2n−2k=[zn](1+z)2n∑k=0nak(z(1+z)2)k=[zn](1+z)2n(1−2z(1+z)2)n.\sum_ka_k[z^n]z^k(1+z)^{2n-2k}=[z^n](1+z)^{2n}\sum_{k=0}^na_k\Bigl(\frac z{(1+z)^2}\Bigr)^k=[z^n](1+z)^{2n}\Bigl(1-\frac{2z}{(1+z)^2}\Bigr)^n.

Now 1−2z(1+z)2=1+z2(1+z)21-\frac{2z}{(1+z)^2}=\frac{1+z^2}{(1+z)^2}, so the series is (1+z2)n(1+z^2)^n. The coefficient [zn](1+z2)n[z^n](1+z^2)^n is (nn/2)\binom n{n/2} for even nn, and 00 for odd nn, because (1+z2)n(1+z^2)^n has only even powers.

Check

For n=2n=2 the terms are 66, −8-8 and 44, with sum 2=(21)2=\binom21. For n=3n=3 the terms are 2020, −36-36, 2424 and −8-8, with sum 00. Python gives 1,0,2,0,6,0,20,0,701,0,2,0,6,0,20,0,70 for n=0,…,8n=0,\ldots,8.

Remarks

The same steps give ∑k(nk)(2n−2kn−k)ak=[zn]((1+z)2+az)n\sum_k\binom nk\binom{2n-2k}{n-k}a^k=[z^n]\bigl((1+z)^2+az\bigr)^n for every aa. The case a=−2a=-2 is the one above.

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.