Approximating a Sum
Consider a function defined for all positive integers . Let be the sum of the first values of . That is,
In this problem, we employ randomness to approximate this sum. That is, we choose a random, uniformly distributed, -tuple of positive integers such that and calculate a modified sum as follows.
We now define the error of this approximation to be .
Let be the expected value of the error given the function , the number of terms in the sum and the length of random sample .
For example, and , where is Euler’s totient function.
Find rounded to six places after the decimal point.
近似求和
考虑定义在所有正整数上的函数。记为函数在前个正整数上的取值之和。也就是说,
在本题中,我们加入一些随机性来近似地求和。换言之,我们均匀地随机生成一个元正整数组,且该数组满足,然后按照以下方式求出近似和。
我们定义近似误差为。
给定函数、所需计算的项数和随机数组的长度,记为近似误差的期望值。
例如,,,其中为欧拉总计函数。
求,并将你的答案保留小数点后六位。
Gitalking ...