Abstract
We present efficient distributed algorithms for the Tree Pattern Matching problem. To the best of our knowledge, these are the first distributed algorithms of this nature. Tree pattern matching is a fundamental operation in many programming task such as code optimization and automated theorem proving, and has a number of applications in distributed systems. We present both a top-down and bottom-up algorithm for linear tree pattern matching (where any variable occurs at most once in the pattern) for the case in which the subject tree is completely distributed as a node per processor. The pattern is assumed to reside within the local memory of each processor. Let the subject tree have n nodes and height h s , and the pattern m nodes and height h p . The top-down algorithm has bit complexity O(n log m h p ) and time complexity O(h s ), while the bottom-up algorithm has bit complexity O(n h p ) and time complexity O(h p ). However, the bottom-up algorithm requires preprocessing of the subject and pattern trees. An efficient extension of these distributed algorithms to the case of multiple patterns is also given.
Preview
Unable to display preview. Download preview PDF.
6 References
A.V. Aho and M Ganapathy: “Efficient Tree Pattern Matching: An Aid to Code Generation”, Proceedings of the Eleventh ACM Symposium on Principles of Programming Languages, pp. 334–340 (1984).
B. Awerbuch and Robert G Gallager: “A Distributed BFS Algorithm”, Proceedings of IEEE FOCS, pp. 250–256 (1985).
B. Schieber and S. Moran: “Slowing Sequential Algorithms to Obtain Fast Distributed and Parallel Algorithms: Maximal Matching”, Proceedings of ACM PODC, pp. 282–292 (1986).
C.M. Hoffman and M.J. O'Donnell: “Pattern Matching in Trees”, Journal of ACM, pp 68–95 (Jan. 1982).
C.M. Hoffman and M.J. O'Donnell: “An Interpreter Generator using Tree Pattern Matching”, Proceedings of the Sixth Annual Symposium on Principles of Programming Languages, pp. 169–179 (1979).
H. Kron: “Tree Templates and Subtree Transformational Grammars”, Ph.D. Dissertation, University of California, Santa Cruz (1975).
J. Guttag, E. Horowitz and D.R. Musser: “Abstract Data Types and Software Validation” CACM 21, 12, pp. 1048–1064 (Dec. 1978).
M.H. Overmars and J. Van Leeuwen: “Rapid Subtree Identification Revisited” Tech. Rep. CS-79-3, Univ. of Utrecht, Utrecht, The Netherlands (1979).
R.G. Gallager, P.A. Humblet and P.M. Spira: “A Distributed Algorithm for Minimum-Weight Spanning Trees”, ACM Transactions on Programming Languages and Systems, Vol. 4, No. 1, pp. 66–77 (January 1983).
R. Ramesh and I.V. Ramakrishnan: “Optimal Speedups for Parallel Pattern Matching in Trees”, Proceedings of 2nd Int'l Conf. on Rewriting Techniques and Applications (1987).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1988 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Singh, G., Smolka, S.A., Ramakrishnan, I.V. (1988). Distributed algorithms for tree pattern matching. In: van Leeuwen, J. (eds) Distributed Algorithms. WDAG 1987. Lecture Notes in Computer Science, vol 312. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0019797
Download citation
DOI: https://doi.org/10.1007/BFb0019797
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-19366-1
Online ISBN: 978-3-540-39239-2
eBook Packages: Springer Book Archive