Efficient Algorithms for k Maximum Sums

* Final gross prices may vary according to local VAT.

Get Access


We study the problem of computing the k maximum sum subsequences. Given a sequence of real numbers 〈x 1,x 2,...x n 〉 and an integer parameter k, \(1\leq k \leq \frac{1}{2}n(n-1)\) , the problem involves finding the k largest values of \(\sum\limits^{j}_{\ell=i}x_{\ell}\) for 1 ≤ ijn. The problem for fixed k = 1, also known as the maximum sum subsequence problem, has received much attention in the literature and is linear-time solvable. Recently, Bae and Takaoka presented a Θ(nk)-time algorithm for the k maximum sum subsequences problem. In this paper, we design efficient algorithms that solve the above problem in \(O(min\{k+n{\rm log}^{2}n,n\sqrt{k}\})\) time in the worst case. Our algorithm is optimal for kn log2 n and improves over the previously best known result for any value of the user-defined parameter k. Moreover, our results are also extended to the multi-dimensional versions of the k maximum sum subsequences problem; resulting in fast algorithms as well.