3

Assume I have a set of $N$ ordered points, $X$. I would like to find the set of $N$ points, $Y$, where the distance between $X$ and $Y$ $(d = \sum_{i=0}^{N-1} |X_i - Y_i| )$ is minimized but there is a minimum distance between points of $M$ $(Y_{i+1} - Y_i > M)$. Is there an algorithm or approach to deriving $Y$ given $X$ and $M$?

  • 1
  • I suggest you try dynamic programming: see https://cs.stackexchange.com/tags/dynamic-programming/info. 2. What is the domain for the points $Y$ and for $M$? Integers? Real numbers? (I'm not entirely sure whether it matters but it might be good to specify it.)
  • – D.W. May 19 '21 at 22:19
  • Are you satisfied with running times that are something like $O(NM)$? Or is $M$ so huge that you're hoping for something like $O(N \text{polylog}(M))$?
  • – D.W. May 19 '21 at 22:25
  • 1
    What is the dimension of the points, and the distance metric? Regarding minimum distance between points, are you sure you mean "only" $Y_{i+1} - Y_i > M$? This would allow, e.g., solutions with $Y_i = X_i$ for every second $i$. – j_random_hacker May 20 '21 at 01:38
  • 2
    Just as an aside, if the points are in $\mathbb{R}^n$, you're using Euclidan distance, and you modify the objective function to be least-squares, then this is a quadratically constrained quadratic program. Because it's symmetric and positive-definite, you could solve it with a conjugate gradient method using a log-barrier function to handle the minimum distance constraints. – Pseudonym May 20 '21 at 02:32