Algorithm for K disjoint maximum subarrays

  • Authors:
  • Sung Eun Bae;Tadao Takaoka

  • Affiliations:
  • Department of Computer Science and Software Engineering, University of Canterbury, Christchurch, New Zealand;Department of Computer Science and Software Engineering, University of Canterbury, Christchurch, New Zealand

  • Venue:
  • ICCS'06 Proceedings of the 6th international conference on Computational Science - Volume Part I
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

The maximum subarray problem is to find the array portion that maximizes the sum of array elements in it. For K disjoint maximum subarrays, Ruzzo and Tompa gave an O(n) time solution for one-dimension. This solution is, however, difficult to extend to two-dimensions. While a trivial solution of O(Kn3) time is easily obtainable for two-dimensions, little study has been undertaken to better this. We first propose an O(n+Klog K) time solution for one-dimension. This is equivalent to Ruzzo and Tompa’s when order is considered. Based on this, we achieve O(n3+Kn2log n) time for two-dimensions. This is cubic time when K≤ n/log n.