{"title":"Computing the index of non-isometric k-ary words with Hamming and Lee distance","authors":"M. Anselmo, Manuela Flores, Maria Madonia","doi":"10.3233/com-230441","DOIUrl":null,"url":null,"abstract":"Isometric words are those words whose occurrence as a factor in a transformation of a word u in a word v can be avoided, while preserving the minimal length of the transformation. Such minimal length refers to a distance between u and v. In the literature, isometric words have been considered with respect to the Hamming distance and the Lee distance; the former especially for binary words, while the latter for k-ary words, with k ⩾ 2. Ham- and Lee- isometric words have been characterized in terms of their overlaps with errors. In this paper, we give algorithms to decide whether a word f, of length n, is Ham- or Lee-isometric and provide evidence of the possible non-isometricity by returning a pair of words of minimal length whose transformation cannot avoid the factor f. Such a pair of words is called a pair of witnesses and the minimal length of the witnesses is called the index of f. The algorithms run in O ( n ) time with a preprocessing of O ( n ) time and space to construct a data structure that allows answering LCA queries on the suffix tree of f in constant time. The correctness of the algorithms lies on some theoretical results on the index and the witnesses of a word that are here presented. The investigation on the index is completed by the characterization of words with minimum/maximum index. All the results are shown referring to both Hamming and Lee distance.","PeriodicalId":515920,"journal":{"name":"Computability","volume":" 2","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computability","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.3233/com-230441","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Isometric words are those words whose occurrence as a factor in a transformation of a word u in a word v can be avoided, while preserving the minimal length of the transformation. Such minimal length refers to a distance between u and v. In the literature, isometric words have been considered with respect to the Hamming distance and the Lee distance; the former especially for binary words, while the latter for k-ary words, with k ⩾ 2. Ham- and Lee- isometric words have been characterized in terms of their overlaps with errors. In this paper, we give algorithms to decide whether a word f, of length n, is Ham- or Lee-isometric and provide evidence of the possible non-isometricity by returning a pair of words of minimal length whose transformation cannot avoid the factor f. Such a pair of words is called a pair of witnesses and the minimal length of the witnesses is called the index of f. The algorithms run in O ( n ) time with a preprocessing of O ( n ) time and space to construct a data structure that allows answering LCA queries on the suffix tree of f in constant time. The correctness of the algorithms lies on some theoretical results on the index and the witnesses of a word that are here presented. The investigation on the index is completed by the characterization of words with minimum/maximum index. All the results are shown referring to both Hamming and Lee distance.
等距词是指在词 v 中转换词 u 时,可以避免出现的词,同时保留转换的最小长度。这种最小长度指的是 u 和 v 之间的距离。在文献中,等距词是根据汉明距离(Hamming distance)和李距离(Lee distance)来考虑的;前者尤其适用于二元词,而后者适用于 k-ary 词(k ⩾ 2)。Ham 等距词和 Lee 等距词的特征在于它们的重叠误差。在本文中,我们给出了判断长度为 n 的词 f 是 Ham-isometric 还是 Lee-isometric 的算法,并通过返回一对最小长度的词来证明可能的非等距性,这对词的变换不能避开因子 f。这样的一对词称为一对见证词,见证词的最小长度称为 f 的索引。算法的运行时间为 O ( n ),预处理的时间和空间为 O ( n ),构建的数据结构可以在恒定时间内回答对 f 后缀树的 LCA 查询。算法的正确性取决于本文介绍的索引和单词见证的一些理论结果。通过对具有最小/最大索引的词的特征描述,完成了对索引的研究。所有结果均参考了汉明距离和李距离。