GitHub

Original file line numberDiff line numberDiff line change

@@ -1731,6 +1731,10 @@ The dual solution $(u,v)$ of $W_D$ can be interpreted as equilibrium utilities o

17311731
17321732

{cite}`boerma2023composite` propose an efficient method to compute the dual variables from the optimal matching (primal solution) in the case of composite sorting.

17331733
1734+

Their approach relies on *Complementary Slackness*: given a primal solution $\mu$, $(\phi , \psi) $ is a dual solution if and only if for all $x \in X$ and $y \in Y$

1735+

* $\phi_x + \psi_y \leq c_{xy}$ (dual feasibility),

1736+

* $\phi_x + \psi_y = c_{xy}$ if $\mu_{xy}>0$ (complementary slackness).

1737+
17341738

Let's generate an instance and compute the optimal matching.

17351739
17361740

```{code-cell} ipython3

Read the original on github.com ↗