756. Approximating a Sum

Consider a function f(k) defined for all positive integers k>0. Let S be the sum of the first n values of f. That is,

S=f(1)+f(2)+f(3)++f(n)=k=1nf(k).

In this problem, we employ randomness to approximate this sum. That is, we choose a random, uniformly distributed, m-tuple of positive integers (X1,X2,X3,,Xm) such that 0=X0<X1<X2<<Xmn and calculate a modified sum S as follows.

S=i=1mf(Xi)(XiXi1)

We now define the error of this approximation to be Δ=SS.

Let E(Δ|f(k),n,m) be the expected value of the error given the function f(k), the number of terms n in the sum and the length of random sample m.

For example, E(Δ|k,100,50)=2525/13261.904223 and E(Δ|φ(k),104,102)5842.849907, where φ(k) is Euler's totient function.

Find E(Δ|φ(k),12345678,12345) rounded to six places after the decimal point.

756. 近似和式

考虑一个定义在全体正整数上的函数 f(k),记 Sf 在前 n 个正整数上的取值之和,也就是:

S=f(1)+f(2)+f(3)++f(n)=k=1nf(k).

本题中,我们引入随机性以估计此和式。也就是说,我们均匀随机地选出一个满足 0=X0<X1<X2<<Xmnm 元正整数组 (X1,X2,X3,,Xm) 并按下述方式计算近似和 S

S=i=1mf(Xi)(XiXi1)

我们定义这种近似方式的误差为 Δ=SS

E(Δ|f(k),n,m) 为:给定函数 f(k),求和上标 n 和随机样本的长度 m 时,该近似方法误差的期望。

例如,E(Δ|k,100,50)=2525/13261.904223E(Δ|φ(k),104,102)5842.849907。其中 φ(k) 是欧拉总计函数。

E(Δ|φ(k),12345678,12345) 四舍五入至小数点后第六位的结果。


这个链接 回到源站。

这个链接 回到详细版题目目录。