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

带通配符的最长公共扩展:权衡与应用

Longest Common Extensions with Wildcards: Trade-off and Applications

Gabriel Bathie, Itai Boneh, Panagiotis Charalampopoulos, Jonas Ellert, Tatiana Starikovskaya

AI总结:

提出一种针对含通配符字符串的最长公共扩展问题的数据结构,在预处理时间、空间和查询时间之间实现平滑权衡,并证明其在组合和非组合场景下的最优性,同时应用于近似模式匹配和结构分析。

摘要:

我们研究包含通配符的字符串中的最长公共扩展(LCE)问题。通配符(也称为“不关心”或“空洞”)是特殊字符,可与字母表中的任何其他字符匹配,类似于Unix命令中的“?”或正则表达式引擎中的“.”。我们考虑以$G$为参数的问题,$G$是输入字符串中最大连续通配符组的数量。我们的主要贡献是为此问题设计了一个简单的数据结构,该结构可在$O(n (G/t) \log n)$时间内构建,占用$O(nG/t)$空间,并在$O(t)$时间内回答查询,对于任何$t \in [1, G]$。在$O(\log n)$因子范围内,该结构平滑地插值于Crochemore等人[JDA 2015]的数据结构(具有$O(nG)$预处理时间和空间,$O(1)$查询时间)与基于“袋鼠跳跃”技术[Landau和Vishkin, STOC 1986]的简单解决方案(具有$O(n)$预处理时间和空间,$O(G)$查询时间)之间。通过建立该问题与布尔矩阵乘法之间的联系,我们证明在广泛接受的假设下,当$G = \Omega(n^\epsilon)$时,我们的解决方案在组合数据结构中是最优的,直到亚多项式因子。此外,我们开发了一种用于稀疏布尔矩阵乘法的简单确定性组合算法。我们进一步建立了非组合数据结构的条件下界,指出对于任何具有查询时间$t$的数据结构,在$t$和$G$的广泛范围内,$O(nG/t^4)$的预处理时间(或空间)是最优的,直到亚多项式因子,假设已确立的$\textsf{3SUM}$(或$\textsf{Set-Disjointness}$)猜想成立。最后,我们展示了我们的数据结构可用于获得带通配符字符串的近似模式匹配和结构分析的高效算法。

英文摘要:

We study the Longest Common Extension (LCE) problem in a string containing wildcards. Wildcards (also called "don't cares" or "holes") are special characters that match any other character in the alphabet, similar to the character "?" in Unix commands or "." in regular expression engines. We consider the problem parametrized by $G$, the number of maximal contiguous groups of wildcards in the input string. Our main contribution is a simple data structure for this problem that can be built in $O(n (G/t) \log n)$ time, occupies $O(nG/t)$ space, and answers queries in $O(t)$ time, for any $t \in [1, G]$. Up to the $O(\log n)$ factor, this interpolates smoothly between the data structure of Crochemore et al. [JDA 2015], which has $O(nG)$ preprocessing time and space, and $O(1)$ query time, and a simple solution based on the "kangaroo jumping" technique [Landau and Vishkin, STOC 1986], which has $O(n)$ preprocessing time and space, and $O(G)$ query time. By establishing a connection between this problem and Boolean matrix multiplication, we show that our solution is optimal, up to subpolynomial factors, among combinatorial data structures when $G = Ω(n^ε)$ under a widely believed hypothesis. In addition, we develop a simple deterministic combinatorial algorithm for sparse Boolean matrix multiplication. We further establish a conditional lower bound for non-combinatorial data structures, stating that $O(nG/t^4)$ preprocessing time (resp. space) is optimal, up to subpolynomial factors, for any data structure with query time $t$ for a wide range of $t$ and $G$, assuming the well-established $\textsf{3SUM}$ (resp. $\textsf{Set-Disjointness}$) conjecture. Finally, we show that our data structure can be used to obtain efficient algorithms for approximate pattern matching and structural analysis of strings with wildcards.

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

↑