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.
Keywords
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
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)
Bae, S.E.: Sequential and Parallel Algorithms for the Generalized Maximum Subarray Problem. PhD thesis, University of Canterbury, Christchurch, New Zealand (2007)
Bentley, J.: Programming pearls: Algorithm design techniques. Commun. ACM 27(9), 865–873 (1984)
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)
Dehne, F., Fabri, A., Rau-chaplin, A.: Scalable parallel computational geometry for coarse grained multicomputers. International Journal on Computational Geometry 6, 298–307 (1994)
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
Gotz, S.M.: Communication-Efficient Parallel Algoritms for Minimum Span- ning Tree Computation. PhD thesis, University of Paderborn, May 1998
National Cancer Institute: Cancer imaging archive (2015) (accessed 11- Jan-2014). https://public.cancerimagingarchive.net
Perumalla, K., Deo, N.: Parallel algorithms for maximum subse- quence and maximum subarray. Parallel Processing Letters 5, 367–373 (1995)
Qiu, K., Akl, S.G.: Parallel maximum sum algorithms on interconnection networks. Technical report, Queens University Dept. of Com., Ontario, Canada (1999)
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)
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
Wen, Z.: Fast parallel algorithms for the maximum sum problem. Parallel Computing 21(3), 461–466 (1995)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)