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

Exercise 1.2.3-33

proved in Lean solution written

RatingM30
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

For distinct numbers x1,…,xnx_1, \ldots, x_n, find ∑jxjr/∏k≠j(xj−xk)\sum_j x_j^r / \prod_{k \ne j}(x_j - x_k) for r=0,1,…,nr = 0, 1, \ldots, n. Show that it is 00 for r<n−1r < n - 1, 11 for r=n−1r = n - 1 and ∑xj\sum x_j for r=nr = 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

Think of Lagrange interpolation. A polynomial of degree at most n−1n - 1 is fixed by its values at x1,…,xnx_1, \ldots, x_n.

Hint 2

Write the interpolation formula for such a polynomial and compare the coefficients of xn−1x^{n-1} on both sides.

Hint 3

For r=nr = n apply the result to xn−∏k(x−xk)x^n - \prod_k (x - x_k).

Solution

Show the solution

Plan. Prove the formula of Lagrange, read off the top coefficient, then apply it to powers of xx.

For each jj put Lj(x)=∏k≠jx−xkxj−xk.L_j(x) = \prod_{k \ne j} \frac{x - x_k}{x_j - x_k}. It is a polynomial of degree n−1n - 1, and Lj(xl)=δjlL_j(x_l) = \delta_{jl}. Let pp be a polynomial of degree at most n−1n - 1. The polynomial q=∑jp(xj)Ljq = \sum_j p(x_j) L_j has degree at most n−1n - 1 and q(xl)=p(xl)q(x_l) = p(x_l) for each ll. The difference p−qp - q has degree at most n−1n - 1 and nn distinct roots, so it is 00. Thus p(x)=∑j=1np(xj)∏k≠jx−xkxj−xk.p(x) = \sum_{j=1}^n p(x_j) \prod_{k \ne j} \frac{x - x_k}{x_j - x_k}. The coefficient of xn−1x^{n-1} in the product for index jj is 1/∏k≠j(xj−xk)1 / \prod_{k \ne j}(x_j - x_k). So, with [xn−1]p[x^{n-1}]p the coefficient of xn−1x^{n-1} in pp, [xn−1] p=∑j=1np(xj)∏k≠j(xj−xk).(∗)[x^{n-1}]\, p = \sum_{j=1}^n \frac{p(x_j)}{\prod_{k \ne j}(x_j - x_k)}. \tag{$*$}

The case 0≤r≤n−10 \le r \le n - 1. Take p(x)=xrp(x) = x^r. Its coefficient of xn−1x^{n-1} is 11 if r=n−1r = n - 1 and 00 if r<n−1r < n - 1. By (∗)(*) this is the sum ∑jxjr/∏k≠j(xj−xk)\sum_j x_j^r / \prod_{k \ne j}(x_j - x_k).

The case r=nr = n. Put p(x)=xn−∏k=1n(x−xk)p(x) = x^n - \prod_{k=1}^n (x - x_k). The product is xn−(x1+⋯+xn)xn−1+⋯x^n - (x_1 + \cdots + x_n)x^{n-1} + \cdots, so pp has degree at most n−1n - 1 and [xn−1]p=x1+⋯+xn[x^{n-1}]p = x_1 + \cdots + x_n. Also p(xj)=xjnp(x_j) = x_j^n, because the product vanishes at xjx_j. By (∗)(*) the sum for r=nr = n is x1+⋯+xnx_1 + \cdots + x_n. □\square

For n=3n = 3 and (x1,x2,x3)=(a,b,c)(x_1, x_2, x_3) = (a, b, c) this gives the four formulas of the exercise.

Check

Take x=(1,2,4)x = (1, 2, 4). The denominators are (1−2)(1−4)=3(1-2)(1-4) = 3, (2−1)(2−4)=−2(2-1)(2-4) = -2 and (4−1)(4−2)=6(4-1)(4-2) = 6. For r=0,1,2,3r = 0, 1, 2, 3 the sums are 1/3−1/2+1/6=01/3 - 1/2 + 1/6 = 0, 1/3−1+4/6=01/3 - 1 + 4/6 = 0, 1/3−2+16/6=11/3 - 2 + 16/6 = 1 and 1/3−4+64/6=7=1+2+41/3 - 4 + 64/6 = 7 = 1 + 2 + 4. For r=4r = 4 the sum is 3535, which is outside the three cases (python3).

Remarks

For r≥nr \ge n the sum is the complete symmetric polynomial hr−n+1(x1,…,xn)h_{r-n+1}(x_1, \ldots, x_n). The value 3535 in the check is h2(1,2,4)h_2(1, 2, 4). Exercises 1.2.3-34, 1.2.3-41, 1.2.3-43 and 1.2.3-44 use (∗)(*). The book's answer takes another route: an induction on nn that splits the sum into two sums on n−1n - 1 numbers.

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.