1
votes

I am wondering how to use Neo4j to find the MST? Most examplesI found was using Hadoop to find it.

1
could you list some links on how they did it using hadoop please?Jane Wayne

1 Answers

3
votes

I don't think that this is possible in Cypher, given how current algorithms determine an MST (if I'm wrong on this, I'd love to know).

Instead, I'd recommend implementing one of the algorithms used for determining an MST, e.g. Prim's Algorithm. It's quite straight forward and, with the help of heaps and adjacency lists, is relatively performant.

A quick search for the algorithm will turn up many links.

I'm sure leveraging Neo4j's Core API or Traversal API might even help things integrate even more closely, possibly without needing to represent the entire graph as an adjacency list first. And of course you can do that with Neo4j in Embedded Mode or turn it into a Server Plugin in case you're running Neo4j in Server Mode.

Let us know what you come up with!