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.4-39

Exercise 1.2.4-39

not stated yet in Lean solution written

RatingHM35
MarkersHM (needs higher mathematics)
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.4 of Volume 1. Companion chapter: Integer functions and elementary number theory

The task

Verify that nine given functions are replicative, that is, that f(x)+f(x+1n)+⋯+f(x+n−1n)=f(nx)f(x) + f(x + \tfrac1n) + \cdots + f(x + \tfrac{n-1}{n}) = f(nx) for all xx and all n≥1n \ge 1.

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 Rnf(x)R_n f(x) for the left side. Parts (a), (g), (h) are direct. For (b) to (e) count how many of the numbers x+k/nx + k/n belong to the set.

Hint 2

For (d) and (e) write x=aπ+bx = a\pi + b with a,ba, b rational, and use that π\pi is irrational so that aa and bb are unique.

Hint 3

For (f) use the identity ∏k=0n−1(1−ωkz)=1−zn\prod_{k=0}^{n-1} (1 - \omega^k z) = 1 - z^n with ω=e2πi/n\omega = e^{2\pi i/n} and z=e2πixz = e^{2\pi i x}. For (i) split xx by j=⌊n{x}⌋j = \lfloor n\{x\} \rfloor.

Solution

Show the solution

Write Rnf(x)=∑k=0n−1f(x+k/n)R_n f(x) = \sum_{k=0}^{n-1} f(x + k/n). The claim is Rnf(x)=f(nx)R_n f(x) = f(nx).

(a) f(x)=x−12f(x) = x - \tfrac12. Then Rnf(x)=nx+1n⋅n(n−1)2−n2=nx+n−12−n2=nx−12=f(nx)R_n f(x) = nx + \tfrac{1}{n}\cdot\tfrac{n(n-1)}{2} - \tfrac n2 = nx + \tfrac{n-1}{2} - \tfrac n2 = nx - \tfrac12 = f(nx).

(b) f(x)=[x∈ℤ]f(x) = [x \in \mathbb Z]. Any two of the numbers x+k/nx + k/n differ by less than 11, so at most one is an integer. If x+k/n=N∈ℤx + k/n = N \in \mathbb Z, then nx=nN−knx = nN - k is an integer. Conversely if nx=M∈ℤnx = M \in \mathbb Z, choose k∈{0,…,n−1}k \in \{0, \ldots, n-1\} with k≡−M(modn)k \equiv -M \pmod n. Then x+k/n=(M+k)/nx + k/n = (M + k)/n is an integer. So Rnf(x)=[nx∈ℤ]=f(nx)R_n f(x) = [nx \in \mathbb Z] = f(nx).

(c) f(x)=[x∈ℤ, x>0]f(x) = [x \in \mathbb Z,\ x > 0]. At most one term is 11, as in (b). If x+k/n=N≥1x + k/n = N \ge 1, then nx=nN−k≥n−(n−1)=1nx = nN - k \ge n - (n - 1) = 1 is a positive integer. Conversely if nx=M≥1nx = M \ge 1, take kk as in (b). The integer (M+k)/n(M + k)/n is positive, since M+k≥1M + k \ge 1. So Rnf(x)=[nx∈ℤ, nx>0]=f(nx)R_nf(x) = [nx \in \mathbb Z,\ nx > 0] = f(nx).

(d) and (e). Let AA be a subset of ℚ\mathbb Q that is closed under multiplication by positive integers and under division by them (such as ℚ\mathbb Q or the positive rationals), and let BB be ℤ\mathbb Z or the positive integers. Define f(x)=1 if x=aπ+b with a∈A, b∈B, and f(x)=0 otherwise.f(x) = 1 \text{ if } x = a\pi + b \text{ with } a \in A,\ b \in B, \text{ and } f(x) = 0 \text{ otherwise.} Choosing A=ℚA = \mathbb Q, B=ℤB = \mathbb Z gives (d). The three other choices (AA positive, B=ℤB = \mathbb Z; A=ℚA = \mathbb Q, BB positive; AA and BB both positive) give (e).

Since π\pi is irrational, a number of the form aπ+ba\pi + b with a,ba, b rational has unique aa and bb. If xx has no such form, then no x+k/nx + k/n and no nxnx has it either, and both sides are 00. Otherwise x=aπ+bx = a\pi + b and x+k/n=aπ+(b+k/n)x + k/n = a\pi + (b + k/n), nx=naπ+nbnx = na\pi + nb. The condition a∈Aa \in A is the same as na∈Ana \in A, and it does not depend on kk. So Rnf(x)=[a∈A]⋅#{k:0≤k<n, b+k/n∈B}.R_nf(x) = [a \in A] \cdot \#\{k : 0 \le k < n,\ b + k/n \in B\}. By the arguments of (b) and (c), the count is [nb∈B][nb \in B] (both for B=ℤB = \mathbb Z and for BB the positive integers). Hence Rnf(x)=[na∈A][nb∈B]=f(nx)R_nf(x) = [na \in A][nb \in B] = f(nx).

