Let there be a set of some objects S. Let there be a distance function defined for each pair of objects in S which has the properties of a metric, i.e. d(x, x) = 0, d(x, y) = d(y, x) and d(x, z) <= d(x, y) + d(y, z).
Goal: find a set S' which is a subset of S with given size such that the elements in S' are the farthest apart from each other among all possible S'.
Problem 1: how to define "the farthest apart from each other"? Note that there is only the distance function, the elements themselves don't have any coordinates or such (they may be e.g. strings and the distance be the Levenshtein distance). An obvious candidate is the sum of pairwise distances but I was wondering if there are other (better?) ways, especially with respect to problem 2.
Problem 2: how to actually select of the elements to form S'? An obvious way is to brute-force it, i.e. try all combinations and pick the one with the elements farthest apart but this sounds computationally ineffective. Is there a better way, possibly utilizing some clever definition of elements being "farthest apart".