Take a shortest allowed simple graph path. If it does not use as an intermediate vertex, its length is at least . If it does, simplicity makes occur only once. Splitting there gives an -- path and a -- path whose intermediate vertices are in . Their lengths are at least the respective two minima. In either case,
For identical endpoints use the usual empty path of length zero.
An old shortest graph path is still allowed at stage , so . Concatenating shortest -- and -- paths gives a walk of length , but it may repeat vertices. Every repeated section is a closed walk. In the absence of negative-length cycles in a graph, each such closed walk has nonnegative length: decompose it into simple cycles. Removing these sections therefore produces an allowed simple graph path of no greater length. This proves the other upper bound. Together with part (a),
Initialize an array with and for . For , replace every entry in place by
This is the Floyd-Warshall algorithm. At the start of stage , the induction hypothesis is . During that stage, row and column do not change: and no negative cycle can lower it. Hence the operands remain the stage-start values even with in-place updates. Part (b) proves that after the stage every entry is . Induction gives all shortest path lengths after stage . The algorithm uses stored lengths and arithmetic operations, with only a fixed number of loop counters beyond the array.
Use four vertices, with lengths , , and every other non-loop arc of length . The two arcs between and form a negative-length cycle in a graph. For , , ,
The recurrence would give , by concatenating and . That walk repeats , so it is not a simple graph path. Every simple graph path from to still has length at least zero, attained by . Thus
a strict inequality in part (a).
For every perfect matching , each vertex occurs exactly once, so the feasibility inequalities give
If a perfect matching uses only tight edges, equality holds. It therefore attains a lower bound valid for every perfect matching, proving minimum cost. In a bipartite graph this is the weak duality and complementary slackness certificate for the assignment problem. The Hungarian algorithm maintains feasible row and column potentials and seeks a perfect matching among tight edges.
Begin with and the printed matching . Grow an alternating tree from unmatched row two. Its tight edge reaches column two, whose matched row is three. Thus the reached row set is and the reached column set is . Among unreached columns the reduced costs are from row two and from row three, so their minimum is two.
Increase by two and decrease by two. The new tight edge reaches an unmatched column. Augment along , replacing by . The matching becomes .
Now grow from unmatched row four. Edge reaches matched row one, and edge reaches unmatched column five. Augment along , replacing by . This yields
No further potential update is needed. The final potentials are and . Their reduced-cost matrix is
Every entry is nonnegative and every chosen entry is zero. The dual sum is , so part (a) certifies optimality.
Before a potential update, let be the reached rows and the reached columns in an alternating forest grown from unmatched rows. Every reached column is matched, or an augmentation would already have occurred, and its matched row is reached. Each tree has one more reached row than reached column, so .
The update amount is the smallest slack across . It is strictly positive because all zero-slack edges have already been explored, and the complete assignment problem guarantees that the set is nonempty before a perfect matching is found. Increasing for and decreasing for therefore increases the dual sum by
All feasibility inequalities remain valid by the definition of the minimum slack.

Articles by others on the same topic (0)

There are currently no matching articles.