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

压缩Tries:一种快速有效的在线字符串处理数据结构

Packed Compact Tries: A Fast and Efficient Data Structure for Online String Processing

Takuya Takagi, Shunsuke Inenaga, Kunihiko Sadakane, Hiroki Arimura

摘要:

在本文中,我们提出了一种新的数据结构称为压缩trie(压缩c-trie)存储一组$S$的$k$字符串的总长度$n$在$n \logσ+ O(k \log n)$位的空间,并支持快速模式匹配查询和更新,其中$σ$是一个字母表的大小。假设$α= \log_σn$字母被打包在标准字RAM模型上的单个机器字中,并且让$f(k,n)$表示我们选择的动态前导/后继数据结构的查询和更新时间,该动态前导/后继数据结构将来自全域$[1,n]$的$k$整数存储在空间的$O(k \log n)$位中。然后,给定一个长度为$m$的字符串,我们的压缩c-tries支持模式匹配查询和插入/删除操作在$O(\frac{m}α f(k,n))$最坏情况下的时间和在$O(\frac{m}α + f(k,n))$预期的时间。我们的实验表明,我们的压缩c-tries比标准的紧凑tries(a.k.a. Patricia Trees)在真实数据集上。作为一个应用程序,我们的包装c-trie树,我们表明,稀疏后缀树的长度$n$前缀码与$k$采样位置,如均匀间隔和字定界的稀疏后缀树,可以在线构建在$O((\frac{n}α + k) f(k,n))$最坏情况下的时间和$O(\frac{n}α + k f(k,n))$预期的时间与$n \log σ+ O(k \log n)$位的空间。当$k = O(\frac{n}α)$时,通过使用最先进的动态前趋/后继数据结构,我们在两种情况下仅使用$O(\frac{n}α)$位空间来获得次线性时间构造算法。我们还讨论了应用我们的包装c-tries在线LZD分解。

英文摘要:

In this paper, we present a new data structure called the packed compact trie (packed c-trie) which stores a set $S$ of $k$ strings of total length $n$ in $n \logσ+ O(k \log n)$ bits of space and supports fast pattern matching queries and updates, where $σ$ is the size of an alphabet. Assume that $α= \log_σn$ letters are packed in a single machine word on the standard word RAM model, and let $f(k,n)$ denote the query and update times of the dynamic predecessor/successor data structure of our choice which stores $k$ integers from universe $[1,n]$ in $O(k \log n)$ bits of space. Then, given a string of length $m$, our packed c-tries support pattern matching queries and insert/delete operations in $O(\frac{m}α f(k,n))$ worst-case time and in $O(\frac{m}α + f(k,n))$ expected time. Our experiments show that our packed c-tries are faster than the standard compact tries (a.k.a. Patricia trees) on real data sets. As an application of our packed c-trie, we show that the sparse suffix tree for a string of length $n$ over prefix codes with $k$ sampled positions, such as evenly-spaced and word delimited sparse suffix trees, can be constructed online in $O((\frac{n}α + k) f(k,n))$ worst-case time and $O(\frac{n}α + k f(k,n))$ expected time with $n \log σ+ O(k \log n)$ bits of space. When $k = O(\frac{n}α)$, by using the state-of-the-art dynamic predecessor/successor data structures, we obtain sub-linear time construction algorithms using only $O(\frac{n}α)$ bits of space in both cases. We also discuss an application of our packed c-tries to online LZD factorization.

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

↑