News for hackers. Stuff that matters.
Re:Sift4: Fast and accurate string distance algorithm by tmalsburg2 on Tuesday October 27, 2015 @10:35PM (#10462578)
One great property of the Levenshtein distance is that it is a metric in the mathematical sense. This means that the following (in)equalities hold (with d being the Levenshtein distance):

    d(a, c) <= d(a, b) + d(b, c) (triangle inequality)
    d(a, b) = d(b, a)            (symmetry)
    d(a, a) = 0                  (reflexivity)
Many efficient algorithms operating on distances need the distance measure to be metric in this sense, otherwise they don't work (e.g., [1]). There is also a lot of really useful math that can’t be applied if a distance measure is not a metric. One important question therefore is whether Sift4 is a metric or not. I haven’t looked at the definition of the algorithm but the author acknowledges that the measure is not symmetric, so it can't be a metric. Despite its speed the Sift4 can therefore often not be used as a drop-in replacement for the Levenshtein distance. There is a reason for why we’re are still using the Levenshtein distance despite its somewhat poor scaling properties.

[1] https://en.wikipedia.org/wiki/Metric_tree

Re:Sift4: Fast and accurate string distance algorithm by hyperpallium on Wednesday October 28, 2015 @02:31AM (#10463100)
Some applications of Levenshtein, such as spell checking and google suggest, seem like game physics in that they are consumed by humans, and gross approximations are good enough - even with occasional glitches. Speed trumps accuracy.

Unless there're clever compilation algorithms to calculate edit distance really fast, that fall apart without a metric...?

Re:Sift4: Fast and accurate string distance algorithm by gregorias on Wednesday October 28, 2015 @01:21AM (#10462967)
Could you provide examples of math application - that you mention - in the case of Levenshtein distance? I'm not interested in general topology, functional analysis etc., but what finds its use in computer science, software engineering.
Re:Sift4: Fast and accurate string distance algorithm by tmalsburg2 on Wednesday October 28, 2015 @11:50AM (#10465088)
I wasn't thinking of particular applications but I suppose that the math underlying clustering algorithms assumes that the distance measure is a metric to name just one example.