I need an algorithm that determines 5 locations from 51 nodes and create a tour within these 5 nodes. Other 46 nodes must be assigned to one of the closest determined 5 locations. The aim is to minimize the length between the chosen nodes(tour) and the other 46 nodes to assigned to the closest chosen nodes.
The coordinates of 51 nodes are given as x and y coordinates.
How can I solve this problem?