Computing the k Nearest-Neighbors for all Vertices via Dijkstra
Data Structures and Algorithms
2016-07-27 v1
Abstract
We are given a directed graph with vertices and edges, with positive weights on the edges, and a parameter . We show how to compute, for every vertex , its nearest-neighbors. The algorithm runs in time, and follows by a somewhat careful modification of Dijkstra's shortest path algorithm. This result is probably folklore, but we were unable to find a reference to it -- thus, this note.
Keywords
Cite
@article{arxiv.1607.07818,
title = {Computing the k Nearest-Neighbors for all Vertices via Dijkstra},
author = {Sariel Har-Peled},
journal= {arXiv preprint arXiv:1607.07818},
year = {2016}
}