1

Given an undirected graph and a start and end node, I am trying to find two edge-disjoint paths such that the sum of their lengths is minimized. In particular, each path must start at the start node, end at the end node, and no edge can be traversed by both nodes. Is there an efficient algorithm to solve this problem?

I know that if I just need the shortest path, I can use Dijkstra's algorithm, but finding one path with Dijkstra's algorithm and then searching for another is sometimes not optimal at all, since edges in the first path may have blocked a possible and way shorter path.

I have tried implementing the edge_disjoint_path algorithm from the Python networkx package. But I must say that the result is very varying from okay to really bad. My network is not that big. "Only" 6000 nodes and 7500 edges.

D.W.
  • 159,275
  • 20
  • 227
  • 470
  • Suurballe's algorithm solves this for directed graphs in $O(|E| + |V| \log |V|)$ time (see also https://en.wikipedia.org/wiki/Edge_disjoint_shortest_pair_algorithm), but it's not clear to me how to do this for undirected graphs -- I don't know if Suurballe's algorithm can handle this case as well. – D.W. Mar 19 '21 at 18:36
  • Strange... This question is exactly as https://cs.stackexchange.com/questions/136807/finding-the-two-node-disjoint-paths-minimizing-the-sum-of-their-lengths – HEKTO Mar 22 '21 at 04:01
  • @HEKTO, that's for node-disjoint paths, this is for edge-disjoint paths. Initially both questions were asked in one post, but I separated them out into two posts. See https://cs.stackexchange.com/questions/136807/finding-the-two-node-disjoint-paths-minimizing-the-sum-of-their-lengths#comment288176_136807 and the revision history of that question. – D.W. Mar 22 '21 at 08:27
  • Is there a reason why the node-disjoint version is answered, but not the edge-disjoint version? – Kenneth Kho Mar 12 '24 at 14:57
  • @KennethKho, I don't know how to solve the edge-disjoint version, but if you do, I'd be interested to see your answer! – D.W. Mar 12 '24 at 16:15

0 Answers0