Abstract:
The change detection problem is aimed at identifying common and different strings and usually has non-unique solutions.
The identification of the best alignment is canonically based on finding a longest common subsequence (LCS) and is widely used for various purposes.
However, many recent version control systems prefer alternative heuristic algorithms which not only are faster but also usually produce better alignment than finding an LCS.
Two basic shortcomings of known alignment algorithms are outlined in the paper:
even when the length of the longest common substring is close to that
of the LCS, the latter may consist of a great number of short
uninformative substrings;
known alternative algorithms start with identifying the most informative common string,
which sometimes omits from consideration common subsequence
containing arbitrarily many aligned substrings of similar quality.
The sequence alignment problem is considered to be an abstract model for change detection in collaborative text editing designed to minimize the probability of merge conflict.
A new cost function is defined as the probability of overlap between detected changes and a random string.
This optimization avoids both shortcomings mentioned above. The simple cubic algorithm is proposed.
Key words and phrases:similarity of strings, sequence alignment, software development, diff, LCS, edit distance, Levenshtein metric.