Lowest Common Ancestor with Static Trees: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
== Parameters == | == Parameters == | ||
n: number of vertices | $n$: number of vertices | ||
m: number of total number of operations (queries, links, and cuts) | $m$: number of total number of operations (queries, links, and cuts) | ||
== Table of Algorithms == | == Table of Algorithms == | ||
Line 25: | Line 25: | ||
|- | |- | ||
| [[Schieber; Vishkin (Lowest Common Ancestor with Static Trees Lowest Common Ancestor)|Schieber; Vishkin]] || 1988 || $O(n+m)$ || $O(n)$ || Exact || Deterministic || [https://epubs-siam-org.ezproxy.canberra.edu.au/doi/abs/10.1137/0217079?journalCode=smjcat Time | | [[Schieber; Vishkin (Lowest Common Ancestor with Static Trees Lowest Common Ancestor)|Schieber; Vishkin]] || 1988 || $O(n+m)$ || $O(n)$ || Exact || Deterministic || [https://epubs-siam-org.ezproxy.canberra.edu.au/doi/abs/10.1137/0217079?journalCode=smjcat Time & Space] | ||
|- | |- | ||
| [[Berkman; Vishkin (Lowest Common Ancestor with Static Trees Lowest Common Ancestor)|Berkman; Vishkin]] || 1993 || $O(n+m)$ ? || $O(n)$ || Exact || Deterministic || [https://apps.dtic.mil/dtic/tr/fulltext/u2/a227803.pdf Time] | | [[Berkman; Vishkin (Lowest Common Ancestor with Static Trees Lowest Common Ancestor)|Berkman; Vishkin]] || 1993 || $O(n+m)$ ? || $O(n)$ || Exact || Deterministic || [https://apps.dtic.mil/dtic/tr/fulltext/u2/a227803.pdf Time] | ||
Line 50: | Line 50: | ||
[[File:Lowest Common Ancestor - Lowest Common Ancestor with Static Trees - Time.png|1000px]] | [[File:Lowest Common Ancestor - Lowest Common Ancestor with Static Trees - Time.png|1000px]] | ||
Latest revision as of 09:08, 28 April 2023
Description
Given a collection of rooted trees, answer queries of the form, "What is the nearest common ancestor of vertices $x$ and $y$?" In this version of the problem, the collection of trees is static but the queries are given on-line. That is, each query must be answered before the next one is known.
Related Problems
Generalizations: Lowest Common Ancestor
Related: Off-Line Lowest Common Ancestor, Lowest Common Ancestor with Linking Roots, Lowest Common Ancestor with Linking, Lowest Common Ancestors with Linking and Cutting
Parameters
$n$: number of vertices
$m$: number of total number of operations (queries, links, and cuts)
Table of Algorithms
Name | Year | Time | Space | Approximation Factor | Model | Reference |
---|---|---|---|---|---|---|
Schieber; Vishkin | 1988 | $O(n+m)$ | $O(n)$ | Exact | Deterministic | Time & Space |
Berkman; Vishkin | 1993 | $O(n+m)$ ? | $O(n)$ | Exact | Deterministic | Time |
[[Bender; Colton (LCA <=> RMQ) (Lowest Common Ancestor with Static Trees Lowest Common Ancestor)|Bender; Colton (LCA <=> RMQ)]] | 2000 | $O(n+m)$ | $O(n)$ | Exact | Deterministic | Time |
Stephen Alstrup, Cyril Gavoille, Haim Kaplan & Theis Rauhe | 2004 | $O(n+m)$ | $O(n)$ | Exact | Deterministic | Time |
Aho, Hopcroft, and Ullman (Static Trees) | 1976 | $O((m+n)$*log(log(n))) | $O(n*log(log(n)$)) | Exact | Deterministic | Time & Space |
Modified van Leeuwen (Static Trees) | 1976 | $O(n+m*log(log(n)$)) | $O(n)$ | Exact | Deterministic | Space |
Harel, Tarjan (Static Trees) | 1984 | $O(n+m)$ | $O(n)$ | Exact | Deterministic | Time & Space |
Schieber; Vishkin (Parallel) | 1988 | $O(m+log(n)$) | $O(n)$ total (auxiliary?) | Exact | Parallel | Time & Space |
Fischer, Heun | 2006 | $O(m+n)$ | $O(n)$ | Exact | Parallel | Time & Space |
Kmett | 2015 | $O(m*log(h)$) | Exact | Parallel | Time |
Time Complexity Graph
Error creating thumbnail: Unable to save thumbnail to destination