Sliding suffix trees revisited
arXiv:2307.01412
The paper introduces a new algorithm that updates edge labels in sliding suffix trees in O(1) worst‑case time per node insertion or deletion, improving on previous amortized‑time methods.
Abstract
The sliding suffix tree (Fiala \& Greene, 1989) is a suffix tree that is maintained for a sliding window of size that shifts over an input text of length from left to right, for increasing . It is known that the sliding suffix tree can be maintained in time with space, where is the alphabet size. Updating the sliding suffix tree from to requires the following three major tasks: (1) Delete the leaf that represents the longest suffix , (2) Insert new leaves that represent the suffixes of that appear exactly once in , and (3) After the leaf deletion due to Task (1) and each leaf insertion due to Task (2), maintain the label of every edge as a valid pair in the new window , such that . In this paper, we present the first algorithm that performs Task (3) in worst-case time per node deletion/insertion, which leads to another alternative to efficient sliding suffix tree construction. This is an improvement over the existing algorithms by Larsson (1996, 1999) and by Senft (2005) both of which can only perform Task (3) in amortized time. Our key data structure is a non-trivial extension of leaf pointers, which were originally proposed by Brodnik and Jekovec (2018) for pattern matching with sliding suffix trees.
Accepted for PSC 2026