arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.01412cs.DS
收藏

再探滑动后缀树

Sliding suffix trees revisited

Kyushu University(九州大学);Institute of Science Tokyo(东京科学大学);University of Electro-Communications(电气通信大学)

Laurentius Leonard, Shunsuke Inenaga, Hideo Bannai, Takuya Mieno

AI总结:

研究滑动后缀树从一个窗口更新到下一个窗口时边标签维护问题,提出新算法能在\(O(1)\)最坏情况时间内完成此任务,改进现有算法,关键数据结构是叶指针的非平凡扩展。

摘要:

滑动后缀树(Fiala & Greene,1989)是为大小为d的滑动窗口\(W_i = T[i..i + d - 1]\)维护的后缀树,该窗口在长度为n的输入文本T上从左到右移动,\(i\)递增。已知滑动后缀树可在\(O(n \log \sigma)\)时间和\(O(d)\)空间内维护。从\(W_i\)更新到\(W_{i + 1}\)需三项主要任务:删除代表最长后缀\(W_i\)的叶;插入代表\(W_{i + 1}\)中仅出现一次的后缀的新叶;在任务(1)的叶删除和任务(2)的叶插入后,将每条边的标签\(\langle \ell, r \rangle\)维护为新窗口\(W_{i + 1}\)中的有效对。本文提出首个算法,能在每次节点删除/插入的最坏情况时间\(O(1)\)内执行任务(3),改进了现有算法。关键数据结构是叶指针的非平凡扩展。

英文摘要:

The sliding suffix tree (Fiala \& Greene, 1989) is a suffix tree that is maintained for a sliding window $W_i = T[i..i+d-1]$ of size $d$ that shifts over an input text $T$ of length $n$ from left to right, for increasing $i = 1, \ldots, n-d+1$. It is known that the sliding suffix tree can be maintained in $O(n \log σ)$ time with $O(d)$ space, where $σ$ is the alphabet size. Updating the sliding suffix tree from $W_i = T[i..i+d-1]$ to $W_{i+1} = T[i+1..i+d]$ requires the following three major tasks: (1) Delete the leaf that represents the longest suffix $W_i$, (2) Insert new leaves that represent the suffixes of $W_{i+1}$ that appear exactly once in $W_{i+1}$, and (3) After the leaf deletion due to Task (1) and each leaf insertion due to Task (2), maintain the label $\langle \ell, r \rangle$ of every edge as a valid pair in the new window $W_{i+1}$, such that $i+1 \leq \ell \leq r \leq i+d$. In this paper, we present the first algorithm that performs Task (3) in $O(1)$ 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 $O(1)$ 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