Catenable double-ended queues

被引:4
|
作者
Okasaki, C
机构
关键词
D O I
10.1145/258949.258956
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Catenable double-ended queues are double-ended queues (deques) that support catenation (i.e., append) efficiently without sacrificing the efficiency of other operations. We present a purely functional implementation of catenable deques for which every operation, including catenation, takes O(1) amortized time. Kaplan and Tajan have independently developed a much more complicated implementation of catenable deques that achieves similar worst-case bounds. The two designs are superficially similar, but differ in the underlying mechanism used to achieve efficiency in a persistent setting (i.e., when used in a non-single-threaded fashion). Their implementation uses a technique called recursive slowdown, while ours relies on the simpler mechanism of lazy evaluation. Besides lazy evaluation, our implementation also exemplifies the use of two additional language features: polymorphic recursion and views. Neither is indispensable, but both significantly simplify the presentation.
引用
收藏
页码:66 / 74
页数:9
相关论文
共 50 条
  • [1] Double-ended queues with impatience
    Conolly, BW
    Parthasarathy, PR
    Selvaraju, N
    COMPUTERS & OPERATIONS RESEARCH, 2002, 29 (14) : 2053 - 2072
  • [3] DATA-STRUCTURAL BOOTSTRAPPING, LINEAR PATH COMPRESSION, AND CATENABLE HEAP-ORDERED DOUBLE-ENDED QUEUES
    BUCHSBAUM, AL
    SUNDAR, R
    TARJAN, RE
    SIAM JOURNAL ON COMPUTING, 1995, 24 (06) : 1190 - 1206
  • [4] Diffusion approximations for double-ended queues with reneging in heavy traffic
    Liu, Xin
    QUEUEING SYSTEMS, 2019, 91 (1-2) : 49 - 87
  • [5] Diffusion approximations for double-ended queues with reneging in heavy traffic
    Xin Liu
    Queueing Systems, 2019, 91 : 49 - 87
  • [6] Obstruction-free synchronization: Double-ended queues as an example
    Herlihy, M
    Luchangco, V
    Moir, M
    23RD INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS, PROCEEDINGS, 2002, : 522 - 529
  • [7] Two new methods for constructing double-ended priority queues from priority queues
    Amr Elmasry
    Claus Jensen
    Jyrki Katajainen
    Computing, 2008, 83 : 193 - 204
  • [8] Two new methods for constructing double-ended priority queues from priority queues
    Elmasry, Amr
    Jensen, Claus
    Katajainen, Jyrki
    COMPUTING, 2008, 83 (04) : 293 - 304
  • [9] An efficient construction algorithm for a class of implicit double-ended priority queues
    Chen, JS
    COMPUTER JOURNAL, 1995, 38 (10): : 818 - 821
  • [10] Double-ended queues with non-Poisson inputs and their effective algorithms
    Liu, Heng-Li
    Li, Quan-Lin
    Chang, Yan-Xia
    Zhang, Chi
    COMPUTERS & OPERATIONS RESEARCH, 2022, 144