Efficient Algorithms for k Maximum Sums

  • Authors:
  • Fredrik Bengtsson;Jingsen Chen

  • Affiliations:
  • Department of Computer Science and Electrical Engineering, Lulea University of Technology, S-971 87 Lulea, Sweden;Department of Computer Science and Electrical Engineering, Lulea University of Technology, S-971 87 Lulea, Sweden

  • Venue:
  • Algorithmica
  • Year:
  • 2006

Quantified Score

Hi-index 0.01

Visualization

Abstract

We study the problem of computing the k maximum sum subsequences. Given a sequence of real numbers $\left\langle x_{1},x_{2},\ldots ,x_{n}\right\rangle $ 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_{\ell =i}^{j}x_{\ell }$ for $1\leq i\leq j\leq n.$ 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 $\Theta(nk)$ -time algorithm for the k maximum sum subsequences problem. In this paper we design an efficient algorithm that solves the above problem in $O( \min \{k+n\log^{2}n,n\sqrt{k}\}) $ time in the worst case. Our algorithm is optimal for $k = \Omega(n \log^2 n)$ and improves over the previously best known result for any value of the user-defined parameter k