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

Exercise 1.2.6-36

proved in Lean solution written

RatingM10
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 the sum of row nn of Pascal's triangle and the same sum with alternating signs.

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

Put x=1x = 1 in the binomial theorem, eq. 1.2.6(13).

Hint 2

Put x=−1x = -1 for the signs.

Solution

Show the solution

By the binomial theorem (1+x)n=∑k(nk)xk(1+x)^n = \sum_k\binom{n}{k}x^k for a natural nn. With x=1x = 1, ∑k(nk)=2n\sum_k\binom{n}{k} = 2^n. With x=−1x = -1, ∑k(nk)(−1)k=(1−1)n=0n\sum_k\binom{n}{k}(-1)^k = (1-1)^n = 0^n. This is 00 for n≥1n \ge 1 and 11 for n=0n = 0, since 00=10^0 = 1 here.

Check

For n=3n = 3 the row is 1,3,3,11, 3, 3, 1. The sum is 8=238 = 2^3 and the alternating sum is 1−3+3−1=01 - 3 + 3 - 1 = 0. For n=0n = 0 the row is 11 and both sums are 11.

Remarks

The first result counts the subsets of an nn-set. The second says that the subsets of even size and of odd size are equally many for n≥1n \ge 1, which Exercise 1.2.6-37 uses.

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.