A Linear Tree Edit Distance Algorithm for Similar Ordered Trees

  • Hélène Touzet
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3537)


We describe a linear algorithm for comparing two similar ordered rooted trees with node labels. The method for comparing trees is the usual tree edit distance. We show that an optimal mapping which uses at most k insertions or deletions can then be constructed in O(nk 3) where n is the size of the trees. The approach is inspired by the Zhang-Shasha algorithm for tree edit distance in combination with an adequate pruning of the search space.


Optimal Path Optimal Mapping Optimal Alignment Edit Operation Edit Graph 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Chawathe, S.: Comparing hierarchical data in external memory. In: Twenty-fifth International Conference on Very Large Data Bases, pp. 90–101 (1999)Google Scholar
  2. 2.
    Dulucq, S., Tichit, L.: RNA secondary structure comparison: exact analysis of the Zhang-Shasha tree edit algorithm. Theoretical Computer Science 306(1- 3), 471–484 (2003)zbMATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    Dulucq, S., Touzet, H.: Analysis of tree edit distance algorithms. In: Baeza-Yates, R., Chávez, E., Crochemore, M. (eds.) CPM 2003. LNCS, vol. 2676, pp. 83–95. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  4. 4.
    Höchsmann, M., Töller, T., Giegerich, R., Kurtz, S.: Local similarity in RNA secondary structures. In: IEEE Bioinformatics Conference, pp. 159–168 (2003)Google Scholar
  5. 5.
    Jansson, J., Trung Hieu, N., Sung, W.-K.: Local gapped subforest alignment and its application in finding RNA structural motifs. In: Fleischer, R., Trippen, G. (eds.) ISAAC 2004. LNCS, vol. 3341, pp. 569–580. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  6. 6.
    Jansson, J., Lingas, A.: A fast algorithm for optimal alignment between similar ordered trees. Fundamenta Informaticae 56(1,2), 105–120 (2003)zbMATHMathSciNetGoogle Scholar
  7. 7.
    Jiang, T., Wang, L., Zhang, K.: Alignment of trees - an alternative to tree edit. Theoretical Computer Science 143(1), 137–148 (1995)zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Klein, P.: Computing the edit-distance between unrooted ordered trees. In: Bilardi, G., Pietracaprina, A., Italiano, G.F., Pucci, G. (eds.) ESA 1998. LNCS, vol. 1461, pp. 91–102. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  9. 9.
    Setubal, J., Meidanis, J.: Sequence Comparison and Database Search. In: Introduction to computational biology, International Thomson Publishing Company (1997)Google Scholar
  10. 10.
    Tai, K.C.: The tree-to-tree correction problem. Journal of the Association for Comput. Machi. 26, 422–433 (1979)zbMATHMathSciNetGoogle Scholar
  11. 11.
    Valiente, G.: Algorithms on Trees and Graphs. Springer, Heidelberg (2002)zbMATHGoogle Scholar
  12. 12.
    Zhang, K., Shasha, D.: Simple fast algorithms for the editing distance between trees and related problems. SIAM Journal of Computing 18(6), 1245–1262 (1989)zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Hélène Touzet
    • 1
  1. 1.LIFL – UMR CNRS 8022, Université Lille 1Villeneuve d’Ascq cedexFrance

Personalised recommendations