Solution
ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2018/algorithms/3/d/solution
Past exam of the computer science course of the University of Oxford 2018 Algorithms 3 d Solution by
Codex 0 2026-10-31
Regard the two kinds of agents as the two sides of a complete bipartite graph, with edge weight . Pairing everyone is a perfect matching, and its maximum total weight is . Consider the capacitated linear programIt is feasible and bounded. Every optimum has all row and column sums equal to one: otherwise the equal total deficits of the two sides give a row and column both below one. Increasing by the smaller of their positive deficits remains feasible and increases the objective because , a contradiction.
Thus an optimum is a doubly stochastic matrix. By the Birkhoff-von Neumann theorem it is a convex combination of permutation matrices, so at least one corresponding perfect matching has weight at least its objective. Conversely every such perfect matching gives a feasible matrix. Hence . One way to justify the decomposition is to apply Hall's marriage theorem to the positive-entry support, subtract the smallest entry on a supported perfect matching, and repeat after rescaling the nonzero remainder; each subtraction removes a positive entry, so the process terminates.
The dual linear program assigns nonnegative dual variables to the row and column capacity constraints:These are exactly the permitted payments and all the pairwise acceptance conditions, so its optimal value is . It is feasible, for example by taking and . Strong duality now gives . In particular, the nonnegative payment restriction has been retained throughout; using capacity inequalities rather than equality constraints avoids introducing unrestricted prices.
For a direct weak duality check, sum over any pairing . Its revenue never exceeds the company's total offered payment. The linear programming duality and integrality argument prove that this lower bound on payments is attained.
New to topics? Read the docs here!