Lowest Common Ancestor with Linking
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 such that , but not necessarily , is a tree root. The effect of a command is to combine the trees containing and by making the parent of .
Parameters
- : number of vertices
- : number of total number of operations (queries, links, and cuts)
Filters
Computational Model
Randomization
Approximation
Algorithms Table
Displaying 2 of 2 algorithms
| See more | ||||
|---|---|---|---|---|
| Sleator and Tarjan [Linking] | 1983 | O(n+m*log(n)) | O(n) | |
| Aho, Hopcroft, and Ullman [Linking] | 1976 | O((m+n)*log(n)) | O(n*log(n)) |
Reductions Table
Insuffient Data to display table
Other relevant algorithms
Insuffient Data to display table