Minimum Cost Perfect Matching
Abstract
This is pseudocode for Minimum Cost Perfect Matching in Bipartite Graphs
.3
{ } \SetAlgoNoEnd\SetAlgoNoLine
InputInput\SetKwInOutOutputOutput \InputGraph = (,) with bipartition , where || = || and costs c. \OutputA minimum cost perfect matching or a deficient set
(1) |
for all B
\WhileConstruct graph with vertices and edges
(2) |
has perfect matching
stop ( is a minimum cost perfect matching of )
Let be a deficient set for B
\uIfall edges of with an endpoint in have an endpoint in (S)
stop ( is a deficient set of G)
(3) |
(4) |