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

压缩多模式匹配

Compressed Multiple Pattern Matching

Dmitry Kosolobov, Nikita Sivukhin

摘要:

给定字母表$\{0,1,\ldots,σ{-}1\}$上的$d$字符串,经典的Aho--Corasick数据结构允许我们使用$O(m\log m)$空间位在$O(|T| + occ)$时间内找到任何文本$T$中字符串的所有$occ$出现,其中$m$是包含字符串的trie中的边数。固定任何常量$\varepsilon \in (0, 2)$。我们描述了一个压缩的解决方案的问题,提供$σ\le m^δ$为一个常数$δ< 1$,工作在$O(|T| \frac{1}{\varepsilon} \log\frac{1}{\varepsilon} + occ)$时间,这是$O(|T| + occ)$,因为$\varepsilon$是恒定的,并占用$mH_k + 1.443 m + \varepsilon m + O(d\log\frac{m}{d})$位的空间,同时为所有$0 \le k \le \max\{0,α\log_σm - 2\}$,其中$α\in (0,1)$是一个任意常数和$H_k$是$k$第七阶经验熵的trie。因此,我们减少$3.443m$长期在空间范围内以前最好的简洁的解决方案$(1.443 + \varepsilon)m$,从而解决了一个开放的问题所带来的Belazzougui。此外,我们注意到,$L = \log\binom{σ(m+1)}{m} - O(\log(σm))$是问题的任何解决方案的最坏情况的空间下界,并且对于$d = o(m)$和常数$\varepsilon$,我们的方法允许实现空间的$L + \varepsilon m$位,这给出了证据,对于$d = o(m)$,我们的数据结构的空间在理论上最优直到$\varepsilon m$加法项,并且几乎不可能消除项$1.443m$。此外,我们改进了以前的作品的空间分析,提出了一个更合适的定义$H_k$。我们还简化了实践的结构,采用固定块压缩增强技术,然后实现我们的数据结构,并进行了一些实验,表明它在时间上与最先进的技术相当,在空间上更优越。

英文摘要:

Given $d$ strings over the alphabet $\{0,1,\ldots,σ{-}1\}$, the classical Aho--Corasick data structure allows us to find all $occ$ occurrences of the strings in any text $T$ in $O(|T| + occ)$ time using $O(m\log m)$ bits of space, where $m$ is the number of edges in the trie containing the strings. Fix any constant $\varepsilon \in (0, 2)$. We describe a compressed solution for the problem that, provided $σ\le m^δ$ for a constant $δ< 1$, works in $O(|T| \frac{1}{\varepsilon} \log\frac{1}{\varepsilon} + occ)$ time, which is $O(|T| + occ)$ since $\varepsilon$ is constant, and occupies $mH_k + 1.443 m + \varepsilon m + O(d\log\frac{m}{d})$ bits of space, for all $0 \le k \le \max\{0,α\log_σm - 2\}$ simultaneously, where $α\in (0,1)$ is an arbitrary constant and $H_k$ is the $k$th-order empirical entropy of the trie. Hence, we reduce the $3.443m$ term in the space bounds of previously best succinct solutions to $(1.443 + \varepsilon)m$, thus solving an open problem posed by Belazzougui. Further, we notice that $L = \log\binom{σ(m+1)}{m} - O(\log(σm))$ is a worst-case space lower bound for any solution of the problem and, for $d = o(m)$ and constant $\varepsilon$, our approach allows to achieve $L + \varepsilon m$ bits of space, which gives an evidence that, for $d = o(m)$, the space of our data structure is theoretically optimal up to the $\varepsilon m$ additive term and it is hardly possible to eliminate the term $1.443m$. In addition, we refine the space analysis of previous works by proposing a more appropriate definition for $H_k$. We also simplify the construction for practice adapting the fixed block compression boosting technique, then implement our data structure, and conduct a number of experiments showing that it is comparable to the state of the art in terms of time and is superior in space.

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

↑