Abstract
The maximum subarray problem for a one- or two-dimensional array is to find the array portion that maiximizes the sum of array elements in it. The K-maximum subarray problem is to find the K subarrays with largest sums. We improve the time complexity for the one-dimensional case from \(O(min\{K+n\log^2 n, n\sqrt{K}\})\) for 0 ≤ K ≤ n(n–1)/2 to O(nlog K + K 2) for K ≤ n. The latter is better when \(K \le \sqrt n\log n\). If we simply extend this result to the two-dimensional case, we will have the complexity of O(n 3log K + K 2 n 2). We improve this complexity to O(n 3) for \(K \le \sqrt{n}\).
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Bae, S.E., Takaoka, T.: Parallel approaches to the maximum subarray problem. In: Japan-Korea Workshop on Al. and Comp., pp. 94–104 (2003)
Bae, S.E., Takaoka, T.: Algorithms for the problem of K maximum sums and a VLSI algorithm for the K maximum subarrays problem. In: ISPAN 2004, pp. 247–253 (2004)
Bengtsson, F., Chen, J.: Efficient algorithms for the k maximum sums. In: Fleischer, R., Trippen, G. (eds.) ISAAC 2004. LNCS, vol. 3341, pp. 137–148. Springer, Heidelberg (2004)
Bentley, J.: Programming pearls: algorithm design techniques. Commun. ACM 27(9), 865–873 (1984)
Bentley, J.: Programming pearls: perspective on performance. Commun. ACM 27(11), 1087–1092 (1984)
Brodal, G.S.: Finger search trees with constant insertion time. In: SODA, pp. 540–549 (1998)
Brown, M.R., Tarjan, R.E.: The design and analysis of a data structure for representing sorted lists. SIAM Jour. on Comp. 9(3), 594–614 (1980)
Csürös, M.: Algorithms for finding maxima-scoring segment sets. In: Jonassen, I., Kim, J. (eds.) WABI 2004. LNCS (LNBI), vol. 3240, pp. 62–73. Springer, Heidelberg (2004)
Dietz, P.F., Raman, R.: A constant update time finger search tree. Inf. Process. Lett. 52(3), 147–154 (1994)
Miller, R., Boxer, L.: Algorithms Sequential & Parallel- A Unified Approach. Prentice-Hall, Englewood Cliffs (2000)
Perumalla, K., Deo, N.: Parallel algorithms for maximum subsequence and maximum subarray. Parallel Process. Lett. 5(3), 367–373 (1995)
Qui, K., Akl, S.G.: Parallel maximum sum algorithms on intercommenction networks. Queen’s Uni. Dept. of Com. and Info. Sci. Technical Report 99-431 (1999)
Ruzzo, W.L., Tompa, M.: A linear time algorithm for finding all maximal scoring subsequences. In: Intelligent Sys. in Molecular Biology, pp. 234–241 (1999)
Takaoka, T.: A new upper bound on the complexity of the all pairs shortest paths problem. Inf. Process. Lett. 43(4), 195–199 (1992)
Takaoka, T.: Efficient algorithms for the maximum subarray problem by distance matrix multiplication. Elec. Notes in Theoretical Computer Sci., vol. 61. Elsevier, Amsterdam (2002)
Takaoka, T.: A faster algorithm for the all-pairs shortest path problem and its application. In: Roth-Berghofer, T.R., Göker, M.H., Güvenir, H.A. (eds.) ECCBR 2006. LNCS (LNAI), vol. 4106, pp. 278–289. Springer, Heidelberg (2006)
Tamaki, H., Tokuyama, T.: Algorithms for the maximum subarray problem based on matrix multiplication. In: SODA, pp. 446–452 (1998)
Wen, Z.: Fast parallel algorithms for the maximum sum problem. Parallel Computing 21(3), 461–466 (1995)
Zwick, U.: A slightly improved sub-cubic algorithm for the all pairs shortest paths problem with real edge lengths. In: Fleischer, R., Trippen, G. (eds.) ISAAC 2004. LNCS, vol. 3341, pp. 921–932. Springer, Heidelberg (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bae, S.E., Takaoka, T. (2005). Improved Algorithms for the K-Maximum Subarray Problem for Small K . In: Wang, L. (eds) Computing and Combinatorics. COCOON 2005. Lecture Notes in Computer Science, vol 3595. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11533719_63
Download citation
DOI: https://doi.org/10.1007/11533719_63
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-28061-3
Online ISBN: 978-3-540-31806-4
eBook Packages: Computer ScienceComputer Science (R0)