Skip to main content

Calculational Developments of New Parallel Algorithms for Size-Constrained Maximum-Sum Segment Problems

  • Conference paper
Functional and Logic Programming (FLOPS 2012)

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

Included in the following conference series:

  • 608 Accesses

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(ul) / 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.

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. Bentley, J.L.: Algorithm design techniques. Commun. ACM 27(9), 865–871 (1984)

    Article  MathSciNet  Google Scholar 

  2. Bentley, J.L.: Perspective on performance. Commun. ACM 27(11), 1087–1092 (1984)

    Article  Google Scholar 

  3. Bird, R.S.: Algebraic identities for program calculation. Comput. J. 32(2), 122–126 (1989)

    Article  MathSciNet  Google Scholar 

  4. Bird, R.S.: Maximum marking problems. J. Funct. Program. 11(4), 411–424 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  5. Chung, K.M., Lu, H.I.: An optimal algorithm for the maximum-density segment problem. SIAM J. Comput. 34(2), 373–387 (2004)

    Article  MathSciNet  MATH  Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

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

    Article  MATH  Google Scholar 

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

    Chapter  Google Scholar 

  12. Fukuda, T., Morimoto, Y., Morishita, S., Tokuyama, T.: Mining optimized association rules for numeric attributes. J. Comput. Syst. Sci. 58(1), 1–12 (1999)

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  Google Scholar 

  16. Huang, X.: An algorithm for identifying regions of a DNA sequence that satisfy a content requirement. Comput. Appl. Biosci. 10(3), 219–225 (1994)

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

  23. Skillicorn, D.B.: Deriving parallel programs from specifications using cost information. Sci. Comput. Program. 20(3), 205–221 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  24. Smith, D.R.: Applications of a strategy for designing divide-and-conquer algorithms. Sci. Comput. Program. 8(3), 213–229 (1987)

    Article  MATH  Google Scholar 

  25. Takaoka, T.: Efficient algorithms for the maximum subarray problem by distance matrix multiplication. Electr. Notes Theor. Comput. Sci. 61, 191–200 (2002)

    Article  Google Scholar 

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

    Google Scholar 

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

    Chapter  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  29. Zantema, H.: Longest segment problems. Sci. Comput. Program. 18(1), 39–66 (1992)

    Article  MathSciNet  MATH  Google Scholar 

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

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics