Abstract
Parallel programs on lists have been intensively studied. It is well known that associativity provides a good characterization for divide-and-conquer parallel programs. In particular, the third homomorphism theorem is not only useful for systematic development of parallel programs on lists, but it is also suitable for automatic parallelization. The theorem states that if two sequential programs iterate the same list leftward and rightward, respectively, and compute the same value, then there exists a divide-and-conquer parallel program that computes the same value as the sequential programs.
While there have been many studies on lists, few have been done for characterizing and developing of parallel programs on trees. Naive divide-and-conquer programs, which divide a tree at the root and compute independent subtrees in parallel, take time that is proportional to the height of the input tree and have poor scalability with respect to the number of processors when the input tree is ill-balanced.
In this paper, we develop a method for systematically constructing scalable divide-and-conquer parallel programs on trees, in which two sequential programs lead to a scalable divide-andconquer parallel program. We focus on paths instead of trees so as to utilize rich results on lists and demonstrate that associativity provides good characterization for scalable divide-and-conquer parallel programs on trees. Moreover, we generalize the third homomorphism theorem from lists to trees.We demonstrate the effectiveness of our method with various examples. Our results, being generalizations of known results for lists, are generic in the sense that they work well for all polynomial data structures.
- Karl R. Abrahamson, N. Dadoun, David G. Kirkpatrick, and Teresa M. Przytycka. A simple parallel tree contraction algorithm. Journal of Algorithms, 10(2):287--302, 1989. Google Scholar
Digital Library
- Roland Carl Backhouse, Patrik Jansson, Johan Jeuring, and Lambert G. L. T. Meertens. Generic programming: An introduction. In Advanced Functional Programming, pages 28--115, 1998.Google Scholar
- Richard S. Bird. An introduction to the theory of lists. In Logic of Programming and Calculi of Discrete Design, pages 3--42. Springer, 1987. NATO ASI Series F Volume 36. Google Scholar
Digital Library
- Wei-Ngan Chin. Towards an automated tupling strategy. In Proceedings of the ACM SIGPLAN symposium on Partial evaluation and semanticsbased program manipulation, PEPM'93, pages 119--132, 1993. Google Scholar
Digital Library
- Murray Cole. Parallel programming, list homomorphisms and the maximum segment sum problem. In Parallel Computing: Trends and Applications, PARCO 1993, Grenoble, France, pages 489--492. Elsevier, 1994.Google Scholar
- Murray Cole. Parallel programming with list homomorphisms. Parallel Processing Letters, 5:191--203, 1995.Google Scholar
Cross Ref
- Richard Cole and Uzi Vishkin. The accelerated centroid decomposition technique for optimal parallel tree evaluation in logarithmic time. Algorithmica, 3:329--346, 1988.Google Scholar
Digital Library
- Maarten M. Fokkinga. Tupling and mutumorphisms. In Squiggolist, volume 1(4), 1989.Google Scholar
- Ian Foster. Designing and Building Parallel Programs. Addison Wesley, 1995. Google Scholar
Digital Library
- Alfons Geser and Sergei Gorlatch. Parallelizing functional programs by generalization. Journal of Functional Programming, 9(6):649--673, 1999. Google Scholar
Digital Library
- Alan Gibbons and Wojciech Rytter. Optimal parallel algorithm for dynamic expression evaluation and context-free recognition. Information and Computation, 81(1):32--45, 1989. Google Scholar
Digital Library
- Jeremy Gibbons. The third homomorphism theorem. Journal of Functional Programming, 6(4):657--665, 1996.Google Scholar
Cross Ref
- Jeremy Gibbons, Wentong Cai, and David B. Skillicorn. Efficient parallel algorithms for tree accumulations. Science of Computer Programming, 23(1):1--18, 1994. Google Scholar
Digital Library
- Zhenjiang Hu, Hideya Iwasaki, and Masato Takeichi. Formal derivation of efficient parallel programs by construction of list homomorphisms. ACM Transactions on Programming Languages and Systems, 19(3):444--461, 1997a. Google Scholar
Digital Library
- Zhenjiang Hu, Hideya Iwasaki, Masato Takeichi, and Akihiko Takano. Tupling calculation eliminates multiple data traversals. In Proceedings of the 2nd ACM SIGPLAN International Conference on Functional Programming, ICFP'97, Amsterdam, The Netherlands, pages 164--175. 1997b. Google Scholar
Digital Library
- Gèrard P. Huet. The zipper. Journal of Functional Programming, 7(5): 549--554, 1997. Google Scholar
Digital Library
- Kiminori Matsuzaki. Parallel Programming with Tree Skeletons. PhD thesis, Graduate School of Information Science and Technology, The University of Tokyo, 2007.Google Scholar
- Kiminori Matsuzaki and Zhenjiang Hu. Implementation of tree skeletons on distributed-memory parallel computers. Technical Report METR 2006-65, Department of Mathematical Informatics, University of Tokyo, December 2006.Google Scholar
- Kiminori Matsuzaki, Zhenjiang Hu, and Masato Takeichi. Parallelization with tree skeletons. In Euro-Par 2003. Parallel Processing, 9th International Euro-Par Conference, Klagenfurt, Austria, August 26-29, 2003. Proceedings, volume 2790 of Lecture Notes in Computer Science, pages 789--798. Springer, 2003.Google Scholar
- Conor McBride. The derivative of a regular type is its type of one-hole contexts. Unpublished manuscript, 2001.Google Scholar
- Gary L. Miller and John H. Reif. Parallel tree contraction and its application. In 26th Annual Symposium on Foundations of Computer Science, 21-23 October 1985, Portland, Oregon, USA, pages 478--489. 1985. Google Scholar
Digital Library
- Akimasa Morihata and Kiminori Matsuzaki. A tree contraction algorithm on non-binary trees. Technical Report METR 2008-27, Department of Mathematical Informatics, University of Tokyo, 2008.Google Scholar
- Kazutaka Morita, Akimasa Morihata, Kiminori Matsuzaki, Zhenjiang Hu, and Masato Takeichi. Automatic inversion generates divide-and-conquer parallel programs. In Proceedings of the ACM SIGPLAN 2007 Conference on Programming Language Design and Implementation, San Diego, California, USA, June 10-13, 2007, pages 146--155, 2007. Google Scholar
Digital Library
- Simon Peyton Jones, editor. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, 2003.Google Scholar
- John H. Reif, editor. Synthesis of Parallel Algorithms. Morgan Kaufmann Publishers, 1993. Google Scholar
Digital Library
- David B. Skillicorn. Parallel implementation of tree skeletons. Journal of Parallel and Distributied Computing, 39(2):115--125, 1996. Google Scholar
Digital Library
Index Terms
The third homomorphism theorem on trees: downward & upward lead to divide-and-conquer
Recommendations
The third homomorphism theorem on trees: downward & upward lead to divide-and-conquer
POPL '09: Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesParallel programs on lists have been intensively studied. It is well known that associativity provides a good characterization for divide-and-conquer parallel programs. In particular, the third homomorphism theorem is not only useful for systematic ...
Fast Approximate Minimum Spanning Tree Algorithm Based on K-Means
CAIP 2013: Proceedings, Part I, of the 15th International Conference on Computer Analysis of Images and Patterns - Volume 8047We present a fast approximate Minimum spanning treeMST framework on the complete graph of a dataset with N points, and any exact MST algorithm can be incorporated into the framework and speeded up. It employs a divide-and-conquer scheme to produce an ...
Sequences of spanning trees and a fixed tree theorem
Special issue on: Sixteenth European Workshop on Computational Geometry (EUROCG-2000)Let Ts be the set of all crossing-free spanning trees of a planar n-point set S. We prove that Ts contains, for each of its members T, a length-decreasing sequence of trees T0 ,..., Tk such that T0 = T, Tk = MST(S), Ti does not cross Ti-1 for i = 1,...,...







Comments