Vertical and Horizontal Distances to Approximate Edit Distance for Rooted Labeled Caterpillars
Kohei Muraka, Takuya Yoshino, Kouichi Hirata · 2019
A rooted labeled caterpillar (caterpillar, for short) is a rooted labeled tree transformed to a rooted path (called a backbone) after removing all the leaves in it and we can compute the edit distance between caterpillars in quartic time. In this paper, we introduce two vertical distances and two horizontal distances for caterpillars. The former are based on a string edit distance between the string representations of the backbones and the latter on a multiset edit distance between the multisets of labels occurring in all the leaves. Then, we show that these distances give both lower bound and upper bound of the edit distance and we can compute the vertical distances in quadratic time and the horizontal distances in linear time under the unit cost function.