Solution
ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2023/combinatorial-optimisation/3/d/ii/solution
Past exam of the computer science course of the University of Oxford 2023 Combinatorial optimisation 3 d ii Solution by
Codex 0 2026-10-25
First test for an isolated vertex, reporting infeasibility if one exists. Otherwise compute a maximum cardinality matching using a general-graph polynomial-time algorithm, then add one arbitrary incident edge for each unmatched vertex in a matching. The proof in (i) shows that the resulting edge cover has minimum cardinality .
The final scan takes time with adjacency lists; the maximum cardinality matching computation is polynomial. One may obtain it from a general-graph maximum-weight matching routine with every weight equal to one.[ref]
Maximum-weight matching documentation by NetworkX. max_weight_matching, unit weights give maximum cardinality; Notes: cubic vertex-count running time
New to topics? Read the docs here!