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

Exercise 1.2.3-25

proved in Lean solution written

Rating15
Markersrecommended
KindK2, decide: say whether a claim holds from the written solution
SectionSection 1.2.3 of Volume 1. Companion chapter: Sums and products

The task

Decide whether the derivation that (∑iai)(∑j1/aj)=n\bigl(\sum_i a_i\bigr)\bigl(\sum_j 1/a_j\bigr) = n is correct.

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

Test the claim with n=2n = 2 and two numbers of your choice.

Hint 2

The error is in the second equality. Look at the index variables.

Solution

Show the solution

Something is wrong, and the claim is false. For n=2n = 2 and a1=1a_1 = 1, a2=2a_2 = 2: (1+2)(1+12)=92≠2(1 + 2)(1 + \frac12) = \frac92 \ne 2.

The first equality, the distributive law, is correct: (∑iai)(∑j1/aj)=∑i∑jai/aj\bigl(\sum_i a_i\bigr)\bigl(\sum_j 1/a_j\bigr) = \sum_{i}\sum_{j} a_i/a_j. The second equality replaces jj by ii in the inner sum. This is illegal: the index ii is already in use in the outer sum, and the inner jj cannot take the name ii. The inner sum must run over all jj for each fixed ii, not only over j=ij = i. After the illegal step the double sum has become a single sum of the diagonal terms ai/ai=1a_i/a_i = 1, and the other n2−nn^2 - n terms are lost. The third equality is wrong as well, even if the second line is read literally: there the inner sum adds 11 for each of nn values, so it is nn, and the line should become ∑i=1nn\sum_{i=1}^n n, not ∑i=1n1\sum_{i=1}^n 1. The last equality, ∑i=1n1=n\sum_{i=1}^n 1 = n, is correct.

The correct value is (∑i=1nai)(∑j=1n1aj)=n+∑1≤i<j≤n(aiaj+ajai).\Bigl(\sum_{i=1}^n a_i\Bigr)\Bigl(\sum_{j=1}^n \frac1{a_j}\Bigr) = n + \sum_{1 \le i < j \le n} \Bigl(\frac{a_i}{a_j} + \frac{a_j}{a_i}\Bigr). The diagonal i=ji = j gives the nn terms equal to 11, and each pair i<ji < j gives two terms. For positive aia_i each bracket is at least 22, so the product is at least n+n(n−1)=n2n + n(n-1) = n^2.

Check

For a=(1,2)a = (1, 2): n+(12+2)=2+2.5=4.5=92n + (\frac12 + 2) = 2 + 2.5 = 4.5 = \frac92. For a=(1,1,1)a = (1, 1, 1) the product is 3⋅3=9=n23 \cdot 3 = 9 = n^2, and the claimed value n=3n = 3 is wrong.

Remarks

The error is the clash of the names of the index variables. The remedy is to give the two indices different names until the sum is finished. The bound n2n^2 is the Cauchy inequality, which follows from Exercise 1.2.3-30.

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.