Simple and efficient tree comparison
暂无分享,去创建一个
A new distance metric for rooted trees is presented which is based on
the largest common forest of two rooted trees. The new measure is
superior to previous measures based on tree edit distance, because no
particular tree edit operations together with their costs or weights
need to be defined. The
metric can be computed in expected time linear in the number of nodes,
on rooted trees of unbounded degree, either unordered or ordered,
labeled or unlabeled. An algorithm for computing the metric is given
which is based on a simple and efficient bottom-up algorithm for finding
all common rooted subtrees in a forest.