On Distances between Words with Parameters - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Conference Papers Year : 2023

On Distances between Words with Parameters


The edit distance between parameterized words is a generalization of the classical edit distance where it is allowed to map particular letters of the first word, called parameters, to parameters of the second word before computing the distance. This problem has been introduced in particular for detection of code duplication, and the notion of words with parameters has also been used with different semantics in other fields. The complexity of several variants of edit distances between parameterized words has been studied, however, the complexity of the most natural one, the Levenshtein distance, remained open. In this paper, we solve this open question and close the exhaustive analysis of all cases of parameterized word matching and function matching, showing that these problems are np-complete. To this aim, we also provide a comparison of the different problems, exhibiting several equivalences between them. We also provide and implement a MaxSAT encoding of the problem, as well as a simple FPT algorithm in the alphabet size, and study their efficiency on real data in the context of theater play structure comparison.
Fichier principal
Vignette du fichier
On_Distances_between_Words_with_Parameters CPM.pdf (689.31 Ko) Télécharger le fichier
Origin Files produced by the author(s)

Dates and versions

hal-04080842 , version 1 (25-04-2023)




Pierre Bourhis, Aaron Boussidan, Philippe Gambette. On Distances between Words with Parameters. CPM 2023, Jun 2023, Champs-sur-Marne, Marne-la-Vallée, France. pp.6:1-6:23, ⟨10.4230/LIPIcs.CPM.2023.6⟩. ⟨hal-04080842⟩
70 View
132 Download



Gmail Mastodon Facebook X LinkedIn More