So I’m trying to work my way through this paper, which is primarily about finding minimal dense subgraphs of a weighted graph (in the context of geometric constraint solving).
A dense subgraph is one where the sum of the edge weights and the sum of the vertex weights are equal.
The author explains that this is somehow equivalent to the max-flow algorithm, and so he proposes a variation on the standard max-flow algorithm which he says is more efficient for this problem. However I am not too familiar with the concepts and I’m finding the actual description very obtuse. Perhaps someone could help me with it?
The algorithm is stated as follows:


I’m terrible confused about what step 17 is supposed to be, where the flows are actually initialized, and how the augmentation process works.
The paper provides an example:

So I tried to step through the example, but I couldn’t get it to do what it’s supposed to. It seems like when it loops the first time, it visits e1, v0, and v2, and labels e0 and e2. Then it visits e0 and labels v2. Then it visits e2, but all of its vertices have already been visited, so the algorithm never does anything. How does it augment the path?
Thanks in advance.
where the flows are actually initialized They aren’t – an oversight by the authors. Assume for all e and v that fev is initially zero.
how the augmentation process works Step 17 is noticeably higher-level than the rest of the routine. Augmenting paths are a standard subtopic of maximum flow, which is covered by many undergraduate algorithms texts.
Let’s consider a flow problem where everything has weight 1.
I haven’t drawn
sandt. Let suppose that we’ve pushed one unit fromctob.The backward arc from
btocappears because, while we can’t send flow frombtocin an absolute sense, we can cancel the one unit going fromctob, which mathematically has the same effect. The maximum flow has value 2, which we realize by augmenting the patha -> b -> c -> d. That just means push one unit fromatob, cancel the one unit tobfromc, push one unit fromctod.Here’s some pseudocode for Step 17.
amountshould be the largest value that doesn’t cause any edge to produce more than its weight or any vertex to consume more than its weight.