Consider the following problem:
A town has r residents R1,...,Rr; q clubs C1,...,Cq;
and p political parties P1,...,Pp.
Each resident is a member of at least one club and belong to exactly
one political party. Each club must nominate
one of its members to represent it on the town's governing council so that the
number of council members belonging
to the political party Pk is at most uk (for given u1,...,up).
It is not ok for two or more clubs to nominate the same person.
The problem is to determine whether it is possible to
find a council that satisfies this "balancing" property.
Given r, R1,...Rr,q,C1,...Cq,p,P1,...,Pp,u1,...up,
show how to solve this problem by solving a single max flow problem.