We lift metrics over words to metrics over word-to-word transductions, by defining the distance between two transductions as the supremum of the distances of their respective outputs over all inputs. This allows to compare transducers beyond equivalence. Two transducers are close (resp. $k$-close) with respect to a metric if their distance is finite (resp. at most $k$). Over integer-valued metrics computing the distance between transducers is equivalent to deciding the closeness and $k$-closeness problems. For common integer-valued edit distances such as, Hamming, transposition, conjugacy and Levenshtein family of distances, we show that the closeness and the $k$-closeness problems are decidable for functional transducers. Hence, the distance with respect to these metrics is also computable. Finally, we relate the notion of distance between functions to the notions of diameter of a relation and index of a relation in another. We show that computing edit distance between functional transducers is equivalent to computing diameter of a rational relation and both are a specific instance of the index problem of rational relations.
翻译:我们将单词上的度量提升到单词到单词转换上的度量,通过定义两个转换之间的距离为所有输入上各自输出距离的上确界。这使得我们能够在等价关系之外比较转换器。两个转换器关于某个度量是接近(分别为$k$-接近)的,如果它们的距离是有限的(分别至多为$k$)。在整数赋值度量下,计算转换器间的距离等价于判定接近性与$k$-接近性问题。对于常见的整数赋值编辑距离,如汉明距离、转置距离、共轭距离及莱文斯坦距离族,我们证明了功能转换器的接近性和$k$-接近性问题可判定。因此,关于这些度量的距离也是可计算的。最后,我们将函数之间距离的概念与关系的直径以及一个关系在另一个关系中的指数概念联系起来。我们证明了计算功能转换器间的编辑距离等价于计算有理关系的直径,并且两者都是有理关系的指数问题的具体实例。