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

压缩字符串中的指纹

Fingerprints in Compressed Strings

Philip Bille, Patrick Hagge Cording, Inge Li Gørtz, Benjamin Sach, Hjalte Wedel Vildhøj, Søren Vind

摘要:

字符串的Karp-Rabin指纹是一种哈希值,由于其强大的属性,已被用于许多字符串算法。在本文中,我们将展示如何构建一个数据结构的字符串$S$的大小$N$压缩的上下文无关的语法大小$n$,回答指纹查询。也就是说,给定索引$i$和$j$,查询的答案是子字符串$S[i,j]$的指纹。我们提出了第一个O(n)空间的数据结构,回答指纹查询,而不解压缩任何字符。对于直线程序(SLP),我们得到$O(\log N)$查询时间,对于线性SLP(捕获LZ 78压缩及其变体的SLP衍生物),我们得到$O(\log \log N)$查询时间。因此,我们的数据结构具有相同的时间和空间的复杂性,在SLP中的随机访问。我们利用指纹数据结构,以解决最长的共同扩展问题在查询时间$O(\log N \log \lce)$和$O(\log \lce \log\log \lce + \log\log N)$的SLP和线性SLP,分别。这里,$\lce$表示LCE的长度。

英文摘要:

The Karp-Rabin fingerprint of a string is a type of hash value that due to its strong properties has been used in many string algorithms. In this paper we show how to construct a data structure for a string $S$ of size $N$ compressed by a context-free grammar of size $n$ that answers fingerprint queries. That is, given indices $i$ and $j$, the answer to a query is the fingerprint of the substring $S[i,j]$. We present the first O(n) space data structures that answer fingerprint queries without decompressing any characters. For Straight Line Programs (SLP) we get $O(\log N)$ query time, and for Linear SLPs (an SLP derivative that captures LZ78 compression and its variations) we get $O(\log \log N)$ query time. Hence, our data structures has the same time and space complexity as for random access in SLPs. We utilize the fingerprint data structures to solve the longest common extension problem in query time $O(\log N \log \lce)$ and $O(\log \lce \log\log \lce + \log\log N)$ for SLPs and Linear SLPs, respectively. Here, $\lce$ denotes the length of the LCE.

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

↑