# ON DIGITAL SEARCH TREES - A Simple Method for Constructing Balanced Binary Trees

### Franjo Plavec, Zvonko G. Vranesic, Stephen D. Brown

#### 2007

#### Abstract

This paper presents digital search trees, a binary tree data structure that can produce well-balanced trees in the majority of cases. Digital search tree algorithms are reviewed, and a novel algorithm for building sorted trees is introduced. It was found that digital search trees are simple to implement because their code is similar to the code for ordinary binary search trees. Experimental evaluation was performed and the results are presented. It was found that digital search trees, in addition to being conceptually simpler, often outperform other popular balanced trees such as AVL or red-black trees. It was found that good performance of digital search trees is due to better exploitation of cache locality in modern computers.

#### References

- Andersson, A. (1993). Balanced search trees made simple. In WADS, 3rd Workshop on Algorithms and Data Structures, pages 60-71. Springer Verlag.
- Cormen, T. H. (1998). Introduction to Algorithms. MIT Press, Cambridge, Mass, 2nd edition.
- E. Coffman, J. E. (1970). File structures using hashing functions. Communications of the ACM, 13(7).
- F. Flajolet, R. S. (1986). Digital search trees revisited. SIAM Journal on Computing, 15(3).
- Knuth, D. E. (1997). The Art of Computer Programming, volume 3. Addison-Wesley, Reading, Mass., 2nd edition.
- Nebel, M. E. (1996). Digital search trees with keys of variable length. Informatique Theorique et Applications, 30(6):507-520.
- Oksanen, K. (1995). Memory reference locality in binary search trees. Master's thesis, Helsinki University of Technology.
- Pfaff, B. (2006). Gnu libavl. http://adtinfo.org.
- Project Gutenberg (2007). berg Webster's unabridged http://www.gutenberg.org/etext/673.
- Sedgewick, R. (1990). Algorithms in C. Addison-Wesley, Reading, Mass.; Toronto.

#### Paper Citation

#### in Harvard Style

Plavec F., G. Vranesic Z. and D. Brown S. (2007). **ON DIGITAL SEARCH TREES - A Simple Method for Constructing Balanced Binary Trees** . In *Proceedings of the Second International Conference on Software and Data Technologies - Volume 1: ICSOFT,* ISBN 978-989-8111-05-0, pages 61-68. DOI: 10.5220/0001336100610068

#### in Bibtex Style

@conference{icsoft07,

author={Franjo Plavec and Zvonko G. Vranesic and Stephen D. Brown},

title={ON DIGITAL SEARCH TREES - A Simple Method for Constructing Balanced Binary Trees},

booktitle={Proceedings of the Second International Conference on Software and Data Technologies - Volume 1: ICSOFT,},

year={2007},

pages={61-68},

publisher={SciTePress},

organization={INSTICC},

doi={10.5220/0001336100610068},

isbn={978-989-8111-05-0},

}

#### in EndNote Style

TY - CONF

JO - Proceedings of the Second International Conference on Software and Data Technologies - Volume 1: ICSOFT,

TI - ON DIGITAL SEARCH TREES - A Simple Method for Constructing Balanced Binary Trees

SN - 978-989-8111-05-0

AU - Plavec F.

AU - G. Vranesic Z.

AU - D. Brown S.

PY - 2007

SP - 61

EP - 68

DO - 10.5220/0001336100610068