Given a sequence of n real numbers and an integer k, 1 k 1 2 n(n − 1), the k maximum-sum segments problem is to locate the k segments whose sums are the k largest among all possible segment sums. Recently, Bengtsson and Chen gave an O(min{k + n log 2 n, n √ k})-time algorithm for this problem. Bae and Takaoka later proposed a more efficient algorithm for small k. In this paper, we propose an O(n + k log(min{n, k}))-time algorithm for the same problem, which is superior to both of them when k is o(n log n). We also give the first optimal algorithm for delivering the k maximum-sum segments in non-decreasing order if k n. Then we develop an O(n 2d−1 +k log min{n, k})-time algorithm for the d-dimensional version of the problem, where d > 1 and each dimension, without loss of generality, is of the same size n. This improves the best previously known O(n 2d−1 C)-time algorithm, also by Bengtsson and Chen, where C = min{k + n log 2 n, n √ k}. It should be pointed out that, given a two-dimensional array of size m×n, our algorithm for finding the k maximum-sum subarrays is the first one achieving cubic time provided that k is O(m 2 n/ log n).
Given a sequence of n real numbers and an integer k, 1 k 1 2 n(n − 1), the k maximum-sum segments problem is to locate the k segments whose sums are the k largest among all possible segment sums. Recently, Bengtsson and Chen gave an O(min{k + n log 2 n, n √ k})-time algorithm for this problem. Bae and Takaoka later proposed a more efficient algorithm for small k. In this paper, we propose an O(n + k log(min{n, k}))-time algorithm for the same problem, which is superior to both of them when k is o(n log n). We also give the first optimal algorithm for delivering the k maximum-sum segments in non-decreasing order if k n. Then we develop an O(n 2d−1 +k log min{n, k})-time algorithm for the d-dimensional version of the problem, where d > 1 and each dimension, without loss of generality, is of the same size n. This improves the best previously known O(n 2d−1 C)-time algorithm, also by Bengtsson and Chen, where C = min{k + n log 2 n, n √ k}. It should be pointed out that, given a two-dimensional array of size m×n, our algorithm for finding the k maximum-sum subarrays is the first one achieving cubic time provided that k is O(m 2 n/ log n).
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2025 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.