Skip to main content

Suffix trees on words

  • Conference paper
  • First Online:
Combinatorial Pattern Matching (CPM 1996)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1075))

Included in the following conference series:

Abstract

We discuss an intrinsic generalization of the suffix tree, designed to index a string of length n which has a natural partitioning into m multi-character substrings or words. This word suffix tree represents only the m suffixes that start at word boundaries. These boundaries are determined by delimiters, whose definition depends on the application. Since traditional suffix tree construction algorithms rely heavily on the fact that all suffixes are inserted, construction of a word suffix tree is nontrivial, in particular when only O(m) construction space is allowed. We solve this problem, presenting an algorithm with O(n) expected running time. In general, construction cost is Ω(n) due to the need of scanning the entire input. In applications that require strict node ordering, an additional cost of sorting O(m′) characters arises, where m′ is the number of distinct words. In either case, this is a significant improvement over previous solutions.

Furthermore, when the alphabet is small, we may assume that the n characters in the input string occupy o(n) machine words. We illustrate that this can allow a word suffix tree to be built in sublinear time.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Andersson and S. Nilsson. Improved behaviour of tries by adaptive branching. Inf. Process. Lett., 46:295–300, 1993.

    Article  Google Scholar 

  2. A. Andersson and S. Nilsson. Faster searching in tries and quadtrees—an analysis of level compression. In Proc. 2nd Annual European Symposium on Algorithms, pages 82–93. Springer Verlag, 1994.

    Google Scholar 

  3. A. Andersson and S. Nilsson. Efficient implementation of suffix trees. Software-Practice and Experience, 25(2):129–141, 1995.

    Google Scholar 

  4. A. Apostolico. The myriad virtues of subword trees. In A. Apostolico and Z. Galil, editors, Combinatorial Algorithms on Words, NATO ISI Series, pages 85–96. Springer-Verlag, 1985.

    Google Scholar 

  5. R. Baeza-Yates and G. H. Gonnet. Efficient text searching of regular expressions. In Proceedings of the 16th International Colloquium on Automata, Languages and Programming (ICALP'89), volume 372 of Lecture Notes in Computer Science, pages 46–62. Springer-Verlag, 1989.

    Google Scholar 

  6. M. Dietzfelbinger, A. Karlin, K. Mehlhorn, F. Meyer auf der Heide, H. Rohnert, and R. E. Tarjan. Dynamic perfect hashing: Upper and lower bounds. SIAM Journal on Computing, 23:738–761, 1994.

    Google Scholar 

  7. M. L. Fredman and D. E. Willard. Surpassing the information theoretic bound with fusion trees. Journal of Computer and System Sciences, 47:424–436, 1993.

    Google Scholar 

  8. R. Giegerich and S. Kurtz. Suffix trees in the functional programming paradigm. In European Symposium on Programming (ESOP'94), volume 788 of Lecture Notes in Computer Science, pages 225–240. Springer-Verlag, 1994.

    Google Scholar 

  9. G. H. Gonnet and R. Baeza-Yates. Handbook of Algorithms and Data Structures. Addison-Wesley, 1991. ISBN 0-201-41607-7.

    Google Scholar 

  10. D. Harel and R. E. Tarjan. Fast algorithms for finding nearest common ancestors. SIAM Journal of Computing, 13:338–355, 1984.

    Google Scholar 

  11. U. Manber and G. Myers. Suffix arrays: a new method for on-line string searches. SIAM J. Comput., 22(5):935–948, Oct. 1993.

    Article  Google Scholar 

  12. E. M. McCreight. A space-economical suffix tree construction algorithm. Journal of the ACM, 23:262–272, 1976.

    Article  Google Scholar 

  13. E. Ukkonen. On-line construction of suffix trees. Algorithmica, 14(3):249–260, Sept. 1995.

    Google Scholar 

  14. P. Weiner. Linear pattern matching algorithms. In Proceedings 14th IEEE Symposium on Foundations of Computer Science (FOCS), pages 1–11, 1973.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Dan Hirschberg Gene Myers

Rights and permissions

Reprints and permissions

Copyright information

© 1996 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Andersson, A., Larsson, N.J., Swanson, K. (1996). Suffix trees on words. In: Hirschberg, D., Myers, G. (eds) Combinatorial Pattern Matching. CPM 1996. Lecture Notes in Computer Science, vol 1075. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61258-0_9

Download citation

  • DOI: https://doi.org/10.1007/3-540-61258-0_9

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-61258-2

  • Online ISBN: 978-3-540-68390-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics