# Simple fast algorithms for the editing distance between trees and related problems

Kaizhong Zhang, Dennis Shasha

Research output: Contribution to journalArticle

### Abstract

Ordered labeled trees are trees in which the left-to-right order among siblings is significant. The distance between two ordered trees is considered to be the weighted number of edit operations (insert, delete, and modify) to transform one tree to another. The problem of approximate tree matching is also considered. Specifically, algorithms are designed to answer the following kinds of questions: (1) What is the distance between two trees? (2) What is the minimum distance between T1 and T2 when zero or more subtrees can be removed from T2? (3) Let the pruning of a tree at node n mean removing all the descendants of node n. The analogous question for prunings as for subtrees is answered. A dynamic programming algorithm is presented to solve the three questions.

Original language English (US) 1245-1262 18 SIAM Journal on Computing 18 6 Published - Dec 1989

### Fingerprint

Fast Algorithm
Ordered Trees
Dynamic programming
Pruning
Labeled Trees
Minimum Distance
Vertex of a graph
Dynamic Programming
Transform
Zero

### ASJC Scopus subject areas

• Computational Theory and Mathematics
• Applied Mathematics
• Theoretical Computer Science

### Cite this

In: SIAM Journal on Computing, Vol. 18, No. 6, 12.1989, p. 1245-1262.

Research output: Contribution to journalArticle

@article{4ed8550c8ce949faa4e56aa2b5214200,
title = "Simple fast algorithms for the editing distance between trees and related problems",
abstract = "Ordered labeled trees are trees in which the left-to-right order among siblings is significant. The distance between two ordered trees is considered to be the weighted number of edit operations (insert, delete, and modify) to transform one tree to another. The problem of approximate tree matching is also considered. Specifically, algorithms are designed to answer the following kinds of questions: (1) What is the distance between two trees? (2) What is the minimum distance between T1 and T2 when zero or more subtrees can be removed from T2? (3) Let the pruning of a tree at node n mean removing all the descendants of node n. The analogous question for prunings as for subtrees is answered. A dynamic programming algorithm is presented to solve the three questions.",
author = "Kaizhong Zhang and Dennis Shasha",
year = "1989",
month = "12",
language = "English (US)",
volume = "18",
pages = "1245--1262",
journal = "SIAM Journal on Computing",
issn = "0097-5397",
publisher = "Society for Industrial and Applied Mathematics Publications",
number = "6",

}

TY - JOUR

T1 - Simple fast algorithms for the editing distance between trees and related problems

AU - Zhang, Kaizhong

AU - Shasha, Dennis

PY - 1989/12

Y1 - 1989/12

N2 - Ordered labeled trees are trees in which the left-to-right order among siblings is significant. The distance between two ordered trees is considered to be the weighted number of edit operations (insert, delete, and modify) to transform one tree to another. The problem of approximate tree matching is also considered. Specifically, algorithms are designed to answer the following kinds of questions: (1) What is the distance between two trees? (2) What is the minimum distance between T1 and T2 when zero or more subtrees can be removed from T2? (3) Let the pruning of a tree at node n mean removing all the descendants of node n. The analogous question for prunings as for subtrees is answered. A dynamic programming algorithm is presented to solve the three questions.

AB - Ordered labeled trees are trees in which the left-to-right order among siblings is significant. The distance between two ordered trees is considered to be the weighted number of edit operations (insert, delete, and modify) to transform one tree to another. The problem of approximate tree matching is also considered. Specifically, algorithms are designed to answer the following kinds of questions: (1) What is the distance between two trees? (2) What is the minimum distance between T1 and T2 when zero or more subtrees can be removed from T2? (3) Let the pruning of a tree at node n mean removing all the descendants of node n. The analogous question for prunings as for subtrees is answered. A dynamic programming algorithm is presented to solve the three questions.

UR - http://www.scopus.com/inward/record.url?scp=0024889169&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=0024889169&partnerID=8YFLogxK

M3 - Article

AN - SCOPUS:0024889169

VL - 18

SP - 1245

EP - 1262

JO - SIAM Journal on Computing

JF - SIAM Journal on Computing

SN - 0097-5397

IS - 6

ER -