Skip to main content

Efficient Algorithms for the Sum Selection Problem and K Maximum Sums Problem

  • Conference paper
Algorithms and Computation (ISAAC 2006)

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

Included in the following conference series:

  • 1300 Accesses

  • 5 Citations

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.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

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

  2. Ajtai, M., Komlós, J., Szemerédi, E.: An O(n logn) sorting networks. Combinatorica 3, 1–19 (1983)

    Article  MATH  MathSciNet  Google Scholar 

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

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

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

  6. Bentley, J.: Programming perals: algorithm design techniques. Commun. ACM 27(9), 865–873 (1984)

    Article  MathSciNet  Google Scholar 

  7. Bentley, J.: Programming perals: algorithm design techniques. Commun. ACM 27(11), 1087–1092 (1984)

    Article  Google Scholar 

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

    Chapter  Google Scholar 

  9. Brönnimann, H., Chazelle, B.: Optimal slope selection via cuttings. Computational Geometry 10, 23–29 (1998)

    Article  MATH  MathSciNet  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  11. Cole, R.: Slowing down sorign networks to obtain faster sorting algorithm. Journal of the Association for Computing Machinery 34(1), 200–208 (1987)

    MathSciNet  Google Scholar 

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

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

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

    Chapter  Google Scholar 

  15. Megiddo, N.: Applying parallel computation algorithms in the design of serial algorithm. Journal of the Association for Computing Machinery 30(4), 852–865 (1983)

    MATH  MathSciNet  Google Scholar 

  16. Perumalla, K., Deo, N.: Parallel algorithms for maximum subsequence and maximum subarray. Parallel Processing Letters 5, 367–373 (1995)

    Article  Google Scholar 

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

  18. Smith, D.: Applications of a strategy for designing divide-and-conquer algorithms. Science of Computer Programming 8, 213–229 (1987)

    Article  MATH  Google Scholar 

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

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

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Keywords

Publish with us

Policies and ethics