Skip to main content
Log in

Suffix Trees on Words

  • Published:
Algorithmica Aims and scope Submit manuscript

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 multicharacter 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 previously known 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 article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Author information

Authors and Affiliations

Authors

Additional information

Received September 2, 1997; revised December 10, 1997.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Andersson, A., Larsson, N. & Swanson, K. Suffix Trees on Words. Algorithmica 23, 246–260 (1999). https://doi.org/10.1007/PL00009260

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/PL00009260

Navigation