其他分享
首页 > 其他分享> > 二分图完全匹配 不完全匹配 / linear_sum_assignment 详解

二分图完全匹配 不完全匹配 / linear_sum_assignment 详解

作者:互联网

https://jack.valmadre.net/notes/2020/12/08/non-perfect-linear-assignment/

\(G = (U,V,E)\)

\[\begin{bmatrix} \infty & 3 & -1 \\ \infty & 5 & \infty \\ 2 & -3 & 0 \\ \end{bmatrix}\]

In a matching problem, there will be \(\nu\) chosen edges.

\[0<\nu<=r \]

Balanced

Balanced means \(r = n\)

two subsets have equal cardinality

Perfect/Complete Matching

note that the problem is not actuallysolved using a general-purpose ILP(integer linear programming) solver, it is just a convenient framework in which to express the problem

Perfect/Complete matching = every vertex has a match

The constraint that the sum of each row and column is equal to one ensures that each element has exactly one match.

Unbalanced

assume \(r < n\)

an unbalanced probem cannot have a perfect matching, since there will be at least \(n-r\) unmatched elements in the larger set.

One-sided Perfect Matching

One-sided Perfect Matching = every vertex in the smaller set has a match.

In one-sided perfect matching, \(\nu = r < n\)

What if there is no perfect matching?

Imperfect Matching(with given edge number)

- when there does not exist a (one-sided)perfect matching.

when \(\nu < r\), i.e. one-sided perfect matching cannot be achieved due to the lack of edges, all possible matchings are imperfect/incomplete.

[Note

标签:perfect,Perfect,匹配,linear,assignment,edges,nu,cost,matching
来源: https://www.cnblogs.com/zxyfrank/p/16157125.html