Here is a problem from Programming Pearls 2nd edition (Chapter 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 is0
.)
Assuming the length of the sequence is N
, is there a closed form for the expected maximum subsequence sum f(N)
? I try to do some simulation, but failed to find any clue.
Thanks for help.