Compact q-gram Profiling of Compressed Strings
Data Structures and Algorithms
2014-06-09 v2
Abstract
We consider the problem of computing the q-gram profile of a string \str of size compressed by a context-free grammar with production rules. We present an algorithm that runs in expected time and uses space, where is the exact number of characters decompressed by the algorithm and is the number of distinct q-grams in . 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 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.
Cite
@article{arxiv.1304.5373,
title = {Compact q-gram Profiling of Compressed Strings},
author = {Philip Bille and Patrick Hagge Cording and Inge Li Gørtz},
journal= {arXiv preprint arXiv:1304.5373},
year = {2014}
}