O(1) reversible tree navigation without cycles

  • Authors:
  • Richard A. O'Keefe

  • Affiliations:
  • Department of Computer Science, The University of Otago, P.O. Box 56, Dunedin, 9001, New Zealand (e-mail: ok@cs.otago.ac.nz)

  • Venue:
  • Theory and Practice of Logic Programming
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

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.