[Paper Review] Faster Approximate Pattern Matching in Compressed Repetitive Texts
This paper introduces the block graph, a compressed data structure for highly repetitive texts that enables faster approximate pattern matching compared to prior methods. By leveraging the LZ77 parse structure and optimizing substring access through block-based indexing, the block graph reduces approximate matching time to O(z·min(mk, k⁴ + m) + occ), achieving superior performance while maintaining space efficiency.
Motivated by the imminent growth of massive, highly redundant genomic databases, we study the problem of compressing a string database while simultaneously supporting fast random access, substring extraction and pattern matching to the underlying string(s). Bille et al. (2011) recently showed how, given a straight-line program with $r$ rules for a string $s$ of length $n$, we can build an $\Oh{r}$-word data structure that allows us to extract any substring of length $m$ in $\Oh{\log n + m}$ time. They also showed how, given a pattern $p$ of length $m$ and an edit distance (k \leq m), their data structure supports finding all \occ approximate matches to $p$ in $s$ in $\Oh{r (\min (m k, k^4 + m) + \log n) + \occ}$ time. Rytter (2003) and Charikar et al. (2005) showed that $r$ is always at least the number $z$ of phrases in the LZ77 parse of $s$, and gave algorithms for building straight-line programs with $\Oh{z \log n}$ rules. In this paper we give a simple $\Oh{z \log n}$-word data structure that takes the same time for substring extraction but only $\Oh{z \min (m k, k^4 + m) + \occ}$ time for approximate pattern matching.
Motivation & Objective
- Address the challenge of efficiently storing and querying massive, highly repetitive genomic and web text databases.
- Improve upon existing compressed data structures that support approximate pattern matching in compressed texts.
- Reduce the time complexity of approximate pattern matching in compressed repetitive strings without sacrificing space efficiency.
- Design a practical data structure that supports fast random access and substring extraction in compressed form.
Proposed method
- Construct a block graph data structure based on the LZ77 parse of the input string, using blocks of fixed size to represent substrings.
- Use a hierarchical block structure with parent-child relationships to enable efficient navigation and access to substrings.
- Store leaf nodes as pointers to internal nodes at the next higher level, with offsets and positions encoded in compressed arrays.
- Optimize access by precomputing rank and select operations on bitmaps to quickly locate child nodes and their offsets.
- Leverage the known phrase boundaries in the LZ77 parse to avoid full random access, reducing the cost of approximate matching.
- Apply block-level truncation to limit depth and reduce space usage while preserving fast access to internal nodes.
Experimental results
Research questions
- RQ1Can we design a compressed data structure that supports faster approximate pattern matching in highly repetitive texts than existing SLP-based methods?
- RQ2How can we exploit the structure of the LZ77 parse to reduce the time complexity of approximate matching without increasing space?
- RQ3Is it possible to achieve faster substring extraction and pattern matching by avoiding full random access to the entire SLP?
- RQ4Can a block-based indexing structure outperform existing compressed indexes in both space and time efficiency for repetitive strings?
Key findings
- The block graph achieves O(z·min(mk, k⁴ + m) + occ) time for approximate pattern matching, improving upon the O(r·(min(mk, k⁴ + m) + log n) + occ) bound of Bille et al. (2011), where r is the number of SLP rules.
- The block graph uses O(z log n) words of space, matching the space complexity of Rytter’s SLP construction, but with significantly faster query performance.
- Experiments on the Pizza-Chili Repetitive Corpus show that block graphs achieve compression comparable to LZ-End while supporting significantly faster substring extraction.
- The block graph outperforms general-purpose compressors like gzip and 7zip in both compression and random access speed, especially on highly repetitive texts.
- The data structure supports substring extraction in O(log n + m) time, matching the performance of prior SLP-based structures but with improved query efficiency for approximate matching.
- The block graph is practical and efficient in real-world workloads, demonstrating competitive performance on real genomic and web data.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.