The lca package

[Tags: bsd3, library]

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


[Skip to ReadMe]

Properties

Versions0.1, 0.1.0.1, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.3
Change logCHANGELOG.md
Dependenciesbase (==4.*) [details]
LicenseBSD3
CopyrightCopyright (C) 2011-2015 Edward A. Kmett
AuthorEdward A. Kmett
MaintainerEdward A. Kmett <ekmett@gmail.com>
Stabilityprovisional
CategoryAlgorithms, Data Structures
Home pagehttp://github.com/ekmett/lca/
Bug trackerhttp://github.com/ekmett/lca/issues
Source repositoryhead: git clone git://github.com/ekmett/lca.git
UploadedSun Mar 8 10:04:00 UTC 2015 by EdwardKmett
DistributionsLTSHaskell:0.3, NixOS:0.3, Stackage:0.3
Downloads1314 total (51 in last 30 days)
Votes
1 []
StatusDocs available [build log]
Last success reported on 2015-03-08 [all 1 reports]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for lca-0.3

lca: O(log h) Online Lowest Common Ancestor Search

Build Status

This package provides a reference implementation of my skew binary random access algorithm for performing an online lowest common ancestor in logarithmic time without preprocessing. This improves the previous known asymptotic bound for this problem 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 algorithms exist that that provide O(1) query time, they all require 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 as Purely Functional Data Structures for On-Line LCA

Contact Information

Contributions and bug reports are welcome!

Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net.

-Edward Kmett