Skip to main content

Efficient BSP/CGM Algorithms for the Maximum Subarray Sum and Related Problems

  • Conference paper
  • First Online:
Computational Science and Its Applications -- ICCSA 2015 (ICCSA 2015)

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

Included in the following conference series:

  • 1127 Accesses

Abstract

Given an \(n \times n\) array A of integers, with at least one positive value, the maximum subarray sum problem consists in finding the maximum sum among the sums of all rectangular subarrays of A. The maximum subarray problem appears in several scientific applications, particularly in Computer Vision. The algorithms that solve this problem have been used to help the identification of the brightest regions of the images used in astronomy and medical diagnosis. The best known sequential algorithm that solves this problem has \({\text {O}}\bigl (n^{3}\bigr )\) time complexity. In this work we revisit the BSP/CGM parallel algorithm that solves this problem and we present BSP/CGM algorithms for the following related problems: the maximum largest subarray sum, the maximum smallest subarray sum, the number of subarrays of maximum sum, the selection of the subarray with k- maximum sum and the location of the subarray with the maximum relative density sum. To the best of our knowledge there are no parallel BSP/CGM algorithms for these related problems. Our algorithms use p processors and require \({\text {O}}\bigl (n^{3}/p\bigr )\) parallel time with a constant number of communication rounds. In order to show the applicability of our algorithms, we have implemented them on a cluster of computers using MPI and on a machine with GPGPU using CUDA and OpenMP. We have obtained good speedup results in both environments. We also tested the maximum relative density sum algorithm with a image of the cancer imaging archive.

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

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. Alves, C.E.R., Cáceres, E.N., Song, S.W.: BSP/CGM algorithms for maximum subsequence and maximum subarray. In: Kranzlmüller, D., Kacsuk, P., Dongarra, J. (eds.) EuroPVM/MPI 2004. LNCS, vol. 3241, pp. 139–146. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  2. Bae, S.E.: Sequential and Parallel Algorithms for the Generalized Maximum Subarray Problem. PhD thesis, University of Canterbury, Christchurch, New Zealand (2007)

    Google Scholar 

  3. Bentley, J.: Programming pearls: Algorithm design techniques. Commun. ACM 27(9), 865–873 (1984)

    Article  MathSciNet  Google Scholar 

  4. Dehne, F., Ferreira, A., Cáceres, E.N., Song, S.W., Roncato, A.: Efficient para- llel graph algorithms for coarse grained multicomputers and BSP. Algorithmica 33(2), 183–200 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  5. Dehne, F., Fabri, A., Rau-chaplin, A.: Scalable parallel computational geometry for coarse grained multicomputers. International Journal on Computational Geometry 6, 298–307 (1994)

    Google Scholar 

  6. Ferreira, C.S., Camargo, R.Y., Song, S.W.: A parallel maximum subarray algorithm on GPUs. In: IEEE International Symposium on Computer Architecture and High Performance Computing Workshops, pp. 12–17, October 2014

    Google Scholar 

  7. Gotz, S.M.: Communication-Efficient Parallel Algoritms for Minimum Span- ning Tree Computation. PhD thesis, University of Paderborn, May 1998

    Google Scholar 

  8. National Cancer Institute: Cancer imaging archive (2015) (accessed 11- Jan-2014). https://public.cancerimagingarchive.net

  9. Perumalla, K., Deo, N.: Parallel algorithms for maximum subse- quence and maximum subarray. Parallel Processing Letters 5, 367–373 (1995)

    Article  Google Scholar 

  10. Qiu, K., Akl, S.G.: Parallel maximum sum algorithms on interconnection networks. Technical report, Queens University Dept. of Com., Ontario, Canada (1999)

    Google Scholar 

  11. Saleh, S., Abdellah, M., Raouf, A.A.A., Kadah, Y.M.: High performance cuda-based implementation for the 2d version of the maximum sub- array problem (msp). In: Cairo International Biomedical Engineering Conference (CIBEC) (2012)

    Google Scholar 

  12. ITU International Telecommunication Union. Recommendation ITU-R BT. 470–6,7. Conventional Analog Television Systems (1998) (accessed 03-January- 2015). http://www.itu.int/rec/R-REC-BT.470-6-199811-S/en

  13. Wen, Z.: Fast parallel algorithms for the maximum sum problem. Parallel Computing 21(3), 461–466 (1995)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Anderson C. Lima .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Lima, A.C., Branco, R.G., Cáceres, E.N. (2015). Efficient BSP/CGM Algorithms for the Maximum Subarray Sum and Related Problems. In: Gervasi, O., et al. Computational Science and Its Applications -- ICCSA 2015. ICCSA 2015. Lecture Notes in Computer Science(), vol 9155. Springer, Cham. https://doi.org/10.1007/978-3-319-21404-7_29

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-21404-7_29

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-21403-0

  • Online ISBN: 978-3-319-21404-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics