ID-5-02 (TO) · Mathematical Foundations of Diffusion Models · Transport demo
Two histograms over the same four bins. Moving one onto the other is a min-cost flow on a bipartite graph — and the answer you get depends entirely on what you decided moving costs.
The top bar is the source histogram p, split into bins A–D; the bottom bar is the target q. A transport plan γ says how much mass moves from each bin to each other bin. The ribbons are that plan. Their widths are forced to add up: everything leaving bin i totals p i, everything arriving at bin j totals q j — which is exactly the statement that γ is a coupling of p and q.
Among all such plans the lab shows the cheapest one for the cost you pick. Watch the ribbons cross, or refuse to.
cost matrix Cij
optimal plan γij
The bins, the histograms and the constraints are all fixed. The only thing that varies below is the price of moving one unit of mass from bin i to bin j. Each row re-solves the same problem under a different price list.
Transport is not one number. "How far apart are these two histograms?" has no answer until you say what it costs to move mass, and that choice is modelling, not mathematics. Pick the ground distance and you have picked the geometry: the same pair of histograms can be close under one price list and far under another, and can be matched monotonically under one and scrambled under the next.