Home / Companies / Neo4j / Blog / Post Details
Content Deep Dive

Graph Algorithms in Neo4j: Shortest Path

Blog post from Neo4j

Post Details
Company
Date Published
Author
Mark Needham & Amy E. Hodler
Word Count
632
Language
English
Hacker News Points
-
Summary

The Shortest Path algorithm is used for finding directions between physical locations, such as driving directions, and also to find degrees of separations between people in social networks. It calculates the shortest weighted path between a pair of nodes, using Dijkstra's algorithm as one of its most well-known variants. The algorithm has a long history dating back to the 19th century and was first implemented by Edsger Dijkstra in 1956. Shortest Path is commonly used in web mapping tools like Google Maps for providing driving directions, and also in social networks like LinkedIn to find mutual connections between people. A real-world example using Neo4j demonstrates how to run the Shortest Path algorithm on a sample graph.