Skewed binary search trees

被引:0
|
作者
Brodal, Gerth Stolting [1 ]
Moruz, Gabriel [1 ]
机构
[1] Aarhus Univ, Dept Comp Sci, BRICS, IT Parken, DK-8200 Aarhus N, Denmark
来源
关键词
D O I
暂无
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
It is well-known that to minimize the number of comparisons a binary search tree should be perfectly balanced. Previous work has shown that a dominating factor over the running time for a search is the number of cache faults performed, and that an appropriate memory layout of a binary search tree can reduce the number of cache faults by several hundred percent. Motivated by the fact that during a search branching to the left or right at a node does not necessarily have the same cost, e.g. because of branch prediction schemes, we in this paper study the class of skewed binary search trees. For all nodes in a skewed binary search tree the ratio between the size of the left subtree and the size of the tree is a fixed constant (a ratio of 1/2 gives perfect balanced trees). In this paper we present an experimental study of various memory layouts of static skewed binary search trees, where each element in the tree is accessed with a uniform probability. Our results show that for many of the memory layouts we consider skewed binary search trees can perform better than perfect balanced search trees. The improvements in the running time are on the order of 15%.
引用
收藏
页码:708 / 719
页数:12
相关论文
共 50 条
  • [1] BINARY SEARCH TREES
    GARSIA, AM
    NOTICES OF THE AMERICAN MATHEMATICAL SOCIETY, 1976, 23 (02): : A317 - A317
  • [2] Optimal binary search trees
    Nagaraj, SV
    THEORETICAL COMPUTER SCIENCE, 1997, 188 (1-2) : 1 - 44
  • [3] Randomized binary search trees
    Martinez, C
    Roura, S
    JOURNAL OF THE ACM, 1998, 45 (02) : 288 - 323
  • [4] Reductions in binary search trees
    Sánchez-Couso, JR
    Fernández-Camacho, MI
    THEORETICAL COMPUTER SCIENCE, 2006, 355 (03) : 327 - 353
  • [5] The algebra of binary search trees
    Hivert, F
    Novelli, JC
    Thibon, JY
    THEORETICAL COMPUTER SCIENCE, 2005, 339 (01) : 129 - 165
  • [6] The Geometry of Binary Search Trees
    Demaine, Erik D.
    Harmon, Dion
    Iacono, John
    Kane, Daniel
    Patrascu, Mihai
    PROCEEDINGS OF THE TWENTIETH ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS, 2009, : 496 - +
  • [7] ON BINARY SEARCH-TREES
    DEPRISCO, R
    DESANTIS, A
    INFORMATION PROCESSING LETTERS, 1993, 45 (05) : 249 - 253
  • [8] ON THE SILHOUETTE OF BINARY SEARCH TREES
    Gruebel, Rudolf
    ANNALS OF APPLIED PROBABILITY, 2009, 19 (05): : 1781 - 1802
  • [9] The profile of binary search trees
    Chauvin, B
    Drmota, M
    Jabbour-Hattab, J
    ANNALS OF APPLIED PROBABILITY, 2001, 11 (04): : 1042 - 1062
  • [10] Combining Binary Search Trees
    Demaine, Erik D.
    Iacono, John
    Langerman, Stefan
    Oezkan, Oezguer
    AUTOMATA, LANGUAGES, AND PROGRAMMING, PT I, 2013, 7965 : 388 - 399