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) = \sum_{t = i}^{j}{a_{t}}\) is k over all \({n(n-1)} \over {2}\) segments. We will give a randomized algorithm for this problem that runs in expected O(n log n) time. Applying this algorithm we can obtain an algorithm for the k Maximum Sums Problem, i.e., the problem of enumerating the k largest sum segments, that runs in expected O(n log n + k) time. The previously best known algorithm for the k Maximum Sums Problem runs in O(n log2 n + k) time in the worst case.
Research supported in part by the National Science Council under the Grants NSC-92-3112-B-001-018-Y, NSC-92-3112-B-001-021-Y, NSC-92-2218-E-001-001, NSC 93-2422-H-001-0001, NSC 93-2213-E-001-013 and NSC 93-2752-E-002-005-PAE, and by the Taiwan Information Security Center (TWISC), National Science Council under the Grants NSC 94-3114-P-001-001-Y and NSC 94-3114-P-011-001.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
Gries, D.: A note on the standard strategy for developing loop invariants and loops. Science of Computer ProgrammingĀ 2, 207ā214 (1982)
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)
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)
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)
Perumalla, K., Deo, N.: Parallel algorithms for maximum subsequence and maximum subarray. Parallel Processing LettersĀ 5, 367ā373 (1995)
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)
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)
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)
Dillencourt, M.H., Mount, D.M., Netanyahu, N.S.: A Randomized Algorithm for slope selection. International Journal of Computational Geometry and ApplicationsĀ 2(1), 1ā27 (1992)
MatouÅ”ek, J.: Randomized optimal algorithm for slope selection. Information Processing LettersĀ 39(4), 183ā187 (1991)
Cormen, T.H., Leiserson., C.E., Rivest, R.L.: Introdution to Algorithms. MIT Press, Cambridge
Alon, N., Spencer, J.H., ErdĒs, P.: The Probabilistic Method. Wiley-Interscience Series, Hoboken
Motwani, R., Raghavan, P.: Randomized Algorithms, Cambridge
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
Lin, TC., Lee, D.T. (2005). Randomized Algorithm for the Sum Selection Problem. In: Deng, X., Du, DZ. (eds) Algorithms and Computation. ISAAC 2005. Lecture Notes in Computer Science, vol 3827. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11602613_52
Download citation
DOI: https://doi.org/10.1007/11602613_52
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-30935-2
Online ISBN: 978-3-540-32426-3
eBook Packages: Computer ScienceComputer Science (R0)