Compact q-gram Profiling of Compressed Strings
Philip Bille, Patrick Hagge Cording, Inge Li G{\o}rtz

TL;DR
This paper introduces a space-efficient algorithm for computing the q-gram profile of compressed strings using a novel q-gram graph, achieving optimal space and matching the best known time bounds.
Contribution
It presents a new algorithm that computes q-gram profiles of grammar-compressed strings with optimal space and expected time, improving previous space bounds.
Findings
Algorithm runs in expected O(N-α) time
Uses space O(n+q+κ_q), which is asymptotically optimal
Introduces the q-gram graph for efficient structure capturing
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · semigroups and automata theory · DNA and Biological Computing
