Efficient Algorithms for the Sum Selection Problem and K Maximum Sums Problem

  • Tien-Ching Lin
  • D. T. Lee
Conference paper

DOI: 10.1007/11940128_47

Part of the Lecture Notes in Computer Science book series (LNCS, volume 4288)
Cite this paper as:
Lin TC., Lee D.T. (2006) Efficient Algorithms for the Sum Selection Problem and K Maximum Sums Problem. In: Asano T. (eds) Algorithms and Computation. ISAAC 2006. Lecture Notes in Computer Science, vol 4288. Springer, Berlin, Heidelberg

Abstract

Given a sequence of n real numbers A = a1, a2,..., an and a positive integer k, the Sum Selection Problem is to find the segment A(i,j) = ai , ai + 1,..., aj such that the rank of the sum s(i, j) = ∑t = ijat is k over all \(\frac{n(n-1)}{2}\) segments. We present a deterministic algorithm for this problem that runs in O(n logn) time. The previously best known randomized algorithm for this problem runs in expected O(n logn) time. Applying this algorithm we can obtain a deterministic algorithm for the k Maximum Sums Problem, i.e., the problem of enumerating the k largest sum segments, that runs in O(n logn + k) time. The previously best known randomized and deterministic algorithms for the k Maximum Sums Problem run respectively in expected O(n logn + k) and O(n log2n + k) time in the worst case.

Keywords

k maximum sums problem sum selection problem maximum sum problem maximum sum subarray problem 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Tien-Ching Lin
    • 1
  • D. T. Lee
    • 1
  1. 1.Department of Computer Science and Information EngineeringNational Taiwan UniversityTaipeiTaiwan

Personalised recommendations