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

Exercise 1.2.3-45

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

Show that the Hilbert matrix aij=1/(i+j−1)a_{ij} = 1/(i + j - 1) is a Cauchy matrix. Find its inverse, show that all entries of the inverse are integers, and show that they add up to n2n^2.

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

Find xix_i and yjy_j with xi+yj=i+j−1x_i + y_j = i + j - 1.

Hint 2

Put these values in the formula of Exercise 1.2.3-41. Each product becomes a ratio of factorials.

Hint 3

Compare with a product of binomial coefficients. For the sum use Exercise 1.2.3-44.

Solution

Show the solution

Cauchy form. Put xi=ix_i = i and yj=j−1y_j = j - 1. Then xi+yj=i+j−1x_i + y_j = i + j - 1. The xix_i are distinct, the yjy_j are distinct, and every xi+yj≥1x_i + y_j \ge 1. So Exercises 1.2.3-38 and 1.2.3-41 apply.

The inverse. In the formula of Exercise 1.2.3-41 the pieces are as follows, with 1≤i,j≤n1 \le i, j \le n. ∏k=1n(xj+yk)=∏k=1n(j+k−1)=(n+j−1)!(j−1)!,∏k=1n(xk+yi)=(n+i−1)!(i−1)!.\prod_{k=1}^n (x_j + y_k) = \prod_{k=1}^n (j + k - 1) = \frac{(n + j - 1)!}{(j - 1)!}, \qquad \prod_{k=1}^n (x_k + y_i) = \frac{(n + i - 1)!}{(i - 1)!}. ∏k≠j(xj−xk)=∏k<j(j−k)∏k>j(j−k)=(j−1)! (−1)n−j(n−j)!,∏k≠i(yi−yk)=(−1)n−i(i−1)! (n−i)!.\prod_{k \ne j}(x_j - x_k) = \prod_{k < j}(j - k) \prod_{k > j}(j - k) = (j - 1)!\,(-1)^{n-j}(n - j)!, \qquad \prod_{k \ne i}(y_i - y_k) = (-1)^{n-i}(i - 1)!\,(n - i)!. The signs multiply to (−1)2n−i−j=(−1)i+j(-1)^{2n - i - j} = (-1)^{i+j}. Also xj+yi=i+j−1x_j + y_i = i + j - 1. So bij=(−1)i+j (n+i−1)! (n+j−1)!(i+j−1) ((i−1)! (j−1)!)2 (n−i)! (n−j)!.b_{ij} = \frac{(-1)^{i+j}\,(n + i - 1)!\,(n + j - 1)!}{(i + j - 1)\,\bigl((i - 1)!\,(j - 1)!\bigr)^2\,(n - i)!\,(n - j)!}. Now compare with (i+j−1)(n+i−1n−j)(n+j−1n−i)(i+j−2i−1)2.(i + j - 1)\binom{n + i - 1}{n - j}\binom{n + j - 1}{n - i}\binom{i + j - 2}{i - 1}^2. The binomials are (n+i−1n−j)=(n+i−1)!(n−j)! (i+j−1)!,(n+j−1n−i)=(n+j−1)!(n−i)! (i+j−1)!,(i+j−2i−1)2=((i+j−2)!)2((i−1)! (j−1)!)2.\binom{n + i - 1}{n - j} = \frac{(n + i - 1)!}{(n - j)!\,(i + j - 1)!}, \quad \binom{n + j - 1}{n - i} = \frac{(n + j - 1)!}{(n - i)!\,(i + j - 1)!}, \quad \binom{i + j - 2}{i - 1}^2 = \frac{\bigl((i + j - 2)!\bigr)^2}{\bigl((i - 1)!\,(j - 1)!\bigr)^2}. Since (i+j−1)!=(i+j−1)(i+j−2)!(i + j - 1)! = (i + j - 1)(i + j - 2)!, the factors ((i+j−2)!)2\bigl((i + j - 2)!\bigr)^2 and ((i+j−1)!)2\bigl((i + j - 1)!\bigr)^2 leave 1/(i+j−1)21/(i + j - 1)^2. Together with the factor i+j−1i + j - 1 in front this gives 1/(i+j−1)1/(i + j - 1). So bij=(−1)i+j(i+j−1)(n+i−1n−j)(n+j−1n−i)(i+j−2i−1)2.b_{ij} = (-1)^{i+j}(i + j - 1)\binom{n + i - 1}{n - j}\binom{n + j - 1}{n - i}\binom{i + j - 2}{i - 1}^2.

Integers. Each factor is an integer, since 0≤n−j≤n+i−10 \le n - j \le n + i - 1 and 0≤n−i≤n+j−10 \le n - i \le n + j - 1 for 1≤i,j≤n1 \le i, j \le n and 0≤i−1≤i+j−20 \le i - 1 \le i + j - 2. So every bijb_{ij} is an integer.

The sum. By Exercise 1.2.3-44 the sum of the entries is ∑xi+∑yj=∑i=1ni+∑j=1n(j−1)=n(n+1)/2+n(n−1)/2=n2\sum x_i + \sum y_j = \sum_{i=1}^n i + \sum_{j=1}^n (j - 1) = n(n+1)/2 + n(n-1)/2 = n^2. □\square

Check

For n=4n = 4 the inverse of the Hilbert matrix has the rows (16,−120,240,−140)(16, -120, 240, -140), (−120,1200,−2700,1680)(-120, 1200, -2700, 1680), (240,−2700,6480,−4200)(240, -2700, 6480, -4200) and (−140,1680,−4200,2800)(-140, 1680, -4200, 2800). The formula gives b11=1⋅(43)(43)(00)2=16b_{11} = 1 \cdot \binom{4}{3}\binom{4}{3}\binom{0}{0}^2 = 16 and b12=−2(42)(53)(10)2=−2⋅6⋅10=−120b_{12} = -2 \binom{4}{2}\binom{5}{3}\binom{1}{0}^2 = -2 \cdot 6 \cdot 10 = -120. The entries add up to 1616 (python3).

Remarks

The entries grow fast: for n=4n = 4 the largest is 64806480. The large entries reflect how badly conditioned the Hilbert matrix is, and this makes it a standard test of numeric inversion. The formula for bijb_{ij} also shows that the inverse is symmetric.

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.