Bounded cumulative sums

41 Views Asked by At

Is there a mathematical expression for a bounded cumulative sum? For example with $b_i \in (-\infty, +\infty)$ for all $i = 1, ..., n$:

$$x_{1} = \min\{0,b_1\},$$ $$x_{2} = \min\{0,\min\{0,b_1\}+b_2\},$$ $$x_{3} = \min\{0,\min\{0,\min\{0,b_1\}+b_2\},b_3\},$$ $$ ..., $$ $$ x_n = \;? \;?\; ? $$

It's fairly easy to solve the problem computationally with a for-loop. But I am looking for a mathematical expression if there is one. I would be very grateful for your comments and suggestions. Google hasn't helped so far.

Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

I don't think this is possible, but I will share what I found so far.

There are algorithms able to compute cumulative sums $x_i = \oplus_{j=0}^{i} b_j$ without a loop, and the $\oplus$ operator can be replaced with any binary associative operator. The problem is, the operator $a \oplus b = \min(0, a+b)$ is not associative. This seems related to saturation arithmetic.

It is possible to adjust the $b_i$'s to take saturation into account. We can find $b_i = \underline{b_i} + \delta_i$, for positive $\delta_i$. To calculate this correction, we still need to loop, which does not help much. When the smaller $\underline{b_i}$ values are accumulated with a normal cumulative sum, you get the same result as using the saturated cumulative sum from your question.