General · Networks · assignment optimisation

Hungarian algorithm — optimum assignment

Row and column reduction, then cover zeros with the fewest lines — each step keeps the same optimal matching while simplifying the matrix.

Original costs

Steps so far

This original stays put. Press Next — each new reduced matrix appears above the buttons.

Ready — press Next to begin row reduction.

Bipartite view

Problem

Working

Picking smallest costs independently can fail — the Hungarian method guarantees an optimum one-to-one assignment.