A two-dimensional coordinate set A and B, there are the same number of points
Goal is to transform some point coordinates, A transformation for B
O point need to move in A (European) how much is the smallest distance?

Such as this figure, the need to move is A1, A2, A5 these three points, mobile is the minimum distance between the 3
This topic algorithm should be used?
P.s., if the number of point A and B is different, how should solve?
An increase or decrease in the number of different, some is not within the moving distance