1
0
Fork 0

Slightly rephrase docstring

This commit is contained in:
Joris van Rantwijk 2023-02-13 22:38:40 +01:00
parent 118007e953
commit f0624fa2a5
1 changed files with 5 additions and 8 deletions

View File

@ -100,9 +100,6 @@ def adjust_weights_for_maximum_cardinality_matching(
The graph is specified as a list of edges, each edge specified as a tuple
of its two vertices and the edge weight.
Vertices are indexed by consecutive, non-negative integers, such that
the first vertex has index 0 and the last vertex has index (n-1).
Edge weights may be integers or floating point numbers.
Negative edge weights are allowed.
@ -112,11 +109,11 @@ def adjust_weights_for_maximum_cardinality_matching(
- The minimum edge weight is at least "n" times the difference between
maximum and minimum edge weight.
These conditions ensure that a maximum-cardinality matching will be found:
The weight of any non-maximum-cardinality matching can be increased by
matching an additional edge, even if the new edge has minimum edge weight
and causes all other matched edges to degrade from maximum to minimum
edge weight.
These conditions ensure that a maximum-cardinality matching will be found.
Proof: The weight of any non-maximum-cardinality matching can be increased
by matching an additional edge, even if the new edge has minimum edge
weight and causes all other matched edges to degrade from maximum to
minimum edge weight.
Since we are only considering maximum-cardinality matchings, increasing
all edge weights by an equal amount will not change the set of edges