Comparing similar ordered trees in linear-time

  • Authors:
  • Hélène Touzet

  • Affiliations:
  • LIFL, UMR CNRS 8022, Université Lille 1, 59 655 Villeneuve d'Ascq cedex, France

  • Venue:
  • Journal of Discrete Algorithms
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

We describe a linear-time 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 that 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 based on the tree edit graph.