MAS334 Combinatorics

12. Extensions and applications

Suppose we have a job allocation problem as before, but the number of jobs is smaller than the number of people, so that not everyone will get a job. Suppose that there are some enthusiastic people who really want a job, and some other people who do not care so much. Can we arrange a job allocation in which every enthusiastic person gets a job? Obviously this will be easier if every job has many enthusiastic candidates. We can give a precise result as follows.

Theorem 12.1.

Consider a job allocation problem with a set A of people and a set B of jobs such that |A||B|. Suppose we are also given a subset EA of enthusiastic people. Suppose that for each subset VB we have

  • (a)

    |CV||V| (so V is plausible, as in Definition 11.2)

  • (b)

    |ECV||V|+|E|-|B|.

Then there is a matching M which allocates all the jobs, in such a way that all the enthusiastic people get a job.

Proof of Theorem 12.1.

Imagine a set B of additional fake jobs that can only be done by unenthusiastic people (watching TV, lying on the beach and so on). The number of additional jobs should be |B|=|A|-|B|, so that the set B*=BB has |B*|=|A|. We declare that all the unenthusiastic people are qualified for all of the jobs in B, and that none of the enthusiastic people are qualified. This gives a new job allocation problem, with candidate sets CU*A for UB* say. We claim that this extended problem is still plausible, or in other words that |CU*||U| for all UB*. Indeed, we can write U as VV, where VB is a set of real jobs and VB is a set of fake jobs. If V is empty then U=V and the candidate set is the same as before, i.e. CU*=CU=CV, so |CU*|=|CU||U| by condition (a) in the statement of the theorem. Suppose instead that V, so U contains at least one fake job, so all unenthusiastic people are candidates for U, as well as the real candidates for all the real jobs in U. In symbols, we have CU*=CV(AE). We claim that |CU*|=|A|-|E|+|ECV|. To see this, consider the following Venn diagram:

The shaded region is CU*=CV(AE) We have |A|=n0+n1+n2+n3 and |E|=n2+n3 and |ECV|=n3 and |CU*|=n0+n1+n3; the claim is clear from this. We also have |ECV||V|+|E|-|B| by our original assumptions, so

|CU*||V|+|E|-|B|+|A|-|E|=|V|+|A|-|B|.

On the other hand, we have U=VV with VB and |B|=|A|-|B| so |V||A|-|B| so |U|=|V|+|V||V|+|A|-|B|. Putting this together, we get |CU*||U| as required. This proves that our new allocation problem is plausible, so Hall’s Theorem tells us that there is a solution, say M*. This allocates all the real jobs and all the fake jobs. As |B*|=|A|, we see that everyone gets a job (either real or fake) for which they are qualified. The enthusiastic people are not qualified for the fake jobs, so they must all be allocated a real job. Thus, if we just ignore the fake jobs, we have a solution to the original problem in which every enthusiastic person is employed. ∎

For later use, it will be convenient to reformulate condition (b) of the theorem slightly.

Lemma 12.2.

In the context of Theorem 12.1, the condition |ECU||U|+|E|-|B| is equivalent to |ECU||BU|.

Proof.

E is the disjoint union of the sets ECU and ECU, so |ECU|=|E|-|ECU|. Also, it is clear that |BU|=|B|-|U|. Thus, the condition |ECU||BU| is equivalent to |E|-|ECU||B|-|U|, and this can be rearranged as |ECU||U|+|E|-|B|. ∎

Remark 12.3.

After this reformulation, it becomes clear that condition (b) is necessary as well as sufficient. Indeed, the people in ECU need to be given jobs (because they are enthusiasts) but they cannot be given jobs from U (because they are unqualified) so they need to be given jobs from BU. This will be impossible unless |ECU||BU|.

In the above results, we have repeatedly used the column/candidate sets:

Cb={ people who are qualified for job b}.

Recall that we also defined the row sets:

Ra={ jobs that person a can do }.

Video (Proposition 12.4 and Corollary 12.5)

Proposition 12.4.

Suppose that there is a constant d>0 such that

  • (a)

    For every job b we have |Cb|d, so every job has at least d candidates.

  • (b)

    For every person a we have |Ra|d, so no person is qualified for more than d jobs.

Then the matching problem is plausible, and so has a solution by Hall’s Theorem.

Proof.

Consider a subset UB; we must show that |CU||U|. We will consider a set X, which we can describe in three different ways:

X ={(a,b)A×U|a is qualified for b}
={(a,b)|aA and bRaU}
={(a,b)|bU and aCb}.

A moment’s thought should convince you that these are three ways of saying the same thing. From the third description of X, we get

|X|=bU|Cb|bUd=d|U|.

On the other hand, the second description gives

|X|=aA|RaU|.

If aCU then a is not qualified for any of the jobs in U so RaU=, so the corresponding term is zero. On the other hand, if aCU then we have |RaU||Ra|d. We therefore have

|X|=aCU|RaU|aCUd=d|CU|.

By putting these inequalities together, we get d|CU|d|U|. As d>0, we can divide by d to get |CU||U|, as required. ∎

Corollary 12.5.

Suppose that there is a constant d>0 such that

  • (a)

    For every job b we have |Cb|=d, so every job has precisely d candidates.

  • (b)

    For every person a we have |Ra|d, so no person is qualified for more than d jobs.

We will say that a person a is talented if |Ra|=d. Then there is a job allocation in which every talented person has a job.

Proof.

