A Data Structure for Nearest Common Ancestors with Linking

preprint2016arXivOpen access

Abstract

Consider a forest that evolves via linklink operations that make the root of one tree the child of a node in another tree. Intermixed with linklink operations are ncanca operations, which return the nearest common ancestor of two given nodes when such exists. This paper shows that a sequence of mm such ncanca and linklink operations on a forest of nn nodes can be processed on-line in time O(mα(m,n)+n)O(mα(m,n)+n). This was previously known only for a restricted type of linklink operation. The special case where a linklink 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 O(n(m+nlog⁡n))O(n(m + n\log n)) for weighted matching, an arguably optimum asymptotic bound (nn and mm are the number of vertices and edges, respectively).

Explore this paper’s authors, topics and related work.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Reviews 0

Write a reviewWrite

No reviews yet.

Discussion 0

Add a commentWrite

No comments yet.