Skip to main content Link Search Menu Expand Document (external link)

Practical Wavelet Tree Construction

DOI pdf code


We present new sequential and parallel algorithms for wavelet tree construction based on a new bottom-up technique. This technique makes use of the structure of the wavelet trees—refining the characters represented in a node of the tree with increasing depth-in an opposite way, by first computing the leaves (most refined), and then propagating this information upwards to the root of the tree. We first describe new sequential algorithms, both in RAM and external memory. Based on these results, we adapt these algorithms to parallel computers, where we address both shared memory and distributed memory settings.

In practice, all our algorithms outperform previous ones in both time and memory efficiency, because we can compute all auxiliary information solely based on the information we obtained from computing the leaves. Most of our algorithms are also adapted to the wavelet matrix, a variant that is particularly suited for large alphabets.


  author    = {Patrick Dinklage and Jonas Ellert and Johannes Fischer and Florian Kurpicz and Marvin Löbel},
  title     = {Practical Wavelet Tree Construction},
  booktitle = {J. Exp. Algorithmics},
  pages     = {1.8:1–1.8:67},
  publisher = {SIAM},
  doi       = {10.1145/3457197},
  year      = {2021}