Dynamic Suffix Array with Polylogarithmic Queries and Updates

by   Dominik Kempa, et al.

The suffix array SA[1..n] of a text T of length n is a permutation of {1,…,n} describing the lexicographical ordering of suffixes of T, and it is considered to be among of the most important data structures in string algorithms, with dozens of applications in data compression, bioinformatics, and information retrieval. One of the biggest drawbacks of the suffix array is that it is very difficult to maintain under text updates: even a single character substitution can completely change the contents of the suffix array. Thus, the suffix array of a dynamic text is modelled using suffix array queries, which return the value SA[i] given any i∈[1..n]. Prior to this work, the fastest dynamic suffix array implementations were by Amir and Boneh. At ISAAC 2020, they showed how to answer suffix array queries in Õ(k) time, where k∈[1..n] is a trade-off parameter, with Õ(n/k)-time text updates. In a very recent preprint [2021], they also provided a solution with O(log^5 n)-time queries and Õ(n^2/3)-time updates. We propose the first data structure that supports both suffix array queries and text updates in O( polylog n) time (achieving O(log^4 n) and O(log^3+o(1) n) time, respectively). Our data structure is deterministic and the running times for all operations are worst-case. In addition to the standard single-character edits (character insertions, deletions, and substitutions), we support (also in O(log^3+o(1) n) time) the "cut-paste" operation that moves any (arbitrarily long) substring of T to any place in T. We complement our structure by a hardness result: unless the Online Matrix-Vector Multiplication (OMv) Conjecture fails, no data structure with O( polylog n)-time suffix array queries can support the "copy-paste" operation in O(n^1-ϵ) time for any ϵ>0.


Dynamic Suffix Array with Sub-linear update time and Poly-logarithmic Lookup Time

The Suffix Array SA_S[1… n] of an n-length string S is a lexicographical...

Space-efficient data structure for next/previous larger/smaller value queries

Given an array of size n from a total order, we consider the problem of ...

Chronofold: a data structure for versioned text

Collaborative text editing and versioning is known to be a tough topic. ...

Optimal Algorithm for Profiling Dynamic Arrays with Finite Values

How can one quickly answer the most and top popular objects at any time,...

Breaking the O(n)-Barrier in the Construction of Compressed Suffix Arrays

The suffix array, describing the lexicographic order of suffixes of a gi...

Conditional Lower Bounds for Variants of Dynamic LIS

In this note, we consider the complexity of maintaining the longest incr...

Algorithms and Hardness for Multidimensional Range Updates and Queries

Traditional orthogonal range problems allow queries over a static set of...

Please sign up or login with your details

Forgot password? Click here to reset