Abstract
Given a sequence of n real numbers A = a 1, a 2,..., a n and a positive integer k, the Sum Selection Problem is to find the segment A(i,j) = a i , a i + 1,..., a j such that the rank of the sum s(i, j) = ∑ t = i j a t is k over all \(\frac{n(n-1)}{2}\) segments. We present a deterministic algorithm for this problem that runs in O(n logn) time. The previously best known randomized algorithm for this problem runs in expected O(n logn) time. Applying this algorithm we can obtain a deterministic algorithm for the k Maximum Sums Problem, i.e., the problem of enumerating the k largest sum segments, that runs in O(n logn + k) time. The previously best known randomized and deterministic algorithms for the k Maximum Sums Problem run respectively in expected O(n logn + k) and O(n log2 n + k) time in the worst case.
Research supported in part by the National Science Council under the Grants No. NSC-94-2213-E-001-004, NSC-95-2221-E-001-016-MY3, and NSC 94-2752-E-002-005-PAE, and by the Taiwan Information Security Center (TWISC), National Science Council under the Grant No. NSC94-3114-P-001-001-Y.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Agrawal, R., Imielinski, T., Swami, A.: Data mining using two-dimensional optimized association rules: scheme, algorithms, and visualization. In: Proceedings of the 1993 ACM SIGMOD international conference on management of data, pp. 207–216 (1993)
Ajtai, M., Komlós, J., Szemerédi, E.: An O(n logn) sorting networks. Combinatorica 3, 1–19 (1983)
Alk, S., Guenther, G.: Application of broadcasting with selective reduction to the maximal sum subsegment problem. International journal of high speed computating 3, 107–119 (1991)
Bae, S.E., Takaoka, T.: Algorithms for the problem of k maximum sums and a VLSI algorithm for the k maximum subarrays problem. In: 2004 International Symposium on Parallel Architectures, Algorithms and Networks, pp. 247–253 (2004)
Bengtsson, F., Chen, J.: Efficient Algorithms for K Maximum Sums. In: Fleischer, R., Trippen, G. (eds.) ISAAC 2004. LNCS, vol. 3341, pp. 137–148. Springer, Heidelberg (2004)
Bentley, J.: Programming perals: algorithm design techniques. Commun. ACM 27(9), 865–873 (1984)
Bentley, J.: Programming perals: algorithm design techniques. Commun. ACM 27(11), 1087–1092 (1984)
Cheng, C.-H., Chen, K.-Y., Tien, W.-C., Chao, K.-M.: Improved Algorithms for the k Maximum-Sums Problems. In: Deng, X., Du, D.-Z. (eds.) ISAAC 2005. LNCS, vol. 3827, Springer, Heidelberg (2005)
Brönnimann, H., Chazelle, B.: Optimal slope selection via cuttings. Computational Geometry 10, 23–29 (1998)
Cole, R., Salowe, J.S., Steiger, W.L., Szemeredi, E.: An optimal-time algorithm for slope selection. SIAM Journal on Computing 18(4), 792–810 (1989)
Cole, R.: Slowing down sorign networks to obtain faster sorting algorithm. Journal of the Association for Computing Machinery 34(1), 200–208 (1987)
Fukuda, T., Morimoto, Y., Morishita, S., Tokuyama, T.: Mining association rules between sets of items in large databases. In: Proceedings of the 1996 ACM SIGMOD international conference on management of data, pp. 13–23 (1996)
Gries, D.: A note on the standard strategy for developing loop invariants and loops. Science of Computer Programming 2, 207–214 (1982)
Lin, T.-C., Lee, D.T.: Randomized algorithm for the Sum Selection Problem. In: Deng, X., Du, D.-Z. (eds.) ISAAC 2005. LNCS, vol. 3827, pp. 515–523. Springer, Heidelberg (2005)
Megiddo, N.: Applying parallel computation algorithms in the design of serial algorithm. Journal of the Association for Computing Machinery 30(4), 852–865 (1983)
Perumalla, K., Deo, N.: Parallel algorithms for maximum subsequence and maximum subarray. Parallel Processing Letters 5, 367–373 (1995)
Qiu, K., Alk, S.: Parallel maximum sum algorithms on interconnection networks. Technical Report No. 99-431, Jodrey School of Computer Science, Acadia University, Canada (1999)
Smith, D.: Applications of a strategy for designing divide-and-conquer algorithms. Science of Computer Programming 8, 213–229 (1987)
Tamaki, H., Tokuyama, T.: Algorithms for the maximum subarray problem based on matrix multiplication. In: Proceedings of the ninth annual ACM-SIAM symposium on Discrete algorithms, pp. 446–452 (1998)
Takaoka, T.: Efficient algorithms for the maximum dubarray problem by fistance matrix multiplication. In: Proceedings of the 2002 australian theory symposium, pp. 189–198 (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lin, TC., Lee, D.T. (2006). Efficient Algorithms for the Sum Selection Problem and K Maximum Sums Problem. In: Asano, T. (eds) Algorithms and Computation. ISAAC 2006. Lecture Notes in Computer Science, vol 4288. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11940128_47
Download citation
DOI: https://doi.org/10.1007/11940128_47
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-49694-6
Online ISBN: 978-3-540-49696-0
eBook Packages: Computer ScienceComputer Science (R0)Springer Nature Proceedings Computer Science
