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

Exercise 1.2.3-21

not stated yet in Lean solution written

RatingM25
MarkersM (mathematical), recommended
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.3 of Volume 1. Companion chapter: Sums and products

The task

Derive rule (d), Eq. (11), from Eq. (8) and the bracket form Eq. (17) of a sum.

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 each of the four sums as a sum over all integers with a bracket in it, by Eq. (17).

Hint 2

Combine with Eq. (8). The point is an identity between brackets that holds for each single jj.

Solution

Show the solution

Assume that the sums are finite, or that they converge, so that Eq. (8) applies. By Eq. (17), ∑R(j)aj+∑S(j)aj=∑jaj[R(j)]+∑jaj[S(j)].\sum_{R(j)} a_j + \sum_{S(j)} a_j = \sum_j a_j [R(j)] + \sum_j a_j [S(j)]. By Eq. (8) this is ∑jaj([R(j)]+[S(j)]).\sum_j a_j \bigl([R(j)] + [S(j)]\bigr). For each jj, [R(j)]+[S(j)]=[R(j) or S(j)]+[R(j) and S(j)].[R(j)] + [S(j)] = [R(j) \text{ or } S(j)] + [R(j) \text{ and } S(j)]. To see it, check the four cases for the truth of R(j)R(j) and S(j)S(j). Both false: 0+0=0+00 + 0 = 0 + 0. Only RR true: 1+0=1+01 + 0 = 1 + 0. Only SS true: 0+1=1+00 + 1 = 1 + 0. Both true: 1+1=1+11 + 1 = 1 + 1.

Put this into the sum and use Eq. (8) once more, then Eq. (17) in the other direction: ∑jaj[R(j) or S(j)]+∑jaj[R(j) and S(j)]=∑R(j) or S(j)aj+∑R(j) and S(j)aj.□\sum_j a_j [R(j) \text{ or } S(j)] + \sum_j a_j [R(j) \text{ and } S(j)] = \sum_{R(j) \text{ or } S(j)} a_j + \sum_{R(j) \text{ and } S(j)} a_j. \qquad \square

Check

Let aj=ja_j = j, R(j)=R(j) = "1≤j≤41 \le j \le 4", S(j)=S(j) = "3≤j≤63 \le j \le 6". The left side is 10+18=2810 + 18 = 28. The union is 1≤j≤61 \le j \le 6 with the sum 2121, and the intersection is 3≤j≤43 \le j \le 4 with the sum 77, so the right side is 21+7=2821 + 7 = 28.

Remarks

The bracket moves the condition of a sum from under the sign into the term, where the usual rules of algebra apply to it. Exercise 1.2.3-6 proves rule (d) for infinite sums by windows, and Exercise 1.2.3-22 gives the product form.

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.