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

带一个缺口的字典匹配

Dictionary Matching with One Gap

Amihood Amir, Avivit Levy, Ely Porat, B. Riva Shalom

摘要:

带间隙的字典匹配问题是对字母表$Σ$上的$d$间隙模式$P_1,\ldots,P_d$的字典$D$进行预处理,其中每个间隙模式$P_i$是由有界无关序列分隔的子模式序列.然后,给定长度为$n$除以字母表$Σ$的查询文本$T$,目标是输出$T$中模式$P_i\in D$、$1\leq i\leq d$结束的所有位置。目前,人们对源于网络安全的间隙匹配问题重新产生了兴趣。在本文中,我们解决的问题,在字典中的所有模式有一个缺口,至少$α$和最多$β$不关心,其中$α$和$β$给定的参数。具体来说,我们证明了具有单个间隙问题的字典匹配可以在$O(d\log d + |D|)$时间和$O(d\log^{\varepsilon} d + |D|)$空间以及查询时间$O(n(β-α)\log\log d \log ^2 \min \{ d, \log |D| \} + occ)$中解决,其中$occ$是找到的模式的数量,或者预处理时间和空间:$O(d^2 + |D|)$,和查询时间$O(n(β-α) + occ)$,其中$occ$是找到的模式的数量。据我们所知,这是针对该问题设置的最佳解决方案,其中在字典中可能存在许多重叠。

英文摘要:

The dictionary matching with gaps problem is to preprocess a dictionary $D$ of $d$ gapped patterns $P_1,\ldots,P_d$ over alphabet $Σ$, where each gapped pattern $P_i$ is a sequence of subpatterns separated by bounded sequences of don't cares. Then, given a query text $T$ of length $n$ over alphabet $Σ$, the goal is to output all locations in $T$ in which a pattern $P_i\in D$, $1\leq i\leq d$, ends. There is a renewed current interest in the gapped matching problem stemming from cyber security. In this paper we solve the problem where all patterns in the dictionary have one gap with at least $α$ and at most $β$ don't cares, where $α$ and $β$ are given parameters. Specifically, we show that the dictionary matching with a single gap problem can be solved in either $O(d\log d + |D|)$ time and $O(d\log^{\varepsilon} d + |D|)$ space, and query time $O(n(β-α)\log\log d \log ^2 \min \{ d, \log |D| \} + occ)$, where $occ$ is the number of patterns found, or preprocessing time and space: $O(d^2 + |D|)$, and query time $O(n(β-α) + occ)$, where $occ$ is the number of patterns found. As far as we know, this is the best solution for this setting of the problem, where many overlaps may exist in the dictionary.

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

↑