The distance between two ordered labeled trees is considered to be the minimum sum of the weights associated with the edit operations (insertion, deletion, and substitution) required to transform one tree to another. The problem of computing this distance and the optimal transformation using no edit constraints has been studied in the literature [3,4,7-9, 111. In this paper, we consider the problem of transforming one tree T1 to another tree T2 using any arbitrary edit constraint involving the number and type of edit operations to be performed. An algorithm to compute this constrained distance is presented. If for a tree T, Span(T) is defined as the Min(Depth(T),Leaves(T)), the time and space complexities of this algorithm are:
['B. John Oommen', 'William Lee']
Constrained tree editing