Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2025/ii/paper-2/17f/a/solution

A matching from to is a set of pairwise vertex-disjoint edges that covers every vertex of . Equivalently, it chooses for each a distinct neighbour in .
Hall marriage theorem says that such a matching exists if and only if
Necessity is immediate: the distinct partners of the vertices in all belong to .
For sufficiency, induct on . The claim is clear when . First suppose every nonempty proper satisfies the strict inequality . Choose an edge and delete and . For , deletion removes at most one neighbour, so
Induction gives a matching of , and adding completes it.
Otherwise there is a nonempty proper with . Hall's condition holds in the bipartite graph induced by , so induction matches onto . For ,
and hence has at least neighbours outside . Induction therefore matches into . The two matchings are disjoint and together cover .

New to topics? Read the docs here!