Amortization, lazy evaluation, and persistence: lists with catenation via lazy linking

Amortization has been underutilized in the design of persistent data structures, largely because traditional accounting schemes break down in a persistent setting. Such schemes depend on saving "credits" for future use, but a persistent data structure may have multiple "futures", each competing for the same credits. We describe how lazy evaluation can often remedy this problem, yielding persistent data structures with good amortized efficiency. In fact, such data structures can be implemented purely functionally in any functional language supporting lazy evaluation. As can example of this technique, we present a purely functional (and therefore persistent) implementation of lists that simultaneously support catenation and all other usual list primitives in constant amortized time. This data structure is much simpler than the only existing data structure with comparable bounds, the recently discovered catenable lists of Kaplan and Tarjan, which support all operations in constant worst-case time.

[1]  Lambert Meertens,et al.  Algorithmics : towards programming as a mathematical activity , 1986 .

[2]  Rajeev Raman,et al.  Eliminating Amortization: On Data Structures with Guaranteed Response Time , 1993 .

[3]  Robin Milner,et al.  Definition of standard ML , 1990 .

[4]  Richard S. Bird,et al.  An introduction to the theory of lists , 1987 .

[5]  N. S. Barnett,et al.  Private communication , 1969 .

[6]  Robert E. Tarjan,et al.  Self-Adjusting Heaps , 1986, SIAM J. Comput..

[7]  Haim Kaplan,et al.  Persistent lists with catenation via recursive slow-down , 1995, STOC '95.

[8]  Robert HOOD,et al.  Real-Time Queue Operation in Pure LISP , 1980, Inf. Process. Lett..

[9]  Jeffrey D. Ullman,et al.  Set Merging Algorithms , 1973, SIAM J. Comput..

[10]  Robert E. Tarjan,et al.  A Tight Amortized Bound for Path Reversal , 1989, Inf. Process. Lett..

[11]  Matthias Felleisen,et al.  Abstract continuations: a mathematical semantics for handling full jumps , 1988, LISP and Functional Programming.

[12]  Robert E. Tarjan,et al.  Fully persistent lists with catenation , 1991, SODA '91.

[13]  D. Michie “Memo” Functions and Machine Learning , 1968, Nature.

[14]  Eugene W. Myers,et al.  Efficient applicative data types , 1984, POPL.

[15]  John Hughes,et al.  A Novel Representation of Lists and its Application to the Function "reverse" , 1986, Inf. Process. Lett..

[16]  Robert E. Tarjan,et al.  Making data structures persistent , 1986, STOC '86.

[17]  Jan van Leeuwen,et al.  Worst-case Analysis of Set Union Algorithms , 1984, JACM.

[18]  Robert E. Tarjan,et al.  Confluently persistent deques via data structuaral bootstrapping , 1993, SODA '93.

[19]  R. Tarjan Amortized Computational Complexity , 1985 .

[20]  Chris Okasaki,et al.  Simple and efficient purely functional queues and deques , 1995, Journal of Functional Programming.

[21]  Robert E. Tarjan,et al.  Fibonacci heaps and their uses in improved network optimization algorithms , 1984, JACM.