Skip to main content

A Faster and Unifying Algorithm for Comparing Trees

  • Conference paper
  • First Online:
Book cover Combinatorial Pattern Matching (CPM 2000)

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

Included in the following conference series:

  • 584 Accesses

Abstract

A widely-used method for determining the similarity of two labeled trees is to compute a maximum agreement subtree of the two trees. Previous work on this similarity measure only concerns with the comparison of labeled trees of two special kinds, namely, uniformly labeled trees (i.e., trees with all their nodes labeled by the same symbol) and evolutionary trees (i.e., leaf-labeled trees with distinct symbols for distinct leaves). This paper presents an algorithm for comparing trees that are labeled in an arbitrary manner. In addition to the generalization, our algorithm is faster than the previous algorithms in many cases.

Research supported in part by NSF Grant CCR-9531028

Research supported in part by Hong Kong RGC Grant HKU-7027/98E

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. J. Chung. O(n 2.5) time algorithms for the subgraph homeomorphism problem on trees. Journal of Algorithms, 8:106–112, 1987.

    Article  MATH  MathSciNet  Google Scholar 

  2. R. Cole and R. Hariharan. An O(n log n) algorithm for the maximum agreement subtree problem for binary trees. In Proceedings of the 7th Annual ACM-SIAM Symposium on Discrete Algorithms, pages 323–332, 1996.

    Google Scholar 

  3. T. H. Cormen, C. L. Leiserson, and R. L. Rivest. Introduction to Algorithms. MIT Press, Cambridge, MA, 1991.

    Google Scholar 

  4. M. Farach, T. M. Przytycka, and M. Thorup. Computing the agreement of trees with bounded degrees. In P. Spirakis, editor, Lecture Notes in Computer Science 979: Proceedings of the 3rd Annual European Symposium on Algorithms, pages 381–393. Springer-Verlag, New York, NY, 1995.

    Google Scholar 

  5. M. Farach and M. Thorup. Sparse dynamic programming for evolutionary-tree comparison. SIAM Journal on Computing, 26:210–230, 1997.

    Article  MATH  MathSciNet  Google Scholar 

  6. C. R. Finden and A. D. Gordon. Obtaining common pruned trees. Journal of Classification, 2:255–276, 1985.

    Article  Google Scholar 

  7. J. Friedman. Expressing logical formulas in natural languages. In J. Groenendijk, T. Janssen, and M. Stokhof, editors, Formal methods in the study of language, pages 113–130. Mathmatical Centre, Amsterdam, 1981.

    Google Scholar 

  8. H. N. Gabow and R. E. Tarjan. Faster scaling algorithms for network problems. SIAM Journal on Computing, 18:1013–1036, 1989.

    Article  MATH  MathSciNet  Google Scholar 

  9. A. Gupta and N. Nishimura. Finding largest subtrees and smallest supertrees. Algorithmica, 21(2): 183–210, 1998.

    Article  MATH  MathSciNet  Google Scholar 

  10. D. M. Hillis, C. Moritz, and B. K. Mable, editors. Molecular Systematics. Sinauer Associates, Sunderland, Ma, 2nd edition, 1996.

    Google Scholar 

  11. M. Y. Kao. Tree contractions and evolutionary trees. SIAM Journal on Computing, 27:1592–1616, 1998.

    Article  MATH  MathSciNet  Google Scholar 

  12. M. Y. Kao, T. W. Lam, W. K. Sung, and H. F. Ting. All-cavity maximum matchings. In Lecture Notes in Computer Science 1350: Proceedings of the 8th Annual International Symposium on Algorithms and Computation, pages 364–373, 1997.

    Google Scholar 

  13. M. Y. Kao, T. W. Lam, W. K. Sung, and H. F. Ting. A decomposition theorem for maximum weight bipartite matchings with applications to evolutionary trees. In Lecture Notes in Computer Science: Proceedings of the 8th Annual European Symposium on Algorithms, pages 438–449. Springer-Verlag, New York, NY, 1999.

    Google Scholar 

  14. P. Kilpeläinen and H. Mannila. Retrieval from hierarchical texts by partial patterns. In Proceedings of the 16th Annual International ACM-SIGIR Conference on Research and Development in Information Retrieval, pages 214–222, 1991.

    Google Scholar 

  15. P. Kilpeläinen and H. Mannila. Grammatical tree matching. In A. Apostolico, M. Crochemore, Z. Galil, and U. Manber, editors, Lecture Notes in Computer Science 644: Proceedings of the 3rd Annual Symposium on Combinatorial Pattern Matching, pages 162–174. Springer-Verlag, New York, NY, 1992.

    Google Scholar 

  16. B. Kimia, A. Tannenbaum, and S. W. Zucker. Shapes, shocks, and deformations, I. International Journal of Computer Vision, pages 189–224, 1995.

    Google Scholar 

  17. E. Kubicka, G. Kubicki, and F. McMorris. An algorithm to find agreement subtrees. Journal of Classification, 12:91–99, 1995.

    Article  MATH  Google Scholar 

  18. S. Y. Le, J. Owens, R. Nussinov, J. H. Chen, B. Shapiro, and J. V. Maizel. RNA secondary structures: comparison and determination of frequently recurring substructures by consensus. Computer Application in Bioscience, 5:205–210, 1989.

    Google Scholar 

  19. H. Mannila and K. J. Räihä. On query languages for the p-string data model. In H. Kangassalo, S. Ohsuga, and H. Jaakkola, editors, Information Modelling and Knowledge Bases, pages 469–482. IOS Press, Amsterdam, 1990.

    Google Scholar 

  20. P. Materna, P. Sgall, and Z. Hajicova. Linguistic constructions in transparent intensional logic. Prague Bulletin on Mathematical Linguistics, pages 27–32, 1985.

    Google Scholar 

  21. T. Przytycka. Sparse dynamic programming for maximum agreement subtree problem. In B. Mirkin, F. R. McMorris, F. S. Roberts, and A. Rzhetsky, editors, Mathematical Hierarchies and Biology, DIMACS Series in Discrete Mathematics and Theoretical Computer Science, pages 249–264, Providence, RI, 1997. American Mathematical Society.

    Google Scholar 

  22. B. Shapiro and K. Zhang. Comparing multiple RNA secondary structures using tree comparisons. Compter Applications in Bioscience, pages 309–318, 1990.

    Google Scholar 

  23. F. Y. Shih. Object representation and recognition using mathematical morphology model. Journal of Systems Integration, pages 235–256, 1991.

    Google Scholar 

  24. F. Y. Shih and O. R. Mitchell. Threshold decomposition of grayscale morphology into binary morphology. IEEE Transactions on Pattern Analysis and Machine Intelligence, 11:31–42, 1989.

    Article  MATH  Google Scholar 

  25. M. Steel and T. Warnow. Kaikoura tree theorems: Computing the maximum agreement subtree. Information Processing Letters, 48:77–82, 1993.

    Article  MATH  MathSciNet  Google Scholar 

  26. Y. Takahashi, Y. Satoh, H. Suzuki, and S. Sasaki. Recognition of largest common structural fragment among a variety of chemical structures. Analytical Science, pages 23–28, 1987.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kao, M.Y., Lam, T.W., Sung, W.K., Ting, H.F. (2000). A Faster and Unifying Algorithm for Comparing Trees. In: Giancarlo, R., Sankoff, D. (eds) Combinatorial Pattern Matching. CPM 2000. Lecture Notes in Computer Science, vol 1848. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45123-4_13

Download citation

  • DOI: https://doi.org/10.1007/3-540-45123-4_13

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-67633-1

  • Online ISBN: 978-3-540-45123-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics