Advertisement

International Symposium on String Processing and Information Retrieval

SPIRE 2015: String Processing and Information Retrieval pp 324-336 | Cite as

Improved Practical Compact Dynamic Tries

  • Andreas PoyiasEmail author
  • Rajeev Raman
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9309)

Abstract

We consider the problem of implementing a dynamic trie with an emphasis on good practical performance. For a trie with n nodes with an alphabet of size \(\sigma \), the information-theoretic lower bound is \(n \log \sigma + O(n)\) bits. The Bonsai data structure [1] supports trie operations in O(1) expected time (based on assumptions about the behaviour of hash functions). While its practical speed performance is excellent, its space usage of \((1+\epsilon ) n (\log \sigma + O(\log \log n))\) bits, where \(\epsilon \) is any constant \(> 0\), is not asymptotically optimal. We propose an alternative, m-Bonsai, that uses \((1 + \epsilon ) n (\log \sigma + O(1))\) bits in expectation, and supports operations in O(1) expected time (again based on assumptions about the behaviour of hash functions). We give a heuristic implementation of m-Bonsai which uses considerably less memory and is slightly faster than the original Bonsai.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Darragh, J.J., Cleary, J.G., Witten, I.H.: Bonsai: a compact representation of trees. Softw., Pract. Exper. 23(3), 277–291 (1993)CrossRefGoogle Scholar
  2. 2.
    Benoit, D., Demaine, E.D., Munro, J.I., Raman, R., Raman, V., Rao, S.S.: Representing trees of higher degree. Algorithmica 43(4), 275–292 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Bentley, J., Sedgewick, B.: Ternary search trees (1998). http://www.drdobbs.com/database/ternary-search-trees/184410528
  4. 4.
    Nilsson, S., Tikkanen, M.: An experimental study of compression methods for dynamic tries. Algorithmica 33(1), 19–33 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Jacobson, G.: Space-efficient static trees and graphs. In: Proc. 30th Annual Symposium on Foundations of Computer Science, pp. 549–554. IEEE Computer Society (1989)Google Scholar
  6. 6.
    Raman, R., Raman, V., Satti, S.R.: Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets. ACM Transactions on Algorithms 3(4) (2007)Google Scholar
  7. 7.
    Farzan, A., Munro, J.I.: A uniform paradigm to succinctly encode various families of trees. Algorithmica 68(1), 16–40 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Farzan, A., Raman, R., Rao, S.S.: Universal succinct representations of trees? In: Albers, S., Marchetti-Spaccamela, A., Matias, Y., Nikoletseas, S., Thomas, W. (eds.) ICALP 2009, Part I. LNCS, vol. 5555, pp. 451–462. Springer, Heidelberg (2009) CrossRefGoogle Scholar
  9. 9.
    Munro, J.I., Raman, V., Storm, A.J.: Representing dynamic binary trees succinctly. In: Kosaraju, S.R. (ed.) Proc. 12th Annual Symposium on Discrete Algorithms, pp. 529–536. ACM/SIAM (2001)Google Scholar
  10. 10.
    Raman, R., Rao, S.S.: Succinct dynamic dictionaries and trees. In: Baeten, J.C.M., Lenstra, J.K., Parrow, J., Woeginger, G.J. (eds.) ICALP 2003. LNCS, vol. 2719, pp. 357–368. Springer, Heidelberg (2003) CrossRefGoogle Scholar
  11. 11.
    Arroyuelo, D., Davoodi, P., Satti, S.: Succinct dynamic cardinal trees. Algorithmica, 1–36 (2015) (online first)Google Scholar
  12. 12.
    Jansson, J., Sadakane, K., Sung, W.: Linked dynamic tries with applications to lz-compression in sublinear time and space. Algorithmica 71(4), 969–988 (2015)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Takagi, T., Uemura, T., Inenaga, S., Sadakane, K., Arimura, H.:Applications of succinct dynamic compact tries to some stringproblems (presented at WAAC 2013). http://www-ikn.ist.hokudai.ac.jp/~arim/papers/waac13takagi.pdf
  14. 14.
    Grossi, R., Ottaviano, G.: The wavelet trie: maintaining an indexed sequence of strings in compressed space. In: PODS, pp. 203–214 (2012)Google Scholar
  15. 15.
    Patrascu, M.: Succincter. In: 49th Annual IEEE Symp. Foundations of Computer Science, pp. 305–313. IEEE Computer Society (2008)Google Scholar
  16. 16.
    Knuth, D.E.: The Art of Computer Programming. Sorting and Searching, vol. 3, 2nd edn. Addison Wesley Longman (1998)Google Scholar
  17. 17.
    Carter, L., Wegman, M.N.: Universal classes of hash functions. J. Comput. Syst. Sci. 18(2), 143–154 (1979)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Fredman, M.L., Komlós, J., Szemerédi, E.: Storing a sparse table with 0(1) worst case access time. J. ACM 31(3), 538–544 (1984)CrossRefzbMATHGoogle Scholar
  19. 19.
    Pagh, R.: Low redundancy in static dictionaries with constant query time. SIAM J. Comput. 31(2), 353–363 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    Yoshinaga, N., Kitsuregawa, M.: A self-adaptive classifier for efficient text-stream processing. In: COLING 2014, 25th International Conference on Computational Linguistics, Proceedings of the Conference: Technical Papers, August 23–29, 2014, Dublin, Ireland, pp. 1091–1102 (2014)Google Scholar
  21. 21.
    Gog, S., Beller, T., Moffat, A., Petri, M.: From theory to practice: plug and play with succinct data structures. In: Gudmundsson, J., Katajainen, J. (eds.) SEA 2014. LNCS, vol. 8504, pp. 326–337. Springer, Heidelberg (2014) Google Scholar
  22. 22.
    Goethals, B.: Frequent itemset mining implementations repository. http://fimi.ua.ac.be/
  23. 23.
    Schlegel, B., Gemulla, R., Lehner, W.: Memory-efficient frequent-itemset mining. In: Proceedings of the 14th International Conference on Extending Database Technology, EDBT 2011, Uppsala, Sweden, March 21–24, 2011, pp. 461–472 (2011)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.University of LeicesterLeicesterUK

Personalised recommendations