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

Exercise 1.2.3-32

proved in Lean solution written

RatingM20
MarkersM (mathematical)
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

Show that a product of nn sums, each over ii from 11 to mm, equals the sum over all nn-tuples (i1,…,in)(i_1, \ldots, i_n) of the products ai11⋯ainna_{i_1 1} \cdots a_{i_n n}.

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

Use induction on nn. Check n=0n = 0 (the empty product) and n=1n = 1 first.

Hint 2

In the step, multiply the identity for nn by one more sum and use rule (a) once.

Solution

Show the solution

Write PnP_n for the claim: ∏j=1n∑i=1maij=∑1≤i1,…,in≤mai11⋯ainn\prod_{j=1}^n \sum_{i=1}^m a_{ij} = \sum_{1 \le i_1, \ldots, i_n \le m} a_{i_1 1} \cdots a_{i_n n}.

For n=0n = 0 the left side is the empty product 11. The right side has one term, the empty tuple, and its product is 11. For n=1n = 1 both sides are ∑iai1\sum_{i} a_{i1}.

Assume PnP_n. Multiply both sides by ∑i=1mai,n+1\sum_{i=1}^m a_{i,n+1}. By rule (a), a product of two sums is a sum over the pairs of terms: ∏j=1n+1∑i=1maij=(∑i1,…,inai11⋯ainn)(∑in+1=1main+1,n+1)=∑i1,…,in ∑in+1ai11⋯ainn ain+1,n+1.\prod_{j=1}^{n+1} \sum_{i=1}^m a_{ij} = \Bigl(\sum_{i_1, \ldots, i_n} a_{i_1 1} \cdots a_{i_n n}\Bigr)\Bigl(\sum_{i_{n+1}=1}^m a_{i_{n+1}, n+1}\Bigr) = \sum_{i_1, \ldots, i_n}\ \sum_{i_{n+1}} a_{i_1 1} \cdots a_{i_n n}\, a_{i_{n+1}, n+1}. A pair made of an nn-tuple and an index in+1i_{n+1} is an (n+1)(n+1)-tuple, and every (n+1)(n+1)-tuple arises once. So the right side is the sum over 1≤i1,…,in+1≤m1 \le i_1, \ldots, i_{n+1} \le m of ai11⋯ain+1,n+1a_{i_1 1} \cdots a_{i_{n+1}, n+1}. This is Pn+1P_{n+1}. □\square

Check

Take m=2m = 2, n=2n = 2 and the matrix with rows (1,2)(1,2) and (3,4)(3,4). The column sums are 44 and 66, so the left side is 2424. The four terms of the right side are a11a12=2a_{11}a_{12} = 2, a11a22=4a_{11}a_{22} = 4, a21a12=6a_{21}a_{12} = 6 and a21a22=12a_{21}a_{22} = 12. Their sum is 2424.

Remarks

The identity is the general form of the distributive law. When all columns are equal it gives the expansion of (x1+⋯+xm)n(x_1 + \cdots + x_m)^n as a sum over tuples. Exercise 1.2.3-46 uses the same expansion for a determinant.

This solution is checked, 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.