The Tree-to-Tree Editing Problem
暂无分享,去创建一个
Many processes, including evolution, derivation of a sentence in a grammar, hierarchical clustering and game playing, may be represented as a labeled ordered tree. it is often desirable to compare two trees of the minimum number of operations required to convert one to the other. We present here an algorithm to compute such a minimum sequence of operations. A special case of this problem involves the comparison of two trees of depth two (each tree has a root and an ordered sequence of leaves which are the children of the root) in order to derive a minimum cost sequence of edit operations to transform one sequence of leaves to the other. Sankoff [2] and Wagner and Fisher [3] presented an algorithm to compute a minimum cost sequence of edit operations in O(mn) operations, where the trees have m and n leaves. Wong and Chandra [4] and Aho, Hirschberg and Ullman [I] have proved that foi a wide class of computation models, the Sankoff algorithm is optimal. We will show that a straightforward generalization of the Sankoff algorithm will provide a solution to the tree-to-tree editing problem. Since the time required by our algorithm is of the same order of magnitude as the time required by the Sankoff algorithm, it follows that our algorithm must be optimal over a wide class of computation models.
[1] Alfred V. Aho,et al. Bounds on the Complexity of the Longest Common Subsequence Problem , 1976, J. ACM.
[2] D Sankoff,et al. Matching sequences under deletion-insertion constraints. , 1972, Proceedings of the National Academy of Sciences of the United States of America.
[3] Chak-Kuen Wong,et al. Bounds for the String Editing Problem , 1976, JACM.
[4] Michael J. Fischer,et al. The String-to-String Correction Problem , 1974, JACM.