Compact q-Gram Profiling of Compressed Strings

Compact q-Gram Profiling of Compressed Strings
复制标题

压缩字符串的紧凑 q-Gram 分析

DOI:
10.1007/978-3-642-38905-4_8
复制
发表时间:
2013
期刊:
ArXiv
影响因子:
--
通讯作者:
Inge Li Gørtz
Inge Li Gørtz
中科院分区:
--
文献类型:
--
作者:
Philip Bille;Patrick Hagge Cording;Inge Li Gørtz

文献摘要

被引文献

相似文献

我们考虑的问题,计算的q-gram配置文件的大小为N的字符串T压缩的上下文无关的文法与n个生产规则。我们提出了一个算法,该算法在O(N− α)的期望时间内运行,并使用O(n+ q+ k T,q)空间,其中N− α≤ q n是该算法解压缩的字符的确切数量,k T,q≤ N− α是T中不同q-文法的数量。这同时匹配当前最佳已知时间界限并改进最佳已知空间界限。我们的空间界是渐近最优的,在这个意义上,任何算法存储的语法和q-gram配置文件必须使用Ω(n+ q+ k T,q)空间。为了实现这一点,我们引入了q-gram图,它可以有效地捕获字符串的q-gram结构,并展示了如何从语法中构建它。
We consider the problem of computing the q-gram profile of a string T of size N compressed by a context-free grammar with n production rules. We present an algorithm that runs in O (N− α) expected time and uses O (n+ q+ k T, q) space, where N− α≤ q n is the exact number of characters decompressed by the algorithm and k T, q≤ N− α is the number of distinct q-grams in T. This simultaneously matches the current best known time bound and improves the best known space bound. Our space bound is asymptotically optimal in the sense that any algorithm storing the grammar and the q-gram profile must use Ω (n+ q+ k T, q) space. To achieve this we introduce the q-gram graph that space-efficiently captures the structure of a string with respect to its q-grams, and show how to construct it from a grammar.