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

二进制混杂模式匹配的新算法

New algorithms for binary jumbled pattern matching

Emanuele Giaquinta, Szymon Grabowski

摘要:

给定一个模式$P$和一个文本$T$,这两个字符串都在一个二进制字母表上,二进制混乱字符串匹配问题在于判断在$T$中是否出现了$P$的任何排列。这个问题的索引版本,即,预处理字符串以有效地回答这样的置换查询是困难的,并且在过去几年中已经被研究。目前这个问题的最佳边界是$O(n^2/\log^2 n)$(O(n)空间和O(1)查询时间)和$O(r^2\log r)$(O(|L|)空间和$O(\log|L|)$查询时间),其中$r$是$T$的游程编码长度,$|L| = O(n)$是索引的大小。在本文中,我们提出了这个问题的新结果。我们的第一个结果是Badkobeh等人的索引的替代构造。它在空间复杂度和时间复杂度之间取得了折衷。它具有构建索引的$O(r^2\log k + n/k)$复杂性、$O(\log k)$查询时间,并使用$O(n/k + |L|)$空间,其中$k$是一个参数。第二个结果是一个$O(n^2 \log^2 w / w)$算法(具有O(n)空间和O(1)查询时间),基于字级并行性,其中$w$是以位为单位的字大小。

英文摘要:

Given a pattern $P$ and a text $T$, both strings over a binary alphabet, the binary jumbled string matching problem consists in telling whether any permutation of $P$ occurs in $T$. The indexed version of this problem, i.e., preprocessing a string to efficiently answer such permutation queries, is hard and has been studied in the last few years. Currently the best bounds for this problem are $O(n^2/\log^2 n)$ (with O(n) space and O(1) query time) and $O(r^2\log r)$ (with O(|L|) space and $O(\log|L|)$ query time), where $r$ is the length of the run-length encoding of $T$ and $|L| = O(n)$ is the size of the index. In this paper we present new results for this problem. Our first result is an alternative construction of the index by Badkobeh et al. that obtains a trade-off between the space and the time complexity. It has $O(r^2\log k + n/k)$ complexity to build the index, $O(\log k)$ query time, and uses $O(n/k + |L|)$ space, where $k$ is a parameter. The second result is an $O(n^2 \log^2 w / w)$ algorithm (with O(n) space and O(1) query time), based on word-level parallelism where $w$ is the word size in bits.

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

↑