全部 标题 作者
关键词 摘要

OALib Journal期刊
ISSN: 2333-9721
费用:99美元

查看量下载量

相关文章

更多...

Compact q-gram Profiling of Compressed Strings

Full-Text   Cite this paper   Add to My Lib

Abstract:

We consider the problem of computing the q-gram profile of a string \str of size $N$ compressed by a context-free grammar with $n$ production rules. We present an algorithm that runs in $O(N-\alpha)$ expected time and uses $O(n+q+\kq)$ space, where $N-\alpha\leq qn$ is the exact number of characters decompressed by the algorithm and $\kq\leq N-\alpha$ is the number of distinct q-grams in $\str$. 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 $\Omega(n+q+\kq)$ 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.

Full-Text

Contact Us

service@oalib.com

QQ:3279437679

WhatsApp +8615387084133