[Paper Review] Breaking a Barrier in Constructing Compact Indexes for Parameterized Pattern Matching
This paper presents the first online, compact-index construction for parameterized pattern matching with O(n lg σp lg n / lg lg n) time complexity, eliminating the prior O(σp) factor in construction time. It achieves this by efficiently supporting backward search during online construction using wavelet trees and dynamic data structures, making it the first such index that is both space-efficient and incrementally buildable from right to left.
A parameterized string (p-string) is a string over an alphabet (Σ_s ∪ Σ_p), where Σ_s and Σ_p are disjoint alphabets for static symbols (s-symbols) and for parameter symbols (p-symbols), respectively. Two p-strings x and y are said to parameterized match (p-match) if and only if x can be transformed into y by applying a bijection on Σ_p to every occurrence of p-symbols in x. The indexing problem for p-matching is to preprocess a p-string T of length n so that we can efficiently find the occurrences of substrings of T that p-match with a given pattern. Let σ_s and respectively σ_p be the numbers of distinct s-symbols and p-symbols that appear in T and σ = σ_s + σ_p. Extending the Burrows-Wheeler Transform (BWT) based index for exact string pattern matching, Ganguly et al. [SODA 2017] proposed parameterized BWTs (pBWTs) to design the first compact index for p-matching, and posed an open problem on how to construct the pBWT-based index in compact space, i.e., in O(n lg |Σ_s ∪ Σ_p|) bits of space. Hashimoto et al. [SPIRE 2022] showed how to construct the pBWT for T, under the assumption that Σ_s ∪ Σ_p = [0..O(σ)], in O(n lg σ) bits of space and O(n (σ_p lg n)/(lg lg n)) time in an online manner while reading the symbols of T from right to left. In this paper, we refine Hashimoto et al.’s algorithm to work in O(n lg σ) bits of space and O(n (lg σ_p lg n)/(lg lg n)) time in a more general assumption that Σ_s ∪ Σ_p = [0..n^{O(1)}]. Our result has an immediate application to constructing parameterized suffix arrays in O(n (lg σ_p lg n)/(lg lg n)) time and O(n lg σ) bits of working space. We also show that our data structure can support backward search, a core procedure of BWT-based indexes, at any stage of the online construction, making it the first compact index for p-matching that can be constructed in compact space and even in an online manner.
Motivation & Objective
- To address the open problem of constructing compact parameterized BWT (pBWT) indexes in O(n lg |Σs ∪ Σp|) bits of space.
- To eliminate the multiplicative O(σp) factor in construction time, which has persisted for over a decade in related data structures like parameterized suffix arrays.
- To support backward search during online construction, enabling efficient counting and locating queries at any stage of the process.
- To design a data structure that is both space-efficient and incrementally constructible from right to left, overcoming limitations of prior work.
Proposed method
- Leverages wavelet trees over the pBWT to support efficient 2D range counting and rank/select queries.
- Uses dynamic integer strings and bit vectors to maintain sampled positions for LF/FL-mapping in O(lg n / lg lg n) time.
- Introduces a novel method to compute cw-intervals in O(lg σp lg n / lg lg n) time using LCP∞T and LF-mapping via the inverse of the Burrows-Wheeler transform.
- Employs a right-to-left online construction strategy, maintaining data structures for LT, FT, and LCP∞T incrementally.
- Applies a sampling technique based on distance to the right end of the text to support fast R−1T(i) access in O(lg²n / (lg σ lg lg n)) time.
- Uses dynamic data structures from Lemma 2 to maintain LT and VT with O(n lg σ) bits and O(lg n) query time.
Experimental results
Research questions
- RQ1Can the construction time of compact pBWT indexes be improved by removing the O(σp) factor in the time complexity?
- RQ2Is it possible to support backward search during online construction of a compact pBWT index?
- RQ3Can a fully online, space-efficient pBWT index be constructed with support for both counting and locating queries?
- RQ4How can 2D range counting be efficiently supported in a dynamic, online setting for parameterized strings?
Key findings
- The paper achieves a construction time of O(n lg σp lg n / lg lg n), removing the O(σp) factor that has persisted for over a decade in related data structures.
- The proposed index supports backward search at any stage of online construction, enabling efficient counting and locating queries.
- The space usage is O(n lg σ) bits, matching the compact space bound of the pBWT, making it the first such index to achieve both compact space and online construction.
- Counting queries are answered in O(m lg σp lg n / lg lg n) time, and locating queries in O(m lg σp lg n / lg lg n + occ · lg²n / (lg σ lg lg n)) time, where m is the pattern length and occ is the number of reported occurrences.
- The data structure supports full backward search during construction by maintaining dynamic wavelet trees and sampled inverse suffix array values.
- The approach is the first to combine online construction, compact space, and full backward search support in a pBWT-based index for parameterized pattern matching.
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.