Linear Time Computation of the Maximal Linear and Circular Sums of Multiple Independent Insertions into a Sequence
Ricardo C. Corr\^ea, Pablo M. S. Farias

TL;DR
This paper presents a method to compute the maximal sum of sequences with multiple insertions efficiently in linear time, improving over naive approaches and applicable to network buffer optimization.
Contribution
It introduces algorithms for fast computation of maximal sums after multiple insertions, extending Kadane's algorithm to handle multiple updates in linear time.
Findings
Maximal sums after multiple insertions can be computed in O(n+m) time.
The approach extends to circular and contiguous subsequences.
Algorithms are practical and motivated by wireless network buffer minimization.
Abstract
The maximal sum of a sequence "A" of "n" real numbers is the greatest sum of all elements of any strictly contiguous and possibly empty subsequence of "A", and it can be computed in "O(n)" time by means of Kadane's algorithm. Letting "A^(x -> p)" denote the sequence which results from inserting a real number "x" between elements "A[p-1]" and "A[p]", we show how the maximal sum of "A^(x -> p)" can be computed in "O(1)" worst-case time for any given "x" and "p", provided that an "O(n)" time preprocessing step has already been executed on "A". In particular, this implies that, given "m" pairs "(x_0, p_0), ..., (x_{m-1}, p_{m-1})", we can compute the maximal sums of sequences "A^(x_0 -> p_0), ..., A^(x_{m-1} -> p_{m-1})" in "O(n+m)" time, which matches the lower bound imposed by the problem input size, and also improves on the straightforward strategy of applying Kadane's algorithm to each…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
