O(1) Reversible Tree Navigation Without Cycles
Programming Languages
2007-05-23 v1
Abstract
Imperative programmers often use cyclically linked trees in order to achieve O(1) navigation time to neighbours. Some logic programmers believe that cyclic terms are necessary to achieve the same in logic-based languages. An old but little-known technique provides O(1) time and space navigation without cyclic links, in the form of reversible predicates. A small modification provides O(1) amortised time and space editing.
Cite
@article{arxiv.cs/0406014,
title = {O(1) Reversible Tree Navigation Without Cycles},
author = {Richard A. O'Keefe},
journal= {arXiv preprint arXiv:cs/0406014},
year = {2007}
}
Comments
Appeared in Theory and Practice of Logic Programming, vol. 1, no. 5, 2001