Sliding suffix trees (Fiala & Greene, 1989) for an input text $T$ over an alphabet of size $\sigma$ and a sliding window $W$ of $T$ can be maintained in $O(|T| \log \sigma)$ time and $O(|W|)$ space. The two previous approaches that achieve this can be categorized into the credit-based approach of Fiala and Greene (1989) and Larsson (1996, 1999), or the batch-based approach proposed by Senft (2005). Brodnik and Jekovec (2018) showed that the sliding suffix tree can be supplemented with leaf pointers in order to find all occurrences of an online query pattern in the current window, and that leaf pointers can be maintained by credit-based arguments as well. The main difficulty in the credit-based approach is in the maintenance of index-pairs that represent each edge. In this paper, we show that valid edge index-pairs can be derived in constant time from leaf pointers, thus reducing the maintenance of edge index-pairs to the maintenance of leaf pointers. We further propose a new simple method which maintains leaf pointers without using credit-based arguments. Our algorithm and proof of correctness are much simpler compared to the credit-based approach, whose analyses were initially flawed (Senft 2005).
翻译:滑动后缀树(Fiala & Greene, 1989)针对字母表大小为σ的输入文本T及其滑动窗口W,可在O(|T| log σ)时间和O(|W|)空间内维护。先前实现该目标的两种方法可归为两类:Fiala与Greene(1989)及Larsson(1996, 1999)提出的基于信用的方法,或Senft(2005)提出的基于批处理的方法。Brodnik与Jekovec(2018)指出,滑动后缀树可通过补充叶节点指针来查找当前窗口中在线查询模式的所有出现位置,且叶节点指针同样可通过基于信用的论证进行维护。基于信用方法的主要困难在于维护表示每条边的索引对。本文证明,有效的边索引对可在常数时间内从叶节点指针导出,从而将边索引对的维护简化为叶节点指针的维护。我们进一步提出一种新的简单方法,无需使用基于信用的论证即可维护叶节点指针。与最初分析存在缺陷的基于信用方法(Senft 2005)相比,我们的算法及正确性证明更为简洁。