Affiliation:
1. Department of Computer Science and Software Engineering, University of Canterbury, Christchurch, New Zealand
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 a two-dimensional array of size n × n, little study has been undertaken to improve the time complexity. We first propose an O(n + K log K) time solution for one-dimension. This is asymptotically equivalent to Ruzzo and Tompa's when sorted order is needed. Based on this, we achieve O(n3 + Kn2 log n) time for two-dimensions. This is cubic time when K ≤ n/ log n. We also show that this upper bound does not exceed O(n3 log n) for K > n, namely O(n3 + min (K,n) · n log n).
Publisher
World Scientific Pub Co Pte Lt
Subject
Computer Science (miscellaneous)
Cited by
3 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献