-
Notifications
You must be signed in to change notification settings - Fork 857
Description
The Gomoru-Hu tree implementation cites the paper "Very simple methods for all pairs network flow analysis", which starts off by describing a simple algorithm to compute an equivalent-flow tree, which is what GomoryHu.h implements. This is not a Gomory-Hu tree. As the paper explains, all Gomory-Hu trees are equivalent-flow trees, but not vice versa. The equivalent-flow tree is fine if you just want the flow values, but if you actually need to recover the cuts it doesn't work.
Fixing the code to actually compute a Gomory-Hu tree is easy - it only requires adding a couple of additional lines to make it match the "CUT TREE PROGRAM MGH" from section 3.2 of the paper. Asymptotic running time is not affected.
If desired, I would be happy to author a PR with this change.