Approximate Maintenance of Maximum Subarray Sum in the Sliding Window Model

πŸ“… 2026-04-25
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF

career value

209K/year
πŸ€– AI Summary
This work addresses the problem of efficiently maintaining the maximum subarray sum in the sliding window model. It presents the first adaptation of the Smooth Histogram framework to this setting, yielding an approximation algorithm that supports dynamic updates within sublinear space. The proposed method achieves a $(1 \pm \varepsilon)$-approximation for any accuracy parameter $\varepsilon > 0$, with an update time of $O(\varepsilon^{-1} \log n)$ and a space complexity of $O(\varepsilon^{-1} (\log n)^2)$ bits, which is asymptotically optimal. By circumventing the high space overhead inherent in exact algorithms, this approach provides a theoretically optimal solution for real-time approximate computation of the maximum subarray sum over streaming data.

Technology Category

Application Category

πŸ“ Abstract
In the sliding window model, we are required to maintain the target statistics over the most recent $n$ elements of a data stream, which is captured by a window of size $n$ sliding over the data stream. Exact computation usually requires space linear in $n$, and the central goal is approximate maintenance using sublinear space. In this paper, we study the problem of maintaining the maximum subarray sum in the sliding window model. While the classical Kadane's algorithm computes the exact answer using constant space in the static setting, it does not extend directly, because a new element makes the oldest one expire, which may invalidate the optimal subarray so far. Our first observation is that the so-called Smooth Histogram framework can lead to a constant-factor approximation (in the sense of relative error) using $O((\log n)^2)$ bits of space. We then refine this framework accordingly, which enables for any $Ξ΅> 0$ to maintain a $(1 \pm Ξ΅)$-approximation using $O(Ξ΅^{-1}(\log n)^2)$ bits of space and $O(Ξ΅^{-1}\log n)$ operations per update. The space complexity is asymptotically optimal.
Problem

Research questions and friction points this paper is trying to address.

sliding window
maximum subarray sum
approximate maintenance
sublinear space
data stream
Innovation

Methods, ideas, or system contributions that make the work stand out.

sliding window
maximum subarray sum
smooth histogram
sublinear space
approximation algorithm