disharmonic(x,y)=2H∣x∣+∣y∣−∣lcs(x,y)∣−H∣x∣−H∣y∣
where:
- ∣x∣ denotes string length
- Hn=∑i=1ni1 is the harmonic series
- lcs(x,y) denotes the longest common subsequence of x and y
Type of Edit distance, which takes into account only insert
and delete
operations. Related to LCS distance. It is metric, but not normalised.
Note: it is not normalized e.g. value can be bigger 1
.
disnorm(abcd,a)=2H∣abcd∣+∣a∣−∣lcs(abcd,a)∣−H∣abcd∣−H∣a∣=2H4+1−1−H4−H1=625−1225−1=1213>1
Reading