There is a set of n points on the plane. It is necessary to find k such points, the distance between which is greatest. For k = 2, everything is simple; for k> 2, the simple search takes too long.

Maybe there are some algorithms or even something implemented? I am writing in python.

  • First, specify what you mean by the distance between k points for k> 2? The sum of all pairs of distances? - Xander
  • @ Alexander, yes. To make the points more distant from each other - Ildan Kiamov
  • do you mean the coordinate plane? If so, everything will be simple - ivan K.
  • @ivanK, yes, coordinate - Ildan Kiamov
  • @ IldanKiamov, well, then just take the maximum value along the X axis and along the Y axis, and likewise the minimum value along the axes. Also need to find will be for max. oh min oY and min oX and max oY. After that, it will be enough for you to calculate the distance for about 4 points - ivan K.

0