Off-Line Lowest Common Ancestor

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 and the entire sequence of queries is specified in advance.

Parameters

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

Filters

Computational Model

Randomization

Approximation

Algorithms Table

Displaying 2 of 2 algorithms

See more
Tarjan's off-line lowest common ancestors algorithm1984O(n+m)O(n+m)O(n)O(n)
Aho, Hopcroft, and Ullman [Offline]1976O(n+ m*alpha(m + n, n)) where alpha is the inverse Ackermann functionO(n)

Reductions Table

Insuffient Data to display table

Other relevant algorithms

Insuffient Data to display table