arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2505.09236cs.DS
收藏

允许一处差异的近似 Cartesian 树匹配

Approximate Cartesian Tree Matching with One Difference

Bastien Auvray, Julien David, Samah Ghazawi, Richard Groult, Gad M. Landau, Thierry Lecroq

AI总结:

本文研究允许一处差异的近似 Cartesian 树模式匹配,提出通用 O(nM) 算法并证明其在多种随机模型下平均线性,同时给出可推广到多处差异的自动机算法。

摘要:

Cartesian 树模式匹配旨在找出文本中所有与给定模式具有相同 Cartesian 树的因子。精确情形已经存在理论和实用解决方案。本文针对长度为 m 的模式和长度为 n 的文本,提出了首批用于求解允许一处差异的近似 Cartesian 树模式匹配的算法。我们给出一种通用算法,可采用不同的差异概念,找出文本中所有与模式的 Cartesian 树相差一处即相同的因子。我们证明该算法最坏情况复杂度为 O(nM),并且在若干随机模型下具有线性平均情况复杂度。我们还提出一种基于自动机的算法,该算法改编自 [PALP19],并可推广到处理多于一处差异的情况。

英文摘要:

Cartesian tree pattern matching consists of finding all the factors of a text that have the same Cartesian tree than a given pattern. There already exist theoretical and practical solutions for the exact case. In this paper, we propose the first algorithms for solving approximate Cartesian tree pattern matching with one difference given a pattern of length m and a text of length n. We present a generic algorithm that find all the factors of the text that have the same Cartesian tree of the pattern with one difference, using different notions of differences. We show that this algorithm has a O(nM) worst-case complexity and that, for several random models, the algorithm has a linear average-case complexity. We also present an automaton based algorithm, adapting [PALP19], that can be generalized to deal with more than one difference.

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

↑