近似置换Cartesian树匹配
Approximate Cartesian Tree Matching with Substitutions
AI总结:
本文提出了一种近似Cartesian树匹配算法,通过汉明距离度量在时间序列分析中提升鲁棒性。
摘要:
Cartesian树捕捉了序列元素的相对顺序。近年来,Cartesian树匹配引起了广泛关注,特别是由于其在时间序列分析中的应用。考虑一个长度为n的文本T和一个长度为m的模式P。在精确的Cartesian树匹配问题中,任务是找到所有长度为m的T的片段,其Cartesian树与模式P的Cartesian树CT(P)相同。尽管该问题的精确版本可以在线性时间内解决[Park等,TCS 2020],但仍然相当受限;例如,它对模式中的异常值不具有鲁棒性。为了克服这一限制,我们考虑近似设置,目标是识别所有T的片段,其接近某个字符串,其Cartesian树匹配CT(P)。在本工作中,我们通过广泛使用的汉明距离度量来量化接近性。对于给定的整数参数k>0,我们提出一个算法,计算所有T的片段,其与某个Cartesian树匹配CT(P)的字符串的汉明距离至多为k。我们的算法在k≤m^{1/5}时运行时间为O(n√m·k^{2.5}),在k≥m^{1/5}时运行时间为O(nk^5),从而在k=o(m^{1/4})的范围内优于Kim和Han [TCS 2025] 的现有状态最先进算法O(nmk)。在解决我们的方案的过程中,我们开发了一套有价值的工具。首先,我们引入了Cartesian树中的新周期性概念。然后,我们将多个已知的组合学和算法学结果从字符串匹配和字符串周期性提升到Cartesian树匹配和Cartesian树周期性。
英文摘要:
The Cartesian tree of a sequence captures the relative order of the sequence's elements. In recent years, Cartesian tree matching has attracted considerable attention, particularly due to its applications in time series analysis. Consider a text $T$ of length $n$ and a pattern $P$ of length $m$. In the exact Cartesian tree matching problem, the task is to find all length-$m$ fragments of $T$ whose Cartesian tree coincides with the Cartesian tree $CT(P)$ of the pattern. Although the exact version of the problem can be solved in linear time [Park et al., TCS 2020], it remains rather restrictive; for example, it is not robust to outliers in the pattern. To overcome this limitation, we consider the approximate setting, where the goal is to identify all fragments of $T$ that are close to some string whose Cartesian tree matches $CT(P)$. In this work, we quantify closeness via the widely used Hamming distance metric. For a given integer parameter $k>0$, we present an algorithm that computes all fragments of $T$ that are at Hamming distance at most $k$ from a string whose Cartesian tree matches $CT(P)$. Our algorithm runs in time $\mathcal O(n \sqrt{m} \cdot k^{2.5})$ for $k \leq m^{1/5}$ and in time $\mathcal O(nk^5)$ for $k \geq m^{1/5}$, thereby improving upon the state-of-the-art $\mathcal O(nmk)$-time algorithm of Kim and Han [TCS 2025] in the regime $k = o(m^{1/4})$. On the way to our solution, we develop a toolbox of independent interest. First, we introduce a new notion of periodicity in Cartesian trees. Then, we lift multiple well-known combinatorial and algorithmic results for string matching and periodicity in strings to Cartesian tree matching and periodicity in Cartesian trees.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。