“…The distance between T 1 and T 2 is then defined to be the cost of such a sequence. Many approaches generalizing string edit distance to trees have been proposed (Lu, 1979;Selkow, 1977;Tai, 1979;Tanaka & Tanaka, 1988) and the best known result for ordered trees is by Zhang and Shasha (1989). Given two ordered trees T 1 and T 2 , their algorithm finds an optimal edit script in time O(|T 1 | × |T 2 | × min{depth(T 1 ), leaves(T 1 )} × min{depth(T 2 ), leaves(T 2 )}), where |T| denotes the number of nodes in a tree T, depth(T) denotes the depth of a tree T, and leaves(T) denotes the number of leaves of a tree T. Edit distance for unordered trees has been investigated by Zhang, Statman, and Shasha (1992).…”