Lowest Common Ancestors with Linking and Cutting
Given a collection of rooted trees, answer queries of the form, "What is the nearest common ancestor of vertices and " In this version of the problem, the queries are on-line. Interspersed with the queries are on-line commands of two types: , where but not necessarily is a tree root, and , where is not a root. The effect of a command is to combine the trees containing and by making the parent of . The effect of a command is to cut the edge connecting and its parent, splitting the tree containing into two trees: one containing all descendants of and another containing all nondescendants of .
Parameters
- : number of vertices
- : number of total number of operations (queries, links, and cuts)
Insufficient data to display graph
Filters
Computational Model
Randomization
Approximation
Algorithms Table
Insuffient Data to display table
Reductions Table
Insuffient Data to display table
Other relevant algorithms
Insuffient Data to display table