cancel
Showing results for 
Search instead for 
Did you mean: 

What is algorithm behind allshortestpaths query?

lingxuan9
Node Link

In neo4j, we can call the allshortestpaths query to find out all shortest paths between two nodes, like this:

MATCH p=allShortestPaths((h)-[*1..20]->(k))

Where can I find the code/algorithm behind this query? I would like to know which algorithm here used to do path searching, is it Dijkstra, or Floyd-Warshall or something else.

Many thanks.

1 REPLY 1

busymo16
Ninja
Ninja

hi @lingxuan9 can you check this blog post maybe it helps. For allshortestpath also this other blog post can help. To get to know the code, maybe you can get the source code of Neo4j or check it in the book for the Graph Algorithms.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.