A Data Structure for Nearest Common Ancestors with Linking
Abstract
Consider a forest that evolves via operations that make the root of one tree the child of a node in another tree. Intermixed with operations are operations, which return the nearest common ancestor of two given nodes when such exists. This paper shows that a sequence of such and operations on a forest of nodes can be processed on-line in time . This was previously known only for a restricted type of operation. The special case where a only extends a tree by adding a new leaf occurs in Edmonds' algorithm for finding a maximum weight matching on a general graph. Incorporating our algorithm into the implementation of Edmonds' algorithm in \cite{G17} achieves time for weighted matching, an arguably optimum asymptotic bound ( and are the number of vertices and edges, respectively).
Keywords
Cite
@article{arxiv.1611.07055,
title = {A Data Structure for Nearest Common Ancestors with Linking},
author = {Harold N. Gabow},
journal= {arXiv preprint arXiv:1611.07055},
year = {2016}
}
Comments
A preliminary version of results in this paper appeared in Proc.1st Annual ACM-SIAM Symp. on Disc. Algorithms (SODA), 1990