How to calculate the minimum Euclidean distance between two points with permutation elements?

I am working with two sets of points that always have the same number of elements. A 0 -A n and B 0 -B n... Both of these sets are not ordered. [Image 1]
I need to calculate the minimum possible Euclidean distance between them, considering all possible permutations of elements. The only way I know how to do this is to check all possible combinations of distances between two points, which makes the number of calculations n! (40320 combinations for 8 points). [Image 3]
I tried to find out if I could split the computation into several smaller computations [Image 2] , but I failed.
Is there a less computationally expensive way to calculate it?

this image

enter image description here

+3


source to share





All Articles