arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2207.07477cs.DScs.CCcs.FL
收藏

编辑距离下的变量模式匹配

Matching Patterns with Variables Under Edit Distance

Paweł Gawrychowski, Florin Manea, Stefan Siemer

摘要:

模式$α$是由变量和终止字母组成的字符串。我们说$α$匹配一个词$w$,它只由终端字母组成,如果$w$可以通过用终端词替换$α$的变量来获得。匹配问题,即,决定一个给定的模式是否匹配一个给定的词,被大量研究:它通常是NP完全的,但可以有效地解决具有限制结构的模式类。如果我们感兴趣的是$w$和通过用终端词替换$α$的变量而获得的任何词$u$之间的最小汉明距离是多少(所以在汉明距离下匹配),人们可以设计出有效的算法和匹配的条件下界的类规则模式(其中没有变量出现两次),以及对于我们允许变量无限重复但限制模式结构的模式类,即,不同变量的出现可以交错的方式。此外,在汉明距离下,如果一个变量出现不止一次,并且它的出现可以与其他变量的出现任意交织,即使每个变量只出现一次,匹配问题也是棘手的。本文研究了编辑距离下带变量的模式匹配问题。我们仍然获得有效的算法和匹配的条件下界的类的规则模式,但表明,问题变得,在这种情况下,已经棘手的一元模式,由重复出现的一个单一的变量交错终端。

英文摘要:

A pattern $α$ is a string of variables and terminal letters. We say that $α$ matches a word $w$, consisting only of terminal letters, if $w$ can be obtained by replacing the variables of $α$ by terminal words. The matching problem, i.e., deciding whether a given pattern matches a given word, was heavily investigated: it is NP-complete in general, but can be solved efficiently for classes of patterns with restricted structure. If we are interested in what is the minimum Hamming distance between $w$ and any word $u$ obtained by replacing the variables of $α$ by terminal words (so matching under Hamming distance), one can devise efficient algorithms and matching conditional lower bounds for the class of regular patterns (in which no variable occurs twice), as well as for classes of patterns where we allow unbounded repetitions of variables, but restrict the structure of the pattern, i.e., the way the occurrences of different variables can be interleaved. Moreover, under Hamming distance, if a variable occurs more than once and its occurrences can be interleaved arbitrarily with those of other variables, even if each of these occurs just once, the matching problem is intractable. In this paper, we consider the problem of matching patterns with variables under edit distance. We still obtain efficient algorithms and matching conditional lower bounds for the class of regular patterns, but show that the problem becomes, in this case, intractable already for unary patterns, consisting of repeated occurrences of a single variable interleaved with terminals.

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

↑