Faster fully compressed pattern matching by recompression
Author:
Preprint
Abstract
In this paper, a fully compressed pattern matching problem is studied. The compression is represented by straight-line programs (SLPs), i.e. a context-free grammars generating exactly one string; the term fully means that both the pattern and the text are given in the compressed form. A novel algorithmic technique of dealing with SLPs is introduced and applied: the SLPs are recompressed, so that substrings of the pattern and text are encoded in both SLPs in the same way. To this end, the SLPs are locally decompressed and then recompressed in a uniform way. This technique yields an O((n+m) log M log(n+m)) algorithm for compressed pattern matching, where n (m) is the size of the compressed representation of the text (pattern, respectively), while M is the size of the decompressed pattern. Since M <= 2^m, this greatly improves the previously best O(m^2n) algorithm. Since LZ compression standard reduces to SLP with log(N / n) overhead and in O(n log(N/n)) time, the presented algorithm can be straightforwardly applied also to the fully LZ-compressed pattern matching problem, yielding an O(s log s log M) running time algorithm, where s = n log(N/n) + m log(M/m). To author's best knowledge there are no fully compressed pattern matching algorithms for LZ other than adaptations of FCPM for SLP.Keywords
All Related Versions
This publication has 13 references indexed in Scilit:
- Simple and efficient LZW-compressed multiple pattern matchingJournal of Discrete Algorithms, 2014
- Optimal pattern matching in LZW compressed strings2011
- Compressed Membership in Automata with Compressed Labels2011
- Processing Compressed Texts: A Tractability Border2007
- Querying and Embedding Compressed Texts2006
- Application of Lempel–Ziv factorization to the approximation of grammar-based compressionTheoretical Computer Science, 2003
- Fully compressed pattern matching algorithm for balanced straight-line programs2002
- Efficient algorithms for Lempel-Ziv encoding1996
- Pattern-matching for strings with short descriptionsLecture Notes in Computer Science, 1995
- Testing equivalence of morphisms on context-free languages1994