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

  • Tien-Ching Lin
  • D. T. Lee
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4288)

Abstract

Given a sequence of n real numbers A = a1, a2,..., an and a positive integer k, the Sum Selection Problem is to find the segment A(i,j) = ai , ai + 1,..., aj such that the rank of the sum s(i, j) = ∑t = ijat 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 log2n + k) time in the worst case.

Keywords

k maximum sums problem sum selection problem maximum sum problem maximum sum subarray problem 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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. 2.
    Ajtai, M., Komlós, J., Szemerédi, E.: An O(n logn) sorting networks. Combinatorica 3, 1–19 (1983)MATHCrossRefMathSciNetGoogle Scholar
  3. 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)CrossRefGoogle Scholar
  4. 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. 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)CrossRefGoogle Scholar
  6. 6.
    Bentley, J.: Programming perals: algorithm design techniques. Commun. ACM 27(9), 865–873 (1984)CrossRefMathSciNetGoogle Scholar
  7. 7.
    Bentley, J.: Programming perals: algorithm design techniques. Commun. ACM 27(11), 1087–1092 (1984)CrossRefGoogle Scholar
  8. 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)CrossRefGoogle Scholar
  9. 9.
    Brönnimann, H., Chazelle, B.: Optimal slope selection via cuttings. Computational Geometry 10, 23–29 (1998)MATHCrossRefMathSciNetGoogle Scholar
  10. 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)MATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Cole, R.: Slowing down sorign networks to obtain faster sorting algorithm. Journal of the Association for Computing Machinery 34(1), 200–208 (1987)MathSciNetGoogle Scholar
  12. 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. 13.
    Gries, D.: A note on the standard strategy for developing loop invariants and loops. Science of Computer Programming 2, 207–214 (1982)MATHCrossRefMathSciNetGoogle Scholar
  14. 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)CrossRefGoogle Scholar
  15. 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)MATHMathSciNetGoogle Scholar
  16. 16.
    Perumalla, K., Deo, N.: Parallel algorithms for maximum subsequence and maximum subarray. Parallel Processing Letters 5, 367–373 (1995)CrossRefGoogle Scholar
  17. 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. 18.
    Smith, D.: Applications of a strategy for designing divide-and-conquer algorithms. Science of Computer Programming 8, 213–229 (1987)MATHCrossRefGoogle Scholar
  19. 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. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Tien-Ching Lin
    • 1
  • D. T. Lee
    • 1
  1. 1.Department of Computer Science and Information EngineeringNational Taiwan UniversityTaipeiTaiwan

Personalised recommendations