[Help] Modify Label in 316C2 Max Flow Min Cost

Revision en1, by Libraion, 2021-04-06 19:41:01

In problem 316C2, the solution is to find Max Flow Min Cost of the constructed graph.

Skimming through some fastest submissions, I noticed that there is a function called modify_label that replaced SPFA to find shortest path in normal MFMC. Here is one of those submisions.

And this modify_label only cost $$$O(|V| + |E|)$$$ complexity, result in small overall complexity. I think this has some relation with Johnson's algorithm.

Please someone explained it to me how this function works and how this is applicable with this problem. Thanks :<.

Tags mcmf, modify label

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Libraion 2021-04-06 19:41:01 710 Initial revision (published)