Skip to main content

Randomized Algorithm for the Sum Selection Problem

  • Conference paper
Algorithms and Computation (ISAAC 2005)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 3827))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bentley, J.: Programming perals: algorithm design techniques. Commun. ACMĀ 27, 9, 865ā€“873 (1984)

    ArticleĀ  Google ScholarĀ 

  2. Bentley, J.: Programming perals: algorithm design techniques. Commun. ACMĀ 27(11), 1087ā€“1092 (1984)

    ArticleĀ  Google ScholarĀ 

  3. Gries, D.: A note on the standard strategy for developing loop invariants and loops. Science of Computer ProgrammingĀ 2, 207ā€“214 (1982)

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  4. Smith, D.: Applications of a strategy for designing divide-and-conquer algorithms. Science of Computer ProgrammingĀ 8, 213ā€“229 (1987)

    ArticleĀ  MATHĀ  Google ScholarĀ 

  5. 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)

    Google ScholarĀ 

  6. 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)

    Google ScholarĀ 

  7. 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)

    ArticleĀ  Google ScholarĀ 

  8. 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)

    Google ScholarĀ 

  9. Perumalla, K., Deo, N.: Parallel algorithms for maximum subsequence and maximum subarray. Parallel Processing LettersĀ 5, 367ā€“373 (1995)

    ArticleĀ  Google ScholarĀ 

  10. 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)

    Google ScholarĀ 

  11. 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)

    Google ScholarĀ 

  12. 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)

    Google ScholarĀ 

  13. 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)

    ChapterĀ  Google ScholarĀ 

  14. 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)

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  15. MatouÅ”ek, J.: Randomized optimal algorithm for slope selection. Information Processing LettersĀ 39(4), 183ā€“187 (1991)

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  16. Cormen, T.H., Leiserson., C.E., Rivest, R.L.: Introdution to Algorithms. MIT Press, Cambridge

    Google ScholarĀ 

  17. Alon, N., Spencer, J.H., ErdĒ’s, P.: The Probabilistic Method. Wiley-Interscience Series, Hoboken

    Google ScholarĀ 

  18. Motwani, R., Raghavan, P.: Randomized Algorithms, Cambridge

    Google ScholarĀ 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics