Skip to content

Commit d6bc9bc

Browse files
alemini18adamant-pwn
authored andcommitted
modify section 'connection to successive shortest path algorithm'
1 parent 8e7fda5 commit d6bc9bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/graph/hungarian-algorithm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ For every step of the main algorithm:
251251
- Use [Dijkstra](dijkstra.md)'s algorithm to find the shortest-paths subgraph of the original network.
252252
- Update potentials for the next iteration.
253253

254-
Given this description, we can observe that there is a strong analogy between $h(v)$ and potentials. It can be shown that, after reweighting, the set of all zero-weight edges represents the shortest-path subgraph where the main algorithm tries to increase the flow. This also happens in the Hungarian algorithm: we create a subgraph made of rigid edges (the ones for which the quantity $A[i][j]-u[i]-v[j]$ is zero), and we try to increase the size of the matching.
254+
Given this description, we can observe that there is a strong analogy between $h(v)$ and potentials: it can be checked that they are equal up to a constant offset. In addition, it can be shown that, after reweighting, the set of all zero-weight edges represents the shortest-path subgraph where the main algorithm tries to increase the flow. This also happens in the Hungarian algorithm: we create a subgraph made of rigid edges (the ones for which the quantity $A[i][j]-u[i]-v[j]$ is zero), and we try to increase the size of the matching.
255255

256256
In step 4, all the $h(v)$ are updated: every time we modify the flow network, we should guarantee that the distances from the source are correct (otherwise, in the next iteration, Dijkstra's algorithm might fail). This sounds like the update performed on the potentials, but in this case, they are not equally incremented.
257257

0 commit comments

Comments
 (0)