Maths Olympiad Prep

Library / /64 of 84

, 2014

Combinatorics Difficulty 5.7 AIME, harder Prove it United States

Problem:

There are nn girls G1,,GnG_{1}, \ldots, G_{n} and nn boys B1,,BnB_{1}, \ldots, B_{n}. A pair (Gi,Bj)(G_{i}, B_{j}) is called suitable if and only if girl GiG_{i} is willing to marry boy BjB_{j}. Given that there is exactly one way to pair each girl with a distinct boy that she is willing to marry, what is the maximal possible number of suitable pairs?

Solution

Solution:

Answer: n(n+1)2\frac{n(n+1)}{2}

We represent the problem as a graph with vertices G1,,Gn,B1,,BnG_{1}, \ldots, G_{n}, B_{1}, \ldots, B_{n} such that there is an edge between vertices GiG_{i} and BjB_{j} if and only if (Gi,Bj)(G_{i}, B_{j}) is suitable, so we want to maximize the number of edges while having a unique matching.

We claim the answer is n(n+1)2\frac{n(n+1)}{2}. First, note that this can be achieved by having an edge between GiG_{i} and BjB_{j} for all pairs jij \leq i, because the only possible matching in this case is pairing GiG_{i} with BiB_{i} for all ii.

To prove that this is maximal, we first assume without loss of generality that our unique matching consists of pairing GiG_{i} with BiB_{i} for all ii, which takes nn edges. Now, note that for any i,ji, j, at most one of the two edges GiBjG_{i} B_{j} and GjBiG_{j} B_{i} can be added, because if both were added, we could pair GiG_{i} with BjB_{j} and GjG_{j} with BiB_{i} instead to get another valid matching. Therefore, we may add at most (n2)1=n(n1)2\binom{n}{2} \cdot 1 = \frac{n(n-1)}{2} edges, so the maximal number of edges is n+n(n1)2=n(n+1)2n + \frac{n(n-1)}{2} = \frac{n(n+1)}{2} as desired.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.