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

加权编辑距离下的模式匹配

Pattern Matching under Weighted Edit Distance

King’s College London(伦敦国王学院);Max Planck Institute for Informatics(马克斯·普朗克 informatics 研究所);National Institute of Informatics(日本国立情报学研究所);The Graduate University for Advanced Studies, SOKENDAI(综合研究大学院大学)

Panagiotis Charalampopoulos, Tomasz Kociumaka, Philip Wellnitz

AI总结:

本文研究带权编辑距离下的模式匹配 PMWED,分别给出通用、整数度量权重和任意权重下的近线性高效算法,并在 W=1 时接近 PMED 最优结果。

摘要:

在带权编辑模式匹配(PMWED)中,给定长度为 m 的模式 P、长度为 n 的文本 T、正阈值 k,以及对权重函数的预言访问;该权重函数规定各次编辑的代价(取决于所涉及的字符,并经过归一化,使每次编辑的代价至少为 1)。目标是计算 T 中所有可由 P 经总代价至多为 k 的编辑得到的片段的起始位置。与所有编辑均为单位代价的无权变体(PMED)相比,PMWED 能更准确地刻画典型的现实应用。我们获得三个主要结果:(a) 一种概念上简单的 PMWED 算法,时间复杂度为 \ ilde{O}(nk),与 Landau 和 Vishkin 针对 PMED 的算法非常不同;(b) 在权重函数是取值介于 0 与 W 之间的整数度量这一假设下,一种明显更复杂的 PMWED 算法,时间复杂度为 \ ilde{O}(n+k^{3.5}·W^4·n/m);(c) 对任意权重情形,一种时间复杂度为 \ ilde{O}(n+k^4·n/m) 的 PMWED 算法。在小整数值度量的设定下,当 W=1 时,我们几乎追平 PMED 的现有最优水平。

英文摘要:

In Pattern Matching with Weighted Edits (PMWED), we are given a pattern $P$ of length $m$, a text $T$ of length $n$, a positive threshold $k$, and oracle access to a weight function that specifies the costs of edits (depending on the involved characters, and normalized so that the cost of each edit is at least $1$). The goal is to compute the starting positions of all fragments of $T$ that can be obtained from $P$ with edits of total cost at most $k$. PMWED captures typical real-world applications more accurately than its unweighted variant (PMED), where all edits have unit costs. We obtain three main results: (a) a conceptually simple $\tilde{O}(nk)$-time algorithm for PMWED, very different from that of Landau and Vishkin for PMED; (b) a significantly more complicated $\tilde{O}(n+k^{3.5} \cdot W^4\cdot n/m)$-time algorithm for PMWED under the assumption that the weight function is a metric with integer values between $0$ and $W$; and (c) an $\tilde{O}(n+k^4 \cdot n/m)$-time algorithm for PMWED for the case of arbitrary weights. In the setting of metrics with small integer values, we nearly match the state of the art for PMED where $W=1$.

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

↑