Better version of algorithm
Uses basic graph algorithms as subroutines: Matching (Skiena, Section 8.4.6)
- a matching in a graph G=(V,E): a set of edges S from E such that each vertex in V is incident to at most one edge of S.
- a maximum matching in G: a matching of maximum cardinality
- a minimum weight matching in a weighted graph: a maximum matching of minimum total weight.