Skip to main content

A pattern matching algorithm in binary trees

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 147))

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.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Donald E. Knuth, Fundamental Algorithm, The art of Computer Programming, Vol.1, Addison-Wesley, Reading,Mass., 1968; 2nd edition 1973.

    Google Scholar 

  2. Malcom C. Harrison, Implementation of the substring test by hashing, Comm.ACM, 14 (1971), pp 777–779.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. Alfred.V. Aho and Margaret J. Corasick, Efficient string matching: An aid to bibliographic search, Comm.ACM, 18 (1975), pp.333–340.

    Google Scholar 

  5. R.S. Boyer and J.S. Moore, A fast string searching algorithm, Comm.ACM, Vol.20, No.2, Oct. 1977.

    Google Scholar 

  6. C.M. Hoffmann and M.J. O'donnell, Pattern Matching in Trees, Journal of ACM, Vol.29, No.1, January 1982, pp.68–95.

    Google Scholar 

  7. K.Kojima, A linear tree matching algorithm, Master Thesis, Kyoto University.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Eiichi Goto Koichi Furukawa Reiji Nakajima Ikuo Nakata Akinori Yonezawa

Rights and permissions

Reprints 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

Publish with us

Policies and ethics