select_closest_pairs function

Sub function of remove_redundancy_elements_though_reduced_dimensions