Improved Algorithms for the K-Maximum Subarray Problem for Small K

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 + K2) 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(n3log K + K2n2). We improve this complexity to O(n3) for $K \le \sqrt{n}$.

[1]  Selim G. Akl,et al.  Parallel Maximum Sum Algorithms on Interconnection Networks , 1999 .

[2]  Gerth Stølting Brodal,et al.  Partially Persistent Data Structures of Bounded Degree with Constant Update Time , 1994, Nord. J. Comput..

[3]  Uri Zwick,et al.  A Slightly Improved Sub-Cubic Algorithm for the All Pairs Shortest Paths Problem with Real Edge Lengths , 2004, ISAAC.

[4]  Robert E. Tarjan,et al.  Making Data Structures Persistent , 1989, J. Comput. Syst. Sci..

[5]  Tadao Takaoka A Faster Algorithm for the All-Pairs Shortest Path Problem and Its Application , 2004, COCOON.

[6]  Walter L. Ruzzo,et al.  A Linear Time Algorithm for Finding All Maximal Scoring Subsequences , 1999, ISMB.

[7]  Bernhard Seeger,et al.  An asymptotically optimal multiversion B-tree , 1996, The VLDB Journal.

[8]  Zhaofang Wen Fast Parallel Algorithms for the Maximum Sum Problem , 1995, Parallel Comput..

[9]  Rajeev Raman,et al.  A Constant Update Time Finger Search Tree , 1990, Inf. Process. Lett..

[10]  Tadao Takaoka,et al.  Improved Algorithms for the K-Maximum Subarray Problem , 2006, Comput. J..

[11]  Tadao Takaoka,et al.  Efficient Algorithms for the Maximum Subarray Problem by Distance Matrix Multiplication , 2002, CATS.

[12]  Fredrik Bengtsson,et al.  Efficient Algorithms for k Maximum Sums , 2004, ISAAC.

[13]  Narsingh Deo,et al.  Parallel Processing Letters C World Scientiic Publishing Company Parallel Algorithms for Maximum Subsequence and Maximum Subarray , 2022 .

[14]  Rita Casadio,et al.  Algorithms in Bioinformatics, 5th International Workshop, WABI 2005, Mallorca, Spain, October 3-6, 2005, Proceedings , 2005, WABI.

[15]  Miklós Csűrös,et al.  Algorithms for Finding Maximal-Scoring Segment Sets , 2004 .

[16]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[17]  David Thomas,et al.  The Art in Computer Programming , 2001 .

[18]  Robert E. Tarjan,et al.  Planar Point Location Using Persistent Search Trees a , 1989 .

[19]  Haim Kaplan,et al.  Purely functional representations of catenable sorted lists , 1996, STOC '96.

[20]  Barry Smyth,et al.  Advances in Case-Based Reasoning , 1996, Lecture Notes in Computer Science.

[21]  Jon Bentley,et al.  Programming pearls: algorithm design techniques , 1984, CACM.

[22]  Tadao Takaoka,et al.  A New Upper Bound on the Complexity of the All Pairs Shortest Path Problem , 1991, Inf. Process. Lett..

[23]  Jon Louis Bentley Programming pearls: perspective on performance , 1984, CACM.

[24]  Elham Sahebkar Khorasani Algorithms Sequential & Parallel: A Unified Approach , 2007, Scalable Comput. Pract. Exp..

[25]  Donald B. Johnson,et al.  The Complexity of Selection and Ranking in X+Y and Matrices with Sorted Columns , 1982, J. Comput. Syst. Sci..

[26]  Miklós Csürös,et al.  Algorithms for Finding Maximal-Scoring Segment Sets (Extended Abstract) , 2004, WABI.

[27]  Hisao Tamaki,et al.  Algorithms for the maximum subarray problem based on matrix multiplication , 1998, SODA '98.

[28]  Gerth Stølting Brodal,et al.  Finger search trees with constant insertion time , 1998, SODA '98.

[29]  Robert E. Tarjan,et al.  Design and Analysis of a Data Structure for Representing Sorted Lists , 1978, SIAM J. Comput..

[30]  Tadao Takaoka,et al.  Algorithms for the problem of K maximum sums and a VLSI algorithm for the K maximum subarrays problem , 2004, 7th International Symposium on Parallel Architectures, Algorithms and Networks, 2004. Proceedings..

[31]  Michael L. Fredman,et al.  New Bounds on the Complexity of the Shortest Path Problem , 1976, SIAM J. Comput..

[32]  Manuel Blum,et al.  Time Bounds for Selection , 1973, J. Comput. Syst. Sci..