Abstract
We present optimal parallel solutions to reporting paths between pairs of nodes in an n-node tree. Our algorithms are deterministic and designed to run on an exclusive read exclusive write parallel random-access machine (EREW PRAM). In particular, we provide a, simple optimal parallel algorithm for pre-processing the input tree such that the path queries can be answered efficiently. Our algorithm for preprocessing runs in O(log n) time using O(n/log n) processors. Using the preprocessing, we can report paths between k node pairs in O(log n + log k) time using O(k + (n + S)/log n) processors on an EREW PRAM, where S is the size of the output. In particular, we can report the path between a single pair of distinct nodes in O(log n) time using O(L/log n) processors, where L denotes the length of the path.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
R. Cole. Parallel merge sort. SIAM J. Computing, 17, (1988), pp. 770–785.
R. Cole and U. Vishkin. The accelerated centroid decomposition technique for optimal parallel tree evaluation in logarithmic time. Algorithmica, 3 (1988), pp. 329–346.
A. Datta, A. Maheshwari, J.-R. Sack. Optimal parallel algorithms for direct dominance problems. First Annual European Symposium on Algorithms, Lecture Notes in Computer Science, Vol. 726, pp. 109–120, Springer-Verlag, 1993.
H.N. Djidjev, G.E. Pantziou and C.D. Zaroliagis. Computing Shortest Paths and Distances in Planar Graphs. Proceedings 18th ICALP, Madrid, 1991, LNCS 510, pp. 327–338, Springer Verlag.
M. T. Goodrich. Intersecting line segments in parallel with an output-sensitive number of processors. SIAM J. Computing, 20, (1991), pp. 737–755.
L. J. Guibas and J. Hershberger. Optimal shortest path queries in a simple polygon. J. of Computer and System Sciences 39, pp. 126–152, 1989.
R. Güting, O. Nurmi and T. Ottmann. Fast algorithms for direct enclosures and direct dominances. J. Algorithms 10 (1989), pp. 170–186.
J. JáJá. An Introduction to Parallel Algorithms. Addison-Wesley, 1992.
R. M. Karp and V. Ramachandran, Parallel Algorithms for Shared-Memory Machines, Handbook of Theoretical Computer Science, Edited by J. van Leeuwen, Volume 1, Elsevier Science Publishers B.V., 1990.
R. E. Ladner and M. J. Fisher. Parallel prefix computation, JACM, 27(4) (1980), pp. 831–838.
W. Paul, U. Vishkin and H. Wagener. Parallel dictionaries on 2–3 trees. Proc. 10th ICALP Lecture Notes in Computer Science, Vol. 154, pp. 597–609, 1983.
B. Schieber and U. Vishkin. On finding lowest common ancestors: Simplification and Parallelization. SIAM. J. Computing, 17 (1988), pp. 1253–1262.
R.E. Tarjan. Data Structures and Network Algorithms. SIAM, Philadelphia, 1983.
R. E. Tarjan and U. Vishkin. An efficient parallel biconnectivity algorithm. SIAM J. Computing, 14 (1985), pp. 862–874.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Maheshwari, A., Lingas, A. (1994). A simple optimal parallel algorithm for reporting paths in a tree. In: Enjalbert, P., Mayr, E.W., Wagner, K.W. (eds) STACS 94. STACS 1994. Lecture Notes in Computer Science, vol 775. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57785-8_165
Download citation
DOI: https://doi.org/10.1007/3-540-57785-8_165
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57785-0
Online ISBN: 978-3-540-48332-8
eBook Packages: Springer Book Archive