Finding nearest neighbors, closest pairs, or the shortest path is done with geometric searching algorithms.