Abstract
An algorithm is presented which searches all occurrences of a given complete binary tree in another, in running time proportional to the sum of the numbers of their nodes. The algorithm is essentially an application of Knuth-Morris-Pratt's string matching algorithm. An extension to more general tree structures is also described.
Preview
Unable to display preview. Download preview PDF.
References
Donald E. Knuth, Fundamental Algorithm, The art of Computer Programming, Vol.1, Addison-Wesley, Reading,Mass., 1968; 2nd edition 1973.
Malcom C. Harrison, Implementation of the substring test by hashing, Comm.ACM, 14 (1971), pp 777–779.
D.E. Knuth, J.H. Morris, Jr., V.R. Pratt, Fast Pattern Matching in Strings, SIAM J. of Computer, Vol.6, No.2, June 1977, pp.323–350.
Alfred.V. Aho and Margaret J. Corasick, Efficient string matching: An aid to bibliographic search, Comm.ACM, 18 (1975), pp.333–340.
R.S. Boyer and J.S. Moore, A fast string searching algorithm, Comm.ACM, Vol.20, No.2, Oct. 1977.
C.M. Hoffmann and M.J. O'donnell, Pattern Matching in Trees, Journal of ACM, Vol.29, No.1, January 1982, pp.68–95.
K.Kojima, A linear tree matching algorithm, Master Thesis, Kyoto University.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1983 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kojima, K. (1983). A pattern matching algorithm in binary trees. In: Goto, E., Furukawa, K., Nakajima, R., Nakata, I., Yonezawa, A. (eds) RIMS Symposia on Software Science and Engineering. Lecture Notes in Computer Science, vol 147. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-11980-9_18
Download citation
DOI: https://doi.org/10.1007/3-540-11980-9_18
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-11980-7
Online ISBN: 978-3-540-39442-6
eBook Packages: Springer Book Archive