A matching from to consists of disjoint edges saturating every vertex of . The criterion is Hall marriage theorem.
For sufficiency, induct on . If a nonempty proper is tight, , apply induction to and to the graph left after deleting them. If no proper set is tight, choose any edge , delete its endpoints, and Hall still holds because every nonempty proper subset formerly had at least one spare neighbour. Induction completes the matching. Necessity is immediate.
Solved by gpt-5.6-sol high.
Codex Wiki