(f) f(x)=log⁡∣2sin⁡πx∣f(x) = \log |2 \sin \pi x|, with f=−∞f = -\infty at integers. Let z=e2πixz = e^{2\pi i x} and ω=e2πi/n\omega = e^{2\pi i/n}. The numbers ωk\omega^k for 0≤k<n0 \le k < n are the nn roots of tn=1t^n = 1, so ∏k=0n−1(t−ωk)=tn−1\prod_{k=0}^{n-1}(t - \omega^k) = t^n - 1. Take t=1/zt = 1/z and multiply by znz^n to get ∏k=0n−1(1−ωkz)=1−zn\prod_{k=0}^{n-1} (1 - \omega^k z) = 1 - z^n. Now ∣1−e2πiy∣=2∣sin⁡πy∣|1 - e^{2\pi i y}| = 2|\sin \pi y|, and ωkz=e2πi(x+k/n)\omega^k z = e^{2\pi i (x + k/n)}, zn=e2πinxz^n = e^{2\pi i nx}. Taking absolute values, ∏k=0n−12∣sin⁡π(x+k/n)∣=2∣sin⁡πnx∣.\prod_{k=0}^{n-1} 2\bigl|\sin \pi(x + k/n)\bigr| = 2|\sin \pi n x|. Take logarithms. If some factor is 00, both sides are −∞-\infty. So Rnf(x)=f(nx)R_nf(x) = f(nx).

(g) Rn(f1+f2)=Rnf1+Rnf2=f1(nx)+f2(nx)R_n(f_1 + f_2) = R_nf_1 + R_nf_2 = f_1(nx) + f_2(nx).

(h) Rn(cf)=cRnf=cf(nx)R_n(cf) = c R_nf = cf(nx).

(i) Let ff be replicative and g(x)=f(x−⌊x⌋)g(x) = f(x - \lfloor x \rfloor). Put u=x−⌊x⌋∈[0,1)u = x - \lfloor x \rfloor \in [0, 1), j=⌊nu⌋∈{0,…,n−1}j = \lfloor nu \rfloor \in \{0, \ldots, n-1\} and w=u−j/n∈[0,1/n)w = u - j/n \in [0, 1/n). For 0≤k<n0 \le k < n the number x+k/nx + k/n equals an integer plus w+(j+k)/nw + (j+k)/n. Let l=(j+k) mod nl = (j + k) \bmod n. Then w+(j+k)/nw + (j+k)/n equals w+l/nw + l/n plus an integer, and 0≤w+l/n<1/n+(n−1)/n=10 \le w + l/n < 1/n + (n-1)/n = 1. So g(x+k/n)=f(w+l/n)g(x + k/n) = f(w + l/n). As kk runs over 0,…,n−10, \ldots, n-1, so does ll. Hence Rng(x)=∑l=0n−1f(w+l/n)=f(nw).R_ng(x) = \sum_{l=0}^{n-1} f(w + l/n) = f(nw). Now nw=nu−j={nu}nw = nu - j = \{nu\}, and nx=n⌊x⌋+nunx = n\lfloor x \rfloor + nu has the same fractional part as nunu. So nw=nx−⌊nx⌋nw = nx - \lfloor nx \rfloor and f(nw)=g(nx)f(nw) = g(nx). □\square

Check

For (a), n=2n = 2, x=0.3x = 0.3: −0.2+0.3=0.1-0.2 + 0.3 = 0.1 and f(0.6)=0.1f(0.6) = 0.1. For (f), n=5n = 5, x=0.137x = 0.137: both sides are 0.51379…0.51379\ldots in a floating point run. For (i) with f(x)=x−12f(x) = x - \tfrac12, the exact test ∑kg(x+k/n)=g(nx)\sum_k g(x + k/n) = g(nx) holds for x=i/11x = i/11, −30≤i<30-30 \le i < 30, 1≤n≤61 \le n \le 6. The counts in (b) and (c) were also verified with exact fractions.

Remarks

The function in (i) with f(x)=x−12f(x) = x - \tfrac12 is {x}−12\{x\} - \tfrac12, the first Bernoulli function. The function in (f) already has period 11, so (i) leaves it unchanged. The next exercise asks which replicative functions exist at all.

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.