Linear time computation of the maximal linear and circular sums of multiple independent insertions into a sequence
From MaRDI portal
(Redirected from Publication:501652)
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 sequence "A^(x_i -> p_i)", which takes a total of "Theta(n.m)" time. Our main contribution, however, is to obtain the same time bound for the more complicated problem of computing the greatest sum of all elements of any strictly or circularly contiguous and possibly empty subsequence of "A^(x -> p)". Our algorithms are easy to implement in practice, and they were motivated by and find application in a buffer minimization problem on wireless mesh networks.
Recommendations
Cites work
- A Linear Time Algorithm for the k Maximal Sums Problem
- A Parallel Algorithm for Finding All Successive Minimal Maximum Subsequences
- A note on a standard strategy for developing loop invariants and loops
- Data Mining with optimized two-dimensional association rules
- Efficient algorithms for locating the length-constrained heaviest segments with applications to biomolecular sequence analysis.
- Insertion and sorting in a sequence of numbers minimizing the maximum sum of a contiguous subsequence
- On the complexity of bandwidth allocation in radio networks
- On the range maximum-sum segment query problem
- Optimal algorithms for the average-constrained maximum-sum segment problem
- Selecting Sums in Arrays
- Sequencing to minimize the maximum renewal cumulative cost
- Wireless mesh networks: a survey
Cited in
(2)
This page was built for publication: Linear time computation of the maximal linear and circular sums of multiple independent insertions into a sequence
Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q501652)