Randomized search trees

被引:147
作者
Seidel, R [1 ]
Aragon, CR [1 ]
机构
[1] UNIV SAARLAND, FACHBEREICH INFORMAT, D-66123 SAARBRUCKEN, GERMANY
关键词
search trees; dictionaries; randomized data structures;
D O I
10.1007/BF01940876
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present a randomized strategy for maintaining balance in dynamically changing search trees that has optimal expected behavior. In particular, in the expected cane a search or an update takes logarithmic time, with the update requiring fewer than two rotations. Moreover, the update time remains logarithmic, even if the cost of a rotation is taken to be proportional to the size of the rotated subtree. Finger searches and splits and joins can be performed in optimal expected time also. We show that these results continue to hold even if very little true randomness is available, i.e., if only a logarithmic number of truely random bits are available. Our approach generalizes naturally to weighted trees, where the expected time bounds for accesses and updates again match the worst-case time bounds of the best deterministic methods. We also discuss ways of implementing our randomized strategy so that no explicit balance information is maintained. Our balancing strategy and our algorithms are exceedingly simple and should be fast in practice.
引用
收藏
页码:464 / 497
页数:34
相关论文
共 30 条
  • [1] ADELSONVELSKII GM, 1962, SOV MATH DOKL, V3, P1259
  • [2] ANDERSSON A, 1991, PROCEEDINGS - 32ND ANNUAL SYMPOSIUM ON FOUNDATIONS OF COMPUTER SCIENCE, P642, DOI 10.1109/SFCS.1991.185430
  • [3] BAUMGARTEN H, 1992, PROCEEDINGS OF THE THIRD ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS, P250
  • [4] Bayer R., 1972, Acta Informatica, V1, P173, DOI 10.1007/BF00288683
  • [5] BIASED SEARCH-TREES
    BENT, SW
    SLEATOR, DD
    TARJAN, RE
    [J]. SIAM JOURNAL ON COMPUTING, 1985, 14 (03) : 545 - 568
  • [6] BENT SW, 1991, UNPUB RANDOMLY BALAN
  • [7] FAST MULTIPLE-PRECISION EVALUATION OF ELEMENTARY FUNCTIONS
    BRENT, RP
    [J]. JOURNAL OF THE ACM, 1976, 23 (02) : 242 - 251
  • [8] STORAGE SCHEME FOR HEIGHT-BALANCED TREES - ADDENDUM
    BROWN, MR
    [J]. INFORMATION PROCESSING LETTERS, 1979, 8 (03) : 154 - 156
  • [9] 4 RESULTS ON RANDOMIZED INCREMENTAL CONSTRUCTIONS
    CLARKSON, KL
    MEHLHORN, K
    SEIDEL, R
    [J]. COMPUTATIONAL GEOMETRY-THEORY AND APPLICATIONS, 1993, 3 (04): : 185 - 212
  • [10] A NOTE ON THE HEIGHT OF BINARY SEARCH-TREES
    DEVROYE, L
    [J]. JOURNAL OF THE ACM, 1986, 33 (03) : 489 - 498