Presentation for Open Source Project: lcalibrary | |
Introduction
|
We achieve O(n) preprocessing by looking at the LCA as a Range minimum problem. The Euler tour is broken into small groups, and the minimum is found of each group. Rather then calculate n^2 possibilities, we calculate the lowest ancestor over ranges that group exponentially larger. To make a query, we require 3 lookups: startblock, middle range, and endblock.
|
Copyright 2003, Zack Ramjan