A pattern $\alpha$ is a string of variables and terminal letters. We say that $\alpha$ matches a word $w$, consisting only of terminal letters, if $w$ can be obtained by replacing the variables of $\alpha$ 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 $\alpha$ 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.
翻译:模式 $\ alpha$ 是一系列变量和终端字母。 我们说, $\ alpha$ 符合一个单字, 仅由终端字母组成, 如果能用终端字替换 $\ alpha$ 的变量, 则只能用终端字来获得美元。 匹配问题, 即决定给定模式是否与给定单词匹配, 得到了大量调查: 它一般是NP- 完整的, 但对于结构受限制的模式类别来说, 可以有效解决。 如果我们对什么是最小的宽度距离感兴趣, 在美元和任何美元之间, 仅用终端字取代 $\ alpha$ 的变量, 仅用终端字来替换 $\ alpha$ 的变量( 在哈姆明距离下匹配的单一模式), 就可以设计有效的算法, 并且匹配常规模式类别( 在不出现变量两次的情况下) 的有条件的下较低的下界限, 以及我们允许无限制模式的重复, 结构结构结构的结构, 的发生的方式是 。 此外,, 不同的变量发生的方式, 如果一个变数发生一次不固定的变数发生, 的周期的周期会成为这些变数 的周期 的 的 的周期的 的 的变数 的变数会成为这些变数 的变数 的变数 的变数 的变的变的 。