Let TA be the set of talented people. Proposition 12.4 is still applicable, so we know that every subset UB is plausible, i.e. |CU||U|. By Hall’s Theorem, this implies that the job allocation problem is solvable. However, it does not guarantee that the allocation can be arranged so that everyone in T gets a job. For that, we need to check the additional criterion in Theorem 12.1, which is |TCU||U|+|T|-|B|. Now |TCU|=|T|-|TCU|, so the required inequality is equivalent to |T|-|TCU||U|+|T|-|B| or |TCU||B|-|U|=|BU|. For this, we let Y be the set of pairs (a,b) such that a is talented and qualified for b, but a is not qualified for any job in U. This ensures that b cannot be in U, so bBU. Once we have chosen b, we can try to choose a; this must in particular be an element of Cb, and |Cb|d, so there are at most d choices for a. This analysis gives |Y|d|BU|. Alternatively, we can start by choosing a. This can be any element of TCU, and then b can be any of the jobs for which a is qualified. As a is talented, there are precisely d choices for b. This analysis gives |Y|=d|TCU|. Putting these together, we get d|TCU|d|BU|. As d>0 this gives |TCU||BU| as required. ∎

We now give another theorem that is mathematically equivalent to Hall’s Theorem, but thinly disguised.

Definition 12.6.

Suppose we have a list of finite sets A1,,Ar. A transversal is a list of elements a1,,ar such that aiAi for all i, and the elements ai are all different. The list is plausible if for every sequence of indices i1<i2<<ikr, we have

|Ai1Ai2Aik|k.

The phrase distinct set of representatives means the same as transversal.

Example 12.7.

Consider the following list:

A1={1,3}  A2={2,3}  A3={1,3,4,5}  A4={2,4,6}  A5={1,5}  A6={1,2}.

The following choices give a transversal:

a1=1  a2=3  a3=4  a4=6  a5=5  a6=2.
Proposition 12.8.

There exists a transversal iff the list is plausible.

Proof.

Put A=A1Ar and B={1,,r}. Define

E={(a,i)A×B|aAi}A×B;

this gives a matching problem with candidate sets Ci=Ai. Thus, if U={i1,,ik} with i1<<ik, we have CU=Ai1Aik. This makes it clear that the list A1,,Ar is plausible (according to Definition 12.6) iff the matching problem E is plausible (according to Definition 11.2). Also, Hall’s Theorem (together with Lemma 11.5) tells us that the matching problem is plausible iff there exists a full matching. If M is a full matching, then it assigns each iB to some element aiAi, in such a way that a1,,ar are all different, so we have a transversal. This construction gives a bijection between full matchings and transversals, so in particular, a transversal exists iff a full matching exists. Putting all this together, we see that a transversal exists iff the list of sets is plausible. ∎

Example 12.9.

Consider the following list:

A1={1,2,3}  A2={2,3}  A3={3,5,7}  A4={1,2}  A5={1,2,3}  A6={4,5,6}.

We note that

|A1A2A4A5|=|{1,2,3}|=3.

Here we have taken 4 of the sets, and their union only has size 3, which violates the plausibility condition. Thus, there is no transversal.

We now consider a version of the job allocation problem in which jobs can require a team of several workers.

Video (Definition 12.10 to Proposition 12.13)

Definition 12.10.

A team allocation problem consists of a set A of people, a set B of jobs, a set EA×B of pairs (a,b) where person a is qualified for job b, and numbers mb0 for each bB. The problem is to choose a team TbA for each job b, with |Tb|=mb, such that each person in Tb is qualified to do job b, and the sets Tb are disjoint (so that no one has to do more than one job).

Definition 12.11.

For any subset UB, we define mU=bUmb (so mU is the total number of people required for all the jobs in U). We say that U is plausible if |CU|mU. We say that the whole team allocation problem is plausible if every subset UB is plausible.

Remark 12.12.

Suppose we have solved the team allocation problem, by choosing a team Tb for each job b. Then CU contains bUTb, and the sets Tb are disjoint and have size mb, so |bUTb|=bUmb=mU, so |CU|mU. Thus, if the team allocation is solvable, then it is plausible. By the contrapositive, if the problem is not plausible, then there is no solution.

It is not hard to analyse the team allocation problem by converting it into an ordinary allocation problem of the type that we have considered already. We just imagine making a set of badges, labelled by elements of the set

B*={(b,i)|bB, 1imb}.

For example, if we need 5 bakers, we make badges marked Baker 1 up to Baker 5. We then put

E*={(a,(b,i))A×B*|(a,b)E},

corresponding to the idea that a is qualified to wear badge (b,i) iff a is qualified to do job b. Now the problem of choosing teams is equivalent to the problem of assigning badges. Using this, we can prove the following result.

Proposition 12.13.

If a team allocation problem is plausible, then it is solvable.

Proof.

Consider a plausible team allocation problem (A,B,E,m) as before, and the corresponding badge allocation problem (A,B*,E*). As we have explained, it will be enough to prove that the badge allocation problem is solvable. By Hall’s theorem, it will be enough to show that the badge allocation problem is plausible. Consider a subset UB*; we must show that |CU*||U|. Put

V={b|(b,i)U for some i}.

In other words, U is a set of badges, and V is the set of job titles that appear on at least one of those badges. Now put

V*={(b,j)|bV, 1jmb}.

In other words, V* is the set of badges that share a job title with one of the badges in U, so UV*, so |U||V*|. It is clear that |V*|=bVmb=mV, so the relation |U||V*| becomes |U|mV. The team allocation problem is assumed to be plausible, which implies that mV|CV|. On the other hand, a person is qualified for one of the badges in U iff they are qualified for one of the jobs in V, so CV=CU*. Putting this together, we get |U||CU*| as required. ∎