Fast computation of distances in a tree
Calcul rapide de distances dans un arbre
Résumé
Computation of distances between two submits of a tree is an operation that occurs in some pattern recognition problem. When this operation has to be done thousands of times on millions of trees, the linear standard algorithms in OpN q for each pair may be a bottleneck to the global computation. This note present recursive spliting method with a complexity of OplogpN qq on each pair in worst case, and Op1q in average on all pair, once a pre-computation OpN logpN qq has been done on the whole tree. A commented C++ implementation is published as a companion to this note. 1
Origine | Fichiers produits par l'(les) auteur(s) |
---|
Loading...