Disjoint segments with maximum density

  • Authors:
  • Yen Hung Chen;Hsueh-I Lu;Chuan Yi Tang

  • Affiliations:
  • Department of Computer Science, National Tsing Hua University, Hsinchu, Taiwan, R.O.C.;Department of Computer Science and Information Engineering, National Taiwan University, Taipei, Taiwan, R.O.C.;Department of Computer Science, National Tsing Hua University, Hsinchu, Taiwan, R.O.C.

  • Venue:
  • ICCS'05 Proceedings of the 5th international conference on Computational Science - Volume Part II
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

Given a sequence A of numbers and two positive integers ℓ and k, we study the problem to find k disjoint segments of A, each has length at least ℓ, such that their sum of densities is maximized. We give the first known polynomial-time algorithm for the problem: For general k, our algorithm runs in O(n ℓk) time. For the special case with k = 2 (respectively, k = 3), we also show how to solve the problem in O(n) (respectively, O(n + ℓ2)) time.