Towards real-time suffix tree construction

  • Authors:
  • Amihood Amir;Tsvi Kopelowitz;Moshe Lewenstein;Noa Lewenstein

  • Affiliations:
  • Department of Computer Science, Bar-Ilan University, Ramat-Gan, Israel;Department of Computer Science, Bar-Ilan University, Ramat-Gan, Israel;Department of Computer Science, Bar-Ilan University, Ramat-Gan, Israel;Department of Computer Science, Netanya College, Israel

  • Venue:
  • SPIRE'05 Proceedings of the 12th international conference on String Processing and Information Retrieval
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

The quest for a real-time suffix tree construction algorithm is over three decades old. To date there is no convincing understandable solution to this problem. This paper makes a step in this direction by constructing a suffix tree online in time O(log n) per every single input symbol. Clearly, it is impossible to achieve better than O(log n) time per symbol in the comparison model, therefore no true real time algorithm can exist for infinite alphabets. Nevertheless, the best that can be hoped for is that the construction time for every symbol does not exceed O(log n) (as opposed to an amortized O(log n) time per symbol, achieved by current known algorithms). To our knowledge, our algorithm is the first that spends in the worst caseO(log n) per every single input symbol. We also provide a simple algorithm that constructs online an indexing structure (the BIS) in time O(log n) per input symbol, where n is the number of text symbols input thus far. This structure and fast LCP (Longest Common Prefix) queries on it, provide the backbone for the suffix tree construction. Together, our two data structures provide a searching algorithm for a pattern of length m whose time is $O(min(m {\rm log} |{\it \Sigma}|,m + {\rm log} n) + tocc)$, where tocc is the number of occurrences of the pattern.