# The lca package

This package provides a reference implementation of my skew binary random access algorithm for performing an *online* lowest common ancestor search (and online level ancestor search) in logarithmic time without preprocessing. This improves the previous known asymptotic bound for both of these problems from *O(h)* to *O(log h)*, where *h* is the height of the tree. Mostly importantly this bound is completely independent of the width or overall size of the tree, enabling you to calculate lowest common ancestors in a distributed fashion with good locality.

While *offline* algorithms exist for both of these algorithms that that provide *O(1)* query time, they all require at least *O(n)* preprocessing, where *n* is the size of the entire tree, and so are less suitable for LCA search in areas such as revision control where the tree is constantly updated, or distributed computing where the tree may be too large to fit in any one computer's memory.

Slides are available from

http://www.slideshare.net/ekmett/skewbinary-online-lowest-common-ancestor-search

## Properties

Versions | 0.1, 0.1.0.1, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4 |
---|---|

Dependencies | base (==4.*) |

License | BSD3 |

Copyright | Copyright (C) 2011-2012 Edward A. Kmett |

Author | Edward A. Kmett |

Maintainer | Edward A. Kmett <ekmett@gmail.com> |

Stability | provisional |

Category | Algorithms, Data Structures |

Home page | http://github.com/ekmett/lca/ |

Bug tracker | http://github.com/ekmett/lca/issues |

Source repository | head: git clone git://github.com/ekmett/lca.git |

Upload date | Fri Sep 6 21:17:55 UTC 2013 |

Uploaded by | EdwardKmett |

Downloads | 605 total (39 in last 30 days) |

## Modules

[Index]

## Downloads

- lca-0.2.4.tar.gz [browse] (Cabal source package)
- Package description (included in the package)

#### Maintainers' corner

For package maintainers and hackage trustees