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

带通配符的动态模式匹配

Dynamic Pattern Matching with Wildcards

School of Electrical and Computer Engineering, University of Tehran(德黑兰大学电气与计算机工程学院);Tehran Institute for Advanced Studies(德黑兰高等研究院)

Arshia Ataee Naeini, Amir-Parsa Mobed, Masoud Seddighin, Saeed Seddighin

AI总结:

本文提出了一种带通配符的动态模式匹配算法,针对不同非通配符数量情况设计了亚线性时间复杂度的解决方案。

摘要:

我们研究了完全动态模式匹配问题,其中模式可能包含多达k个通配符,每个通配符可匹配任意字母表中的符号。文本和模式都受到更新(插入、删除、更改)的影响。我们设计了一个算法,预处理和更新/查询时间为O(n log²n)。对于常数k,该界是真正的亚线性,当k= o(log n)时也是亚线性。我们进一步通过条件下界补充了结果:假设亚二次预处理时间,若在k= Ω(log n)的情况下实现真正的亚线性更新时间,将与强指数时间假设(SETH)矛盾。最后,我们为两种特殊情形开发了亚线性算法:- 如果模式包含w个非通配符符号,我们提供一个预处理时间为O(nw)且更新时间为O(w + log n)的算法,这在w真正亚线性时是真正的亚线性。- 使用FFT技术结合块分解,我们为最多两个非通配符的情形设计了一个确定性的真正亚线性算法,预处理时间为O(n^1.8),更新时间为O(n^0.8 log n)。

英文摘要:

We study the fully dynamic pattern matching problem where the pattern may contain up to kwildcard symbols, each matching any symbol of the alphabet. Both the text and the pattern are subject to updates (insert, delete, change). We design an algorithm with O(nlog^2 n) preprocessing and update/query time O(knk/k+1 + k2 log n). The bound is truly sublinear for a constant k, and sublinear when k= o(log n). We further complement our results with a conditional lower bound: assuming subquadratic preprocessing time, achieving truly sublinear update time for the case k = Ω(log n) would contradict the Strong Exponential Time Hypothesis (SETH). Finally, we develop sublinear algorithms for two special cases: - If the pattern contains w non-wildcard symbols, we give an algorithm with preprocessing time O(nw) and update time O(w + log n), which is truly sublinear whenever wis truly sublinear. - Using FFT technique combined with block decomposition, we design a deterministic truly sublinear algorithm with preprocessing time O(n^1.8) and update time O(n^0.8 log n) for the case that there are at most two non-wildcards.

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

↑