Skip to main content
QUICK REVIEW

[论文解读] Parameterized DAWGs: efficient constructions and bidirectional pattern searches

Katsuhito Nakashima, Noriki Fujisato|arXiv (Cornell University)|Feb 17, 2020
Network Packet Processing and Optimization被引用 2
一句话总结

本文提出了参数化有向无环词图(PDAWGs),一种用于参数化模式匹配的线性空间索引结构。它提出了一种从左到右在线构建PDAWGs的O(n|Π| log(|Π| + |Σ|))时间、O(n)空间算法,并表明PDAWGs可在仅O(n)空间下实现O(m log(|Π| + |Σ|) + occ)时间的双向参数化模式匹配,使其成为首个支持双向p-匹配的线性空间索引结构。

ABSTRACT

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$.

研究动机与目标

  • 为解决参数化模式匹配中缺乏高效线性空间索引结构的问题。
  • 设计DAWGs的参数化版本(PDAWGs),在保持线性空间的同时支持高效模式匹配。
  • 建立PDAWGs与参数化后缀树之间的对偶性,从而支持在线与离线构建算法。
  • 在仅使用线性空间和接近最优时间复杂度的前提下,支持双向模式匹配。

提出的方法

  • 提出PDAWGs作为标准DAWGs的参数化变体,其中等价类由参数化后缀等价性定义。
  • 在参数化后缀树上引入参数化Weiner链接,以建立与PDAWGs之间的对偶性。
  • 设计一种使用后缀链接和边更新的从左到右在线算法来构建PDAWG,时间复杂度为O(n|Π| log(|Π| + |Σ|)),空间复杂度为O(n)。
  • 利用PDAWGs与参数化后缀树之间的对偶性,推导出参数化后缀树的从右到左在线构建方法。
  • 利用原字符串的PDAWG和其反转字符串的参数化后缀树,支持双向模式匹配。
  • 应用对数时间复杂度的数据结构进行边和后缀链接的查找,以在指针机模型中保持效率。

实验结果

研究问题

  • RQ1能否在保持线性空间的同时构建DAWGs的参数化版本,以支持高效模式匹配?
  • RQ2PDAWGs与参数化后缀树之间是否存在类似于标准DAWGs与后缀树之间的对偶性?
  • RQ3能否在仅使用线性空间和接近最优时间复杂度的前提下支持双向参数化模式匹配?
  • RQ4在线PDAWG构建的时间复杂度O(n|Π| log(|Π| + |Σ|))是否紧致,或可进一步优化?
  • RQ5能否通过预计算反转字符串的参数化后缀树来加速离线PDAWG构建?

主要发现

  • 对于长度为n的参数化字符串,PDAWGs的节点和边数为O(n),而参数化后缀自动机在最坏情况下可能达到Θ(n²)规模。
  • 通过从左到右处理字符串,一种在线算法可在O(n|Π| log(|Π| + |Σ|))时间与O(n)空间内构建PDAWGs。
  • PDAWGs与参数化后缀树之间的对偶性使得参数化后缀树的从右到左在线构建在O(n|Π| log(|Π| + |Σ|))时间与O(n)空间内完成。
  • 若已知反转字符串的参数化后缀树,则可在O(n)时间与O(n)空间内离线构建PDAWG。
  • 双向参数化模式匹配可在O(m log(|Π| + |Σ|) + occ)时间内完成,且仅使用O(n)空间,其中m为模式长度,occ为匹配次数。
  • 所提出的PDAWG是首个支持高效双向参数化模式匹配的线性空间索引结构。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。