Fingerprints in Compressed Strings
Abstract
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 of size compressed by a context-free grammar of size that answers fingerprint queries. That is, given indices and , the answer to a query is the fingerprint of the substring . We present the first O(n) space data structures that answer fingerprint queries without decompressing any characters. For Straight Line Programs (SLP) we get query time, and for Linear SLPs (an SLP derivative that captures LZ78 compression and its variations) we get 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 and for SLPs and Linear SLPs, respectively. Here, denotes the length of the LCE.
Keywords
Cite
@article{arxiv.1305.2777,
title = {Fingerprints in Compressed Strings},
author = {Philip Bille and Patrick Hagge Cording and Inge Li Gørtz and Benjamin Sach and Hjalte Wedel Vildhøj and Søren Vind},
journal= {arXiv preprint arXiv:1305.2777},
year = {2013}
}
Comments
An extended abstract of this paper will appear at WADS 2013