arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1704.01646cs.DS
收藏

具有d个通配符的流式模式匹配

Streaming Pattern Matching with d Wildcards

Shay Golan, Tsvi Kopelowitz, Ely Porat

摘要:

在具有$d$通配符的模式匹配问题中,给定长度为$n$的文本$T$和长度为$m$的模式$P$,模式$P$包含$d$通配符,每个字符由特殊符号$'?'$表示。字符串匹配任何其他字符。目标是为$T$的每个$m$长度的子串确定它是否与$P$匹配。在具有$d$通配符的模式匹配问题的流模型变体中,文本$T$每次到达一个字符,并且目标是在下一个字符到达之前报告最后的$m$字符是否匹配$P$,同时仅使用$o(m)$空格字。在本文中,我们介绍了两个新的算法的$d$流模式匹配模式匹配问题。第一种是由常数$0\leq δ\leq 1$参数化的随机Monte Carlo算法。该算法使用每个字符的$\tilde{O}(d^{1-δ})$分摊时间和空间的$\tilde{O}(d^{1+δ})$字。第二种算法在第一种算法中用作黑盒,它是一种随机蒙特卡罗算法,它使用每个字符的$O(d+\log m)$最坏情况时间和空间的$O(d\log m)$字。

英文摘要:

In the pattern matching with $d$ wildcards problem one is given a text $T$ of length $n$ and a pattern $P$ of length $m$ that contains $d$ wildcard characters, each denoted by a special symbol $'?'$. A wildcard character matches any other character. The goal is to establish for each $m$-length substring of $T$ whether it matches $P$. In the streaming model variant of the pattern matching with $d$ wildcards problem the text $T$ arrives one character at a time and the goal is to report, before the next character arrives, if the last $m$ characters match $P$ while using only $o(m)$ words of space. In this paper we introduce two new algorithms for the $d$ wildcard pattern matching problem in the streaming model. The first is a randomized Monte Carlo algorithm that is parameterized by a constant $0\leq δ\leq 1$. This algorithm uses $\tilde{O}(d^{1-δ})$ amortized time per character and $\tilde{O}(d^{1+δ})$ words of space. The second algorithm, which is used as a black box in the first algorithm, is a randomized Monte Carlo algorithm which uses $O(d+\log m)$ worst-case time per character and $O(d\log m)$ words of space.

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

↑