[Paper Review] Parameterized DAWGs: efficient constructions and bidirectional pattern searches
This paper introduces Parameterized Directed Acyclic Word Graphs (PDAWGs), a linear-space indexing structure for parameterized pattern matching. It presents an O(n|Π| log(|Π| + |Σ|))-time, O(n)-space online algorithm to construct PDAWGs from left to right, and shows that PDAWGs enable bidirectional parameterized pattern matching in O(m log(|Π| + |Σ|) + occ) time using only O(n) space, making it the first such linear-space index for bidirectional p-matching.
Two strings $x$ and $y$ over $\Sigma \cup \Pi$ of equal length are said to \emph{parameterized match} (\emph{p-match}) if there is a renaming bijection $f:\Sigma \cup \Pi ightarrow \Sigma \cup \Pi$ that is identity on $\Sigma$ and transforms $x$ to $y$ (or vice versa). The \emph{p-matching} problem is to look for substrings in a text that p-match a given pattern. In this paper, we propose \emph{parameterized suffix automata} (\emph{p-suffix automata}) and \emph{parameterized directed acyclic word graphs} (\emph{PDAWGs}) which are the p-matching versions of suffix automata and DAWGs. While suffix automata and DAWGs are equivalent for standard strings, we show that p-suffix automata can have $\Theta(n^2)$ nodes and edges but PDAWGs have only $O(n)$ nodes and edges, where $n$ is the length of an input string. We also give an $O(n |\Pi| \log (|\Pi| + |\Sigma|))$-time $O(n)$-space algorithm that builds the PDAWG in a left-to-right online manner. As a byproduct, it is shown that the \emph{parameterized suffix tree} for the reversed string can also be built in the same time and space, in a right-to-left online manner. This duality also leads us to two further efficient algorithms for p-matching: Given the parameterized suffix tree for the reversal of the input string $T$, one can build the PDAWG of $T$ in $O(n)$ time in an offline manner; One can perform \emph{bidirectional} p-matching in $O(m \log (|\Pi|+|\Sigma|) + \mathit{occ})$ time using $O(n)$ space, where $m$ denotes the pattern length and $\mathit{occ}$ is the number of pattern occurrences in the text $T$.
Motivation & Objective
- To address the lack of efficient, linear-space indexing structures for parameterized pattern matching.
- To design a parameterized version of DAWGs (PDAWGs) that maintains linear space while supporting efficient pattern matching.
- To establish a duality between PDAWGs and parameterized suffix trees, enabling online and offline construction algorithms.
- To support bidirectional pattern matching in linear space and near-optimal time complexity.
Proposed method
- Propose PDAWGs as the parameterized variant of standard DAWGs, where equivalence classes are defined by parameterized suffix equivalence.
- Introduce parameterized Weiner links on parameterized suffix trees to establish duality with PDAWGs.
- Design a left-to-right online algorithm for PDAWG construction using suffix links and edge updates, with time complexity O(n|Π| log(|Π| + |Σ|)) and O(n) space.
- Leverage the duality between PDAWGs and parameterized suffix trees to derive a right-to-left online construction of the parameterized suffix tree.
- Use the PDAWG and the parameterized suffix tree of the reversed string to support bidirectional pattern matching.
- Apply logarithmic-time data structures for edge and suffix link lookups to maintain efficiency in pointer machine model.
Experimental results
Research questions
- RQ1Can a parameterized version of DAWGs be constructed in linear space while supporting efficient pattern matching?
- RQ2Is there a duality between PDAWGs and parameterized suffix trees similar to that between standard DAWGs and suffix trees?
- RQ3Can bidirectional parameterized pattern matching be supported within linear space and near-optimal time?
- RQ4Is the time complexity O(n|Π| log(|Π| + |Σ|)) for online PDAWG construction tight or improvable?
- RQ5Can offline PDAWG construction be accelerated using a precomputed parameterized suffix tree of the reversed string?
Key findings
- PDAWGs for a parameterized string of length n have O(n) nodes and edges, unlike parameterized suffix automata, which can have Θ(n²) size in the worst case.
- An online algorithm constructs PDAWGs in O(n|Π| log(|Π| + |Σ|)) time and O(n) space by processing the string from left to right.
- The duality between PDAWGs and parameterized suffix trees enables a right-to-left online construction of the parameterized suffix tree in O(n|Π| log(|Π| + |Σ|)) time and O(n) space.
- Given the parameterized suffix tree of the reversed string, the PDAWG can be constructed offline in O(n) time with O(n) space.
- Bidirectional parameterized pattern matching is supported in O(m log(|Π| + |Σ|) + occ) time using only O(n) space, where m is the pattern length and occ is the number of occurrences.
- The proposed PDAWG is the first linear-space index that supports bidirectional parameterized pattern matching efficiently.
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.