Abstract
Parallel algorithms for the one-dimensional and the two-dimensional size-constrained maximum-sum segment problems are proposed. The problem, which is a variant of the classic maximum-sum segment problem, is to locate the segment of the maximum total sum among those whose sizes are in a certain range, say, between l and u. It has several applications including pattern recognition, data mining, and DNA analyses, and the size requirement enables us to exclude trivial or useless results. Our parallel algorithms solve it in time O(n / n/p + log p) for one-dimensional arrays of length n and in time O(n 2(u–l) / p + log p) for n × n two-dimensional arrays on EREW PRAM that consists of p processors. It is worth noting that they achieve asymptotically optimal parallel speedups compared with the best known sequential algorithms that take O(n) and O(n 3) times for the one- and the two-dimensional cases, respectively. Our algorithms are correct by their construction: they are systematically derived from their specifications based on the Bird-Meertens formalism.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Bentley, J.L.: Algorithm design techniques. Commun. ACM 27(9), 865–871 (1984)
Bentley, J.L.: Perspective on performance. Commun. ACM 27(11), 1087–1092 (1984)
Bird, R.S.: Algebraic identities for program calculation. Comput. J. 32(2), 122–126 (1989)
Bird, R.S.: Maximum marking problems. J. Funct. Program. 11(4), 411–424 (2001)
Chung, K.M., Lu, H.I.: An optimal algorithm for the maximum-density segment problem. SIAM J. Comput. 34(2), 373–387 (2004)
Cole, M.: Parallel programming, list homomorphisms and the maximum segment sum problem. In: Proc. Parallel Computing: Trends and Applications, PARCO 1993, pp. 489–492. Elsevier, Amsterdam (1994)
Emoto, K., Fischer, S., Hu, Z.: Generate, test, and aggregate—a calculation-based framework for systematic parallel programming with MapReduce. Technical report METR 2011-34, Department of Mathematical Engineering and Information Physics, University of Tokyo (2011)
Emoto, K., Fischer, S., Hu, Z.: Generate, Test, and Aggregate—a Calculation-Based Framework for Systematic Parallel Programming with MapReduce. In: Seidl, H. (ed.) ESOP 2012. LNCS, vol. 7211, pp. 254–273. Springer, Heidelberg (2012)
Emoto, K., Hu, Z., Kakehi, K., Matsuzaki, K., Takeichi, M.: Generators-of-Generators Library with Optimization Capabilities in Fortress. In: D’Ambra, P., Guarracino, M., Talia, D. (eds.) Euro-Par 2010. LNCS, vol. 6272, pp. 26–37. Springer, Heidelberg (2010)
Emoto, K., Hu, Z., Kakehi, K., Takeichi, M.: A compositional framework for developing parallel programs on two-dimensional arrays. Int. J. Parallel Program. 35(6), 615–658 (2007)
Fan, T.-H., Lee, S., Lu, H.-I., Tsou, T.-S., Wang, T.-C., Yao, A.: An Optimal Algorithm for Maximum-Sum Segment and Its Application in Bioinformatics (Extended Abstract). In: Ibarra, O.H., Dang, Z. (eds.) CIAA 2003. LNCS, vol. 2759, pp. 251–257. Springer, Heidelberg (2003)
Fukuda, T., Morimoto, Y., Morishita, S., Tokuyama, T.: Mining optimized association rules for numeric attributes. J. Comput. Syst. Sci. 58(1), 1–12 (1999)
Fukuda, T., Morimoto, Y., Morishita, S., Tokuyama, T.: Data mining with optimized two-dimensional association rules. ACM Trans. Database Syst. 26(2), 179–213 (2001)
Goldwasser, M.H., Kao, M.Y., Lu, H.I.: Linear-time algorithms for computing maximum-density sequence segments with bioinformatics applications. J. Comput. Syst. Sci. 70(2), 128–144 (2005)
Hu, Z., Iwasaki, H., Takechi, M.: Formal derivation of efficient parallel programs by construction of list homomorphisms. ACM Trans. Program. Lang. Syst. 19(3), 444–461 (1997)
Huang, X.: An algorithm for identifying regions of a DNA sequence that satisfy a content requirement. Comput. Appl. Biosci. 10(3), 219–225 (1994)
Lau, H.C., Ngo, T.H., Nguyen, B.N.: Finding a length-constrained maximum-sum or maximum-density subtree and its application to logistics. Discrete Optimization 3(4), 385–391 (2006)
Lin, Y.L., Jiang, T., Chao, K.M.: Efficient algorithms for locating the length-constrained heaviest segments with applications to biomolecular sequence analysis. J. Comput. Syst. Sci. 65(3), 570–586 (2002)
Liu, H.F., Chao, K.M.: Algorithms for finding the weight-constrained k longest paths in a tree and the length-constrained k maximum-sum segments of a sequence. Theor. Comput. Sci. 407(1-3), 349–358 (2008)
Matsuzaki, K., Hu, Z., Takeichi, M.: Derivation of parallel programs for maximum marking problems on lists. IPSJ Trans. Program. 49, 16–27 (2008) (in Japanese)
Mu, S.C.: Maximum segment sum is back: deriving algorithms for two segment problems with bounded lengths. In: Proc. 2008 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation, PEPM 2008, pp. 31–39. ACM Press, New York (2008)
Sasano, I., Hu, Z., Takeichi, M., Ogawa, M.: Make it practical: a generic linear-time algorithm for solving maximum-weightsum problems. In: Proc. 5th ACM SIGPLAN International Conference on Functional Programming, ICFP 2000, pp. 137–149. ACM Press, New York (2000)
Skillicorn, D.B.: Deriving parallel programs from specifications using cost information. Sci. Comput. Program. 20(3), 205–221 (1993)
Smith, D.R.: Applications of a strategy for designing divide-and-conquer algorithms. Sci. Comput. Program. 8(3), 213–229 (1987)
Takaoka, T.: Efficient algorithms for the maximum subarray problem by distance matrix multiplication. Electr. Notes Theor. Comput. Sci. 61, 191–200 (2002)
Tamaki, H., Tokuyama, T.: Algorithms for the maxium subarray problem based on matrix multiplication. In: Proc. Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 446–452 (1998)
Wadler, P.: Theorems for free! In: Proc. FPCA 1989 Conference on Functional Programming Languages and Computer Architecture, pp. 347–359. ACM Press, New York (1989)
Wen, Z.: Fast parallel algorithms for the maximum sum problem. Parallel Comput. 21(3), 461–466 (1995)
Zantema, H.: Longest segment problems. Sci. Comput. Program. 18(1), 39–66 (1992)
Zhao, H., Hu, Z., Takeichi, M.: A Compositional Framework for Mining Longest Ranges. In: Lange, S., Satoh, K., Smith, C.H. (eds.) DS 2002. LNCS, vol. 2534, pp. 406–413. Springer, Heidelberg (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Morihata, A. (2012). Calculational Developments of New Parallel Algorithms for Size-Constrained Maximum-Sum Segment Problems. In: Schrijvers, T., Thiemann, P. (eds) Functional and Logic Programming. FLOPS 2012. Lecture Notes in Computer Science, vol 7294. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-29822-6_18
Download citation
DOI: https://doi.org/10.1007/978-3-642-29822-6_18
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-29821-9
Online ISBN: 978-3-642-29822-6
eBook Packages: Computer ScienceComputer Science (R0)