Lowest Common Ancestor with Static Trees

Given a collection of rooted trees, answer queries of the form, "What is the nearest common ancestor of vertices xx and yy" 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.

Parameters

  • nn: number of vertices
  • mm: number of total number of operations (queries, links, and cuts)

Filters

Computational Model

Randomization

Approximation

Algorithms Table

Displaying 7 of 7 algorithms

See more
Stephen Alstrup, Cyril Gavoille, Haim Kaplan & Theis Rauhe 2004O(n+m)O(n+m)O(n)O(n)
Bender; Colton [LCA <=> RMQ]2000O(n+m)O(n+m)O(n)O(n)
Berkman; Vishkin1993O(n+m)O(n+m)O(n)O(n)
Schieber; Vishkin1988O(n+m)O(n+m)O(n)O(n)
Harel, Tarjan [Static Trees]1984O(n+m)O(n)
Aho, Hopcroft, and Ullman [Static Trees]1976O((m+n)*log(log(n)))O(n*log(log(n)))
Modified van Leeuwen [Static Trees]1976O(n+m*log(log(n)))O(n)

Reductions Table

Insuffient Data to display table

Other relevant algorithms

Displaying 1 of 1 other relevant algorithms