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

小空间中的内部模式匹配及应用

Internal Pattern Matching in Small Space and Applications

Gabriel Bathie, Panagiotis Charalampopoulos, Tatiana Starikovskaya

AI总结:

本文研究只读小空间设置下的内部模式匹配(IPM)问题,提出近最优的时空权衡数据结构,支持片段内查询,并应用于近似匹配、最长公共子串等场景。

摘要:

在本文中,我们研究小空间(即只读设置,在存储字符串之上限制空间使用)中的模式匹配变体。我们的主要贡献是针对内部模式匹配(IPM)问题的时空权衡:目标是构建一个基于长度为 $n$ 的字符串 $S$ 的数据结构,支持查询计算 $S$ 的片段 $P$ 在另一片段 $T$ 内的出现次数,条件为 $|T| < 2|P|$。对于任意 $τ\in [1 .. n/\log^2 n]$,我们提出近最优的 $Õ(n/τ)$ 大小数据结构,可在 $Õ(n)$ 时间内用 $Õ(n/τ)$ 额外空间构建,并在 $O(τ+\log n \log^3 \log n)$ 时间内响应查询。IPM 查询是字符串算法分析的关键原语,我们借此将近似模式匹配算法迁移至小空间场景,并应用于非对称流设置下的最长公共子串和环形模式匹配问题。

英文摘要:

In this work, we consider pattern matching variants in small space, that is, in the read-only setting, where we want to bound the space usage on top of storing the strings. Our main contribution is a space-time trade-off for the Internal Pattern Matching (IPM) problem, where the goal is to construct a data structure over a string $S$ of length $n$ that allows one to answer the following type of queries: Compute the occurrences of a fragment $P$ of $S$ inside another fragment $T$ of $S$, provided that $|T| < 2|P|$. For any $τ\in [1 .. n/\log^2 n]$, we present a nearly-optimal $Õ(n/τ)$-size data structure that can be built in $Õ(n)$ time using $Õ(n/τ)$ extra space, and answers IPM queries in $O(τ+\log n \log^3 \log n)$ time. IPM queries have been identified as a crucial primitive operation for the analysis of algorithms on strings. In particular, the complexities of several recent algorithms for approximate pattern matching are expressed with regards to the number of calls to a small set of primitive operations that include IPM queries; our data structure allows us to port these results to the small-space setting. We further showcase the applicability of our IPM data structure by using it to obtain space-time trade-offs for the longest common substring and circular pattern matching problems in the asymmetric streaming setting.

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

↑