When you need to approximately match objects and you have a distance function that satisfies the triangle inequality.