Abstract
Two adaptive, level-order tree traversal algorithms are proposed for an exclusive-read and exclusive-write (EREW), parallel random access machine (PRAM) model of computation. Our breadth-first traversal algorithm for a general tree with n nodes achieves O((n/p)*log n /log(n/p)) time complexity using p processors on the EREW model, and hence it attains optimal speedup for p ≤ n1 − e, where 0 < e ≤ 1. This algorithm performs better (in terms of processor-time product) than an existing algorithm [12] which has O(k log n) time complexity using O(n1 + 1/k) processors on a concurrent-read and exclusive-write (CREW), PRAM model. The proposed breadth-depth algorithm for traversing a general tree requires O(n/p + log n) time on the EREW model, and thus it achieves optimal speedup for p ≤ n/log n. This algorithm provides a significant improvement over an existing parallel breadth-depth algorithm [4] which requires O(log n) time with O(n2) processors on CREW model. Our breadth-first traversal algorithm uses an Euler tour technique [20], and a list construction technique which is similar to the one used in [18] for solving the adjacency list construction problem for graphs. The breadth-depth traversal algorithm, on the other hand, is based on a special characterization which enables the reduction of this problem into a variety of list ranking problems.
This work was in part supported by a faculty research grant from the University of North Texas.
Preview
Unable to display preview. Download preview PDF.
References
A.V. Aho, J.E. Hopcroft and J.D. Ullman, Data Structures and Algorithms(Addison-Wesley, Reading, Mass., 1983).
A. Berztiss, "A Taxonomy of Binary Tree Traversals", BIT, Vol. 20, 1986, pp. 266–276.
R.P. Brent, "The Parallel Evaluation of General Arithmetic Expressions", J. ACM, Vol. 21, No. 2, Apr. 1974, pp. 201–206.
P. Chaudhuri, "Fast Parallel Graph Searching with Applications", BIT, Vol. 28, 1988, pp. 2–18.
C. C-Y. Chen and S. K. Das, "Parallel Algorithms for Level-Order Traversals in General Trees", Tech. Rep., #N-89-005, Dept. Computer Science, Univ. North Texas, Denton, TX, Aug. 1989.
C. C-Y. Chen and S. K. Das, "On Traversing Trees in Parallel", Tech. Rep., #N-89-006, Dept. Computer Science, Univ. North Texas, Denton, TX, Sep. 1989.
C. C-Y. Chen, S. K. Das, and S. G. Akl, "A Unified Approach to Parallel Depth-First Traversals of General Trees", Tech. Rep., #N-90-004, Dept. Computer Science, Univ. North Texas, Denton, TX, Mar. 1990.
R. Cole and U. Vishkin, "Approximate Parallel Scheduling. Part I: The Basic Technique With Applications To Optimal Parallel List Ranking in Logarithmic Time", SIAM J. Comput., Vol. 17, No. 1, Feb. 1988, pp. 128–142.
R. Cole and U. Vishkin, "The Accelerated Centroid Decomposition Technique for Optimal Parallel Tree Evaluation in Logarithmic Time", Courant Institute Tech. Rep. 242, New York University, New York, 1986.
R. Cole and U. Vishkin, "Deterministic Coin Tossing with Applications to Optimal Parallel List Ranking", Information and Control, Vol. 70, 1986, pp. 32–53.
S. K. Das and N. Deo, "Divide-and-Conquer-Based Optimal Parallel Algorithms for Some Graph Problems on EREW PRAM model", IEEE Transactions on Circuits and Systems, Vol.35, No. 3, Mar. 1988, pp. 312–322.
R. K. Ghosh and G.P. Bhattacharjee, "Parallel Breadth-First Search Algorithms for Trees and Graphs", Intern. J. Computer Math., Vol. 15, 1984, pp. 255–268.
R.K. Ghosh and G.P. Bhattacharjee, "A Parallel Search Algorithm for Directed Acyclic Graphs", BIT, Vol. 24, 1984, pp. 134–150.
E. Horowitz and S. Sahni, Fundamentals of Data Structures (Computer Science Press., Rockville, Maryland, 1977).
N.C. Kalra and P.C.P. Bhatt, "Parallel Algorithms for Tree Traversals", Parallel Computing, Vol. 2, 1985, pp. 163–171.
R. M. Karp and V. Ramachandran, "A Survey of Parallel Algorithms for Shared-Memory Machines", Computer Science Division (EECS) Rep. UCB/CSD 88/408, Mar. 1988, University of California, Berkeley, CA.
D.E. Knuth, The Art of Computer Programming. Vol. 1, Fundamental Algorithms (Addison Wesley, Reading, Mass. 1973).
C.P. Kruskal, L. Rudolph, and M. Snir, "Efficient Parallel Algorithms for Graph Problems", Proc. International Conference on Parallel Processing, 1986, pp. 869–876.
G. Miller and J. H. Reif, "Parallel Tree Contraction and Its Application", Proc. 26th Annual IEEE Symposium on Foundations of ComputerScience, 1985, pp. 478–489.
R. E. Tarjan and U. Vishkin, "An Efficient Parallel Biconnectivity Algorithm", SIAM J. Comput., Vol. 14, Nov. 1985, pp. 862–874.
J. Wyllie, "The Complexity of Parallel Computations", Ph.D. Thesis, Cornell University, Ithaca, NY, 1979.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Chen, C.C.Y., Das, S.K. (1991). Parallel Breadth-first and Breadth-depth traversals of general trees. In: Akl, S.G., Fiala, F., Koczkodaj, W.W. (eds) Advances in Computing and Information — ICCI '90. ICCI 1990. Lecture Notes in Computer Science, vol 468. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-53504-7_97
Download citation
DOI: https://doi.org/10.1007/3-540-53504-7_97
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-53504-1
Online ISBN: 978-3-540-46677-2
eBook Packages: Springer Book Archive