arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1606.02465cs.DS
收藏

合并后缀数组间隔对并行模式匹配的好处

On the Benefit of Merging Suffix Array Intervals for Parallel Pattern Matching

Johannes Fischer, Dominik Köppl, Florian Kurpicz

摘要:

我们提出了并行算法的精确和近似模式匹配与后缀数组,使用CREW-PRAM与$p$处理器。给定一个长度为$n$的静态文本,我们首先展示了如何在$p \le m$的$O(\frac{m}{p}+ \lg p + \lg\lg p\cdot\lg\lg n)$时间内计算给定长度为$m$的模式的后缀数组间隔。对于近似模式匹配与$k$差异或不匹配,我们展示了如何计算所有出现的给定模式在$O(\frac{m^kσ^k}{p}\max\left(k,\lg\lg n\right)\!+\!(1+\frac{m}{p}) \lg p\cdot \lg\lg n + \text{occ})$的时间,其中$σ$是字母表和$p \le σ^k m^k$的大小。算法的核心是一种快速合并后缀数组区间的数据结构:给定两种模式$P$和$P'$的后缀数组区间,我们提出了一种在$O(\lg\lg n)$顺序时间或$O(1+\lg_p\lg n)$并行时间计算$PP'$的区间的数据结构。我们所有的数据结构的大小都是$O(n)$位(除了后缀数组)。

英文摘要:

We present parallel algorithms for exact and approximate pattern matching with suffix arrays, using a CREW-PRAM with $p$ processors. Given a static text of length $n$, we first show how to compute the suffix array interval of a given pattern of length $m$ in $O(\frac{m}{p}+ \lg p + \lg\lg p\cdot\lg\lg n)$ time for $p \le m$. For approximate pattern matching with $k$ differences or mismatches, we show how to compute all occurrences of a given pattern in $O(\frac{m^kσ^k}{p}\max\left(k,\lg\lg n\right)\!+\!(1+\frac{m}{p}) \lg p\cdot \lg\lg n + \text{occ})$ time, where $σ$ is the size of the alphabet and $p \le σ^k m^k$. The workhorse of our algorithms is a data structure for merging suffix array intervals quickly: Given the suffix array intervals for two patterns $P$ and $P'$, we present a data structure for computing the interval of $PP'$ in $O(\lg\lg n)$ sequential time, or in $O(1+\lg_p\lg n)$ parallel time. All our data structures are of size $O(n)$ bits (in addition to the suffix array).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