Faster Fully Compressed Pattern Matching by Recompression
Author:
Open Access
- 13 January 2015
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Algorithms
- Vol. 11 (3) , 1-43
Abstract
In this article, a fully compressed pattern matching problem is studied. The compression is represented by straight-line programs (SLPs)—that is, context-free grammars generating exactly one string; the term fully means that both the pattern and the text are given in the compressed form. The problem is approached using a recently developed technique of local recompression: the SLPs are refactored 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 ) algorithm for compressed pattern matching, assuming that M fits in O (1) machine words, where n ( m ) is the size of the compressed representation of the text (pattern, respectively), and M is the size of the decompressed pattern. If only m + n fits in O (1) machine words, the running time increases to O (( n + m ) log M log ( n + m )). The previous best algorithm due to Lifshits has O ( n 2 m ) running time.Keywords
All Related Versions
Funding Information
- National Science Centre (NCN) SONATA 1 (2011/01/D/ST6/07164, 2011--2015)
This publication has 11 references indexed in Scilit:
- Optimal Pattern Matching in LZW Compressed StringsACM Transactions on Algorithms, 2013
- One-Variable Word Equations in Linear Time2013
- Simple and Efficient LZW-Compressed Multiple Pattern Matching2012
- Grammar Precompression Speeds Up Burrows–Wheeler CompressionLecture Notes in Computer Science, 2012
- The Smallest Grammar ProblemIEEE Transactions on Information Theory, 2005
- A fully linear-time approximation algorithm for grammar-based compressionJournal of Discrete Algorithms, 2005
- Probability and Computing2005
- Application of Lempel–Ziv factorization to the approximation of grammar-based compressionTheoretical Computer Science, 2003
- Complexity of Language Recognition Problems for Compressed Words1999
- Maintaining dynamic sequences under equality tests in polylogarithmic timeAlgorithmica, 1997