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.3-23

Exercise 1.2.3-23

not stated yet in Lean solution written

Rating10
KindInformal: the exercise has no formal statement, so Lean does not state it from the written solution
SectionSection 1.2.3 of Volume 1. Companion chapter: Sums and products

The task

Explain why the empty sum should be 00 and the empty product 11.

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

Ask which value keeps the rules of the section true when one of the two ranges is empty.

Solution

Show the solution

The value for an empty set must be the neutral element of the operation: 00 for a sum and 11 for a product. Then three things work without exception.

Splitting a range. The rule ∑1≤j≤naj=∑1≤j≤maj+∑m<j≤naj\sum_{1 \le j \le n} a_j = \sum_{1 \le j \le m} a_j + \sum_{m < j \le n} a_j should hold for m=0m = 0 and for m=nm = n, where one part is empty. It holds only if an empty sum is 00, since x+e=xx + e = x for all xx needs e=0e = 0. The same rule for products needs the empty product to be 11.

Rule (d). In Eq. (11) and its product form, the term over "RR and SS" is empty when RR and SS cannot hold together. The rule then reads ∑R+∑S=∑R∨S\sum_R + \sum_S = \sum_{R \vee S}, which is right only with the value 00 for the empty sum (and ∏R∏S=∏R∨S\prod_R \prod_S = \prod_{R \vee S} with the value 11 for the empty product).

Counting and formulas. The number of terms of an empty range is 00, as in Exercise 1.2.3-17. The geometric sum Eq. (14) for n=−1n = -1 gives 00 (Exercise 1.2.3-9), and ∏j=1nj=n!\prod_{j=1}^{n} j = n! gives 0!=10! = 1. Any other choice, such as ∏=0\prod = 0, would destroy the identity ∏j=1nj=n⋅∏j=1n−1j\prod_{j=1}^n j = n \cdot \prod_{j=1}^{n-1} j at n=1n = 1.

Remarks

The same convention makes the sum and the product of one term equal that term, and lets the notation work for all n≥0n \ge 0 in the formulas of the section. See Exercise 1.2.3-1 for the dotted notation, where the same issue gives a negative value.

This solution is checked, and a person has not reviewed it yet. The source.

In Lean

not stated yet The exercise is not stated in Lean yet.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.