Parallel algorithms for tree accumulations - Sevilgen, Fatih E.; Aluru, Srinivas; Futamura, Natsuhiko (Journal of parallel and distributed computing, 2005)
Accumulations are abstract operations on trees useful in many applications involving trees. The upward accumulation problem is to aggregate data in the subtree under each node of the tree. The downward accumulation problem is to aggregate data at all the ancestors of each node. In this paper, we present parallel algorithms for these problems on coarse-grained distributed memory parallel computers. We first show that when the accumulation function and the set of possible values at nodes of the tree form an Abelian (commutative) group, this problem can be solved by a remarkably simple algorithm—Upward accumulation takes O n p + τ p + μ n p time, where n is the number of nodes in the tree, p is the number of processors, τ is the communication latency and μ is the transfer time per unit message size. Downward accumulation takes O n p + ( τ + μ ) log p time, making it very communication efficient. For the general case, we present upward and downward accumulation algorithms that run in O n p log n + τ p log n + μ n p log n time.