algorithm - 随机序列的最大连续子序列和的期望

标签 algorithm programming-pearls

这是 Programming Pearls 第 2 版(第 8.7 章)中的一个问题:

Considering a real number sequence, whose elements are drawn uniformly from the range [-1, 1], what is the expected maximum consecutive subsequence sum? (If all the elements are negative, the maximum sum is 0.)

假设序列的长度是N,是否有一个封闭形式的期望最大子序列和f(N)?我尝试做一些模拟,但没有找到任何线索。

感谢您的帮助。

最佳答案

这类似于 Brownian motion在 1D 中,但步长分布不寻常。对于大 N,它近似于 Wiener process .

(不确定其中任何一项是否有帮助,但如果您不知道其中的联系,它可能会提供额外的查找位置)。

关于algorithm - 随机序列的最大连续子序列和的期望,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11261066/

相关文章:

algorithm - 是否可以根据中值将数字序列分成两组而不进行排序?

PHP 查找数组的所有(有点)唯一组合

PHP:比较 NULL 和 FALSE - 转换为 ~Negative Infinity

c - 这个位排序代码中的位操作是如何工作的?

对排名结果进行元排名的算法

python - networkx shortest_path(G[, source, target, weight]) 函数的源算法

algorithm - 在游戏 “circle the cat” 中捕捉猫的好算法是什么?

linux - shell脚本中的算术运算

algorithm - 编程珍珠 : find one integer appears at least twice

c - "Programming Pearls": conflicting types for qsort