2

Can anyone please recommend a way to efficiently recompute maxflow in the flow network if one edge of capacity one is deleted?

Theoretically, I know the linear time algorithm, but how to do it really fast in python?

I use igraph package to compute maxflow. I think that if I just delete the edge from graph and call g.maxflow(), then it will start from scratch.

I would be happy even if there is a nice way to do it in C.

ivan
  • 311
  • 1
  • 4
  • 13
  • Approaches using Linear-Programming should be able to do that efficiently (i'm assuming here this change you propose is either a variable-bound or a change of a right-hand side of a constraint; both should allow hot/warm-starts). Maybe this also works out together with the Network-simplex (some solvers have one), but even if not, iterative solving (even using the dual-simplex) should be efficient. – sascha Mar 29 '18 at 00:48
  • If you can create a valid flow by propagating the -1 to the source and sink, then you can start the Ford-Fulkerson algorithm from there instead of starting from scratch. – Matt Timmermans Mar 29 '18 at 02:40
  • @sascha Yeah, thanks for advice - this works well. However, there is one issue: the integrality theorem guarantees that there exists an integral solution. Combinatorial algorithm are build to ensure that they find exactly integer solution. Can we claim this about LP solvers? You can probably add your post as an answer? – ivan Apr 02 '18 at 21:51
  • LP solvers should have no problems (and if there are problems: there are rational-simplex implementations like within SCIP's Soplex). Yes, there is FP-math, but Simplex is actually seen as combinatorial-method (opposed to interior-point methods). – sascha Apr 03 '18 at 21:25

0 Answers0