Suffix Trays and Suffix Trists: Structures for Faster Text Indexing

Research output: Contribution to journalArticlepeer-review

14 Scopus citations

Abstract

Suffix trees and suffix arrays are two of the most widely used data structures for text indexing. Each uses linear space and can be constructed in linear time for polynomially sized alphabets. However, when it comes to answering queries with worst-case deterministic time bounds, the prior does so in O(mlog|Σ|) time, where m is the query size, |Σ| is the alphabet size, and the latter does so in O(m+logn) time, where n is the text size. If one wants to output all appearances of the query, an additive cost of O(occ) time is sufficient, where occ is the size of the output. Notice that it is possible to obtain a worst case, deterministic query time of O(m) but at the cost of super-linear construction time or space usage.

We propose a novel way of combining the two into, what we call, a suffix tray. The space and construction time remain linear and the query time improves to O(m+log|Σ|) for integer alphabets from a linear range, i.e. Σ⊂{1,…,cn}, for an arbitrary constant c. The construction and query are deterministic. Here also an additive O(occ) time is sufficient if one desires to output all appearances of the query.

We also consider the online version of indexing, where the text arrives online, one character at a time, and indexing queries are answered in tandem. In this variant we create a cross between a suffix tree and a suffix list (a dynamic variant of suffix array) to be called a suffix trist; it supports queries in O(m+log|Σ|) time. The suffix trist also uses linear space. Furthermore, if there exists an online construction for a linear-space suffix tree such that the cost of adding a character is worst-case deterministic f(n,|Σ|) (n is the size of the current text), then one can further update the suffix trist in O(f(n,|Σ|)+log|Σ|) time. The best currently known worst-case deterministic bound for f(n,|Σ|) is O(logn) time.

Original languageEnglish
Pages (from-to)450-466
Number of pages17
JournalAlgorithmica
Volume72
Issue number2
DOIs
StatePublished - 1 Jun 2015

Bibliographical note

Publisher Copyright:
© 2014, Springer Science+Business Media New York.

Funding

Cole’s work was supported in part by NSF grant CCF-1217989. Lewenstein’s research was supported by a BSF grant (#2010437) and a GIF grant (#1147/2011).

FundersFunder number
Bloom's Syndrome Foundation
German-Israeli Foundation for Scientific Research and Development
National Science Foundation
National Science FoundationCCF-1217989
Directorate for Computer and Information Science and Engineering1217989
United States-Israel Binational Science Foundation2010437, 1147/2011

    Keywords

    • Data structures
    • Indexing
    • Pattern matching

    Fingerprint

    Dive into the research topics of 'Suffix Trays and Suffix Trists: Structures for Faster Text Indexing'. Together they form a unique fingerprint.

    Cite this