Computing the k Nearest-Neighbors for all Vertices via Dijkstra

preprint2016arXivOpen access

Abstract

We are given a directed graph G=(V,E)G = (V,E) with nn vertices and mm edges, with positive weights on the edges, and a parameter k>0k >0. We show how to compute, for every vertex v∈Vv \in V, its kk nearest-neighbors. The algorithm runs in O(k(nlog⁡n+m))O( k ( n \log n + m ) ) 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.

Explore this paper’s authors, topics and related work.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Reviews 0

Write a reviewWrite

No reviews yet.

Discussion 0

Add a commentWrite

No comments yet.