Abstract
We present parallel algorithms to construct binary trees with almost optimal weighted path length. Specifically, assuming that weights are normalized (to sum up to one) and error refers to the (absolute) difference between the weighted path length of a given tree and the optimal tree with the same weights, we present anO (logn)-time andn(log lognl logn)-EREW-processor algorithm which constructs a tree with error less than 0.18, andO (k logn log* n)-time andn-CREW-processor algorithm which produces a tree with error at most l/n k, and anO (k 2 logn)-time andn 2-CREW-processor algorithm which produces a tree with error at most l/n k. As well, we describe two sequential algorithms, anO(kn)-time algorithm which produces a tree with error at most l/n k, and anO(kn)-time algorithm which produces a tree with error at most\(1/2^{n2^k }\). The last two algorithms use different computation models.
Similar content being viewed by others
References
M. J. Atallah, S. R. Kosaraju, L. L. Larmore, G. L. Miller, and S.-H. Teng, Constructing trees in parallel,Proc. 1st ACM Symposium on Parallel Algorithms and Architectures, 1989, pp. 421–431.
A. Borodin and J. E. Hopcroft, Routing, merging and sorting on parallel models of computation,J. Comput. System Sci.,30 (1985), 130–145.
R. Cole, Parallel merge sort,SIAM J. Comput.,17(4) (1988), 770–785.
R. Cole and U. Vishkin, Deterministic coin tossing and accelerating cascades: micro and macro techniques for designing for designing parallel algorithms,Proc. 18th Annual Symposium on Theory of Computing, 1986, pp. 206–219.
T. C. Hu, A new proof of the T-C algorithm,SIAM J. Appl. Math.,25(1) (1973), 83–94.
D. A. Huffman, A method for the construction of minimum redundancy codes,Proc. IRE,40 (1952), 1098–1101.
D. G. Kirkpatrick and T. Przytycka, Efficient Construction of Binary Tree with Almost Optimal Weighted Path Length, TR 89-25, Department of Computer Science, University of British Columbia, 1989.
D. G. Kirkpatrick and S. Reisch, Upper bound for sorting integers on random access machines,Theoret. Comput. Sci.,28 (1984), 9.
K. Mehlhorn,Data Structures and Algorithms 1:Sorting and Searching, Springer-Verlag, New York, 1984.
G. L. Miller, V. Ramachandran, and E. Kaltofen, Efficient parallel evaluation of straight line code and arithmetic circuits,SIAM J. Comput.,17(4) (1988), 687–695.
S.-H. Teng, The construction of Huffman equivalent prefix code is in NC,ACM SIGACT,18(4) (1987), 54–61.
L. Valiant, Parallelism in comparison problems,SIAM J. Comput.,4 (1975), 348–355.
Author information
Authors and Affiliations
Additional information
Communicated by M. Snir.
The first author's research was supported in part by NSERC Research Grant 3053. A part of this work was done while the second author was at the University of British Columbia.
Rights and permissions
About this article
Cite this article
Kirkpatrick, D.G., Przytycka, T. Parallel construction of binary trees with near optimal weighted path length. Algorithmica 15, 172–192 (1996). https://doi.org/10.1007/BF01941687
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01941687