Get the longest path in a graph with OrientDB

192 Views Asked by At

I'm a newbie with OrientDB and Graph (database and concept). I want to understand how to find the longest path in graph.

This is my graph: enter image description here

The shortest path is: 13:0 -> 13:1 -> 13:2 (with sst() or dijkstra())

But I want to get the longest: 13:0 -> 13:3 -> 13:1 -> 13:2

How can I do? I must create from scratch a new function?

Thanks in advance

Luis

1

There are 1 best solutions below

0
On BEST ANSWER

You're asking a solution to a NP-hard problem :) See here.