Minimum-Weight Perfect Matching¶
Definition¶
In the CPP construction, a minimum-weight perfect matching pairs the odd-degree vertices so that each belongs to exactly one pair and the sum of pair costs is minimized. The cost of a pair is its shortest-path distance. With a binary variable for each unordered pair,
Interpretation¶
The matching decides which odd vertices should be linked by duplicated paths in the Chinese postman construction. Each odd vertex needs exactly one partner, and the total extra length should be as small as possible.
The left panel gives the shortest-path distances between the four odd vertices . Four vertices can be paired in three ways: costs , costs , and costs . The middle panel shows the cheapest pairing, of weight 9.
Perfect means that every odd vertex lies in exactly one pair; this is the constraint that sets the sum of the variables at vertex equal to . Minimum-weight refers to the objective . A perfect matching always exists here, because the number of odd-degree vertices is even (see vertex degree). Each pair cost is a shortest-path distance rather than the length of a direct edge, since the duplicated route may pass through other vertices.
Pairing must be optimized jointly, since a locally cheap pair may leave expensive remaining pairs. On a line with edge lengths , taking the closest pair first (cost 1) forces with (cost 5), a total of 6, whereas costs . This is why the choice is written as a binary integer program, as in the Definition. Matchings return later in the course with two separate groups of vertices, in bipartite matching.
Key Results¶
- Each pair variable is binary.
- For four odd vertices there are three complete pairings to compare.
- This is a nonbipartite matching problem because the vertices are not separated into two assignment groups.
Examples¶
For the illustrated four odd vertices, the alternative pairing costs 13. The minimum-cost pairing determines which shortest paths are duplicated in the CPP construction.
- The pairings AB/DE, AD/BE, and AE/BD cost 8, 7, and 8.
- The optimum selects .
Prerequisites¶
Related Concepts¶
Sources¶
- OR Modelling · Week 4
Aliases: minimum-cost perfect matching Symbols: sum
Last updated: 22 October 2026 19:04
Minimum-Weight Perfect MatchingChinese Postman ProblemBinary Integer ProgramVertex DegreeShortest Path ProblemBipartite Matching