Fingerprints in Compressed Strings

  • Philip Bille
  • Patrick Hagge Cording
  • Inge Li Gørtz
  • Benjamin Sach
  • Hjalte Wedel Vildhøj
  • Søren Vind
Conference paper

DOI: 10.1007/978-3-642-40104-6_13

Part of the Lecture Notes in Computer Science book series (LNCS, volume 8037)
Cite this paper as:
Bille P., Cording P.H., Gørtz I.L., Sach B., Vildhøj H.W., Vind S. (2013) Fingerprints in Compressed Strings. In: Dehne F., Solis-Oba R., Sack JR. (eds) Algorithms and Data Structures. WADS 2013. Lecture Notes in Computer Science, vol 8037. Springer, Berlin, Heidelberg

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 S of size N compressed by a context-free grammar of size n that answers fingerprint queries. That is, given indices i and j, the answer to a query is the fingerprint of the substring S[i,j]. We present the first O(n) space data structures that answer fingerprint queries without decompressing any characters. For Straight Line Programs (SLP) we get O(logN) query time, and for Linear SLPs (an SLP derivative that captures LZ78 compression and its variations) we get O(loglogN) 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 O(logNlogℓ) and O(logℓloglogℓ + loglogN) for SLPs and Linear SLPs, respectively. Here, ℓ denotes the length of the LCE.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Philip Bille
    • 1
  • Patrick Hagge Cording
    • 1
  • Inge Li Gørtz
    • 1
  • Benjamin Sach
    • 2
  • Hjalte Wedel Vildhøj
    • 1
  • Søren Vind
    • 1
  1. 1.DTU ComputeTechnical University of DenmarkDenmark
  2. 2.Department of Computer ScienceUniversity of WarwickUK

Personalised recommendations