Subfield: Combinatorics


Question: In each town in ARMLandia, the residents have formed groups, which meet each week to share math problems and enjoy each others' company over a potluck-style dinner. Each town resident belongs to exactly one group. Every week, each resident is required to make one dish and to bring it to his/her group.

It so happens that each resident knows how to make precisely two dishes. Moreover, no two residents of a town know how to make the same pair of dishes. Shown below are two example towns. In the left column are the names of the town's residents. Adjacent to each name is the list of dishes that the corresponding resident knows how to make.

| ARMLton |  |
| :--- | :--- |
| Resident | Dishes |
| Paul | pie, turkey |
| Arnold | pie, salad |
| Kelly | salad, broth |


| ARMLville |  |
| :--- | :--- |
| Resident | Dishes |
| Sally | steak, calzones |
| Ross | calzones, pancakes |
| David | steak, pancakes |

The population of a town $T$, denoted $\operatorname{pop}(T)$, is the number of residents of $T$. Formally, the town itself is simply the set of its residents, denoted by $\left\{r_{1}, \ldots, r_{\mathrm{pop}(T)}\right\}$ unless otherwise specified. The set of dishes that the residents of $T$ collectively know how to make is denoted $\operatorname{dish}(T)$. For example, in the town of ARMLton described above, pop(ARMLton) $=3$, and dish(ARMLton) $=$ \{pie, turkey, salad, broth\}.

A town $T$ is called full if for every pair of dishes in $\operatorname{dish}(T)$, there is exactly one resident in $T$ who knows how to make those two dishes. In the examples above, ARMLville is a full town, but ARMLton is not, because (for example) nobody in ARMLton knows how to make both turkey and salad.

Denote by $\mathcal{F}_{d}$ a full town in which collectively the residents know how to make $d$ dishes. That is, $\left|\operatorname{dish}\left(\mathcal{F}_{d}\right)\right|=d$.

In order to avoid the embarrassing situation where two people bring the same dish to a group dinner, if two people know how to make a common dish, they are forbidden from participating in the same group meeting. Formally, a group assignment on $T$ is a function $f: T \rightarrow\{1,2, \ldots, k\}$, satisfying the condition that if $f\left(r_{i}\right)=f\left(r_{j}\right)$ for $i \neq j$, then $r_{i}$ and $r_{j}$ do not know any of the same recipes. The group number of a town $T$, denoted $\operatorname{gr}(T)$, is the least positive integer $k$ for which there exists a group assignment on $T$.

For example, consider once again the town of ARMLton. A valid group assignment would be $f($ Paul $)=f($ Kelly $)=1$ and $f($ Arnold $)=2$. The function which gives the value 1 to each resident of ARMLton is not a group assignment, because Paul and Arnold must be assigned to different groups.


For a dish $D$, a resident is called a $D$-chef if he or she knows how to make the dish $D$. Define $\operatorname{chef}_{T}(D)$ to be the set of residents in $T$ who are $D$-chefs. For example, in ARMLville, David is a steak-chef and a pancakes-chef. Further, $\operatorname{chef}_{\text {ARMLville }}($ steak $)=\{$ Sally, David $\}$.


If $\operatorname{gr}(T)=\left|\operatorname{chef}_{T}(D)\right|$ for some $D \in \operatorname{dish}(T)$, then $T$ is called homogeneous. If $\operatorname{gr}(T)>\left|\operatorname{chef}_{T}(D)\right|$ for each dish $D \in \operatorname{dish}(T)$, then $T$ is called heterogeneous. For example, ARMLton is homogeneous, because $\operatorname{gr}($ ARMLton $)=2$ and exactly two chefs make pie, but ARMLville is heterogeneous, because even though each dish is only cooked by two chefs, $\operatorname{gr}($ ARMLville $)=3$.


A resident cycle is a sequence of distinct residents $r_{1}, \ldots, r_{n}$ such that for each $1 \leq i \leq n-1$, the residents $r_{i}$ and $r_{i+1}$ know how to make a common dish, residents $r_{n}$ and $r_{1}$ know how to make a common dish, and no other pair of residents $r_{i}$ and $r_{j}, 1 \leq i, j \leq n$ know how to make a common dish. Two resident cycles are indistinguishable if they contain the same residents (in any order), and distinguishable otherwise. For example, if $r_{1}, r_{2}, r_{3}, r_{4}$ is a resident cycle, then $r_{2}, r_{1}, r_{4}, r_{3}$ and $r_{3}, r_{2}, r_{1}, r_{4}$ are indistinguishable resident cycles.
Let $T$ be a town such that, for each $D \in \operatorname{dish}(T),\left|\operatorname{chef}_{T}(D)\right|=2$.

Prove that there are finitely many resident cycles $C_{1}, C_{2}, \ldots, C_{j}$ in $T$ so that each resident belongs to exactly one of the $C_{i}$.

Solution:
First note that the condition $\left|\operatorname{chef}_{T}(D)\right|=2$ for all $D$ implies that $\operatorname{pop}(T)=|\operatorname{dish}(T)|$, using the equation from problem 5 . So for the town in question, the population of the town equals the number of dishes in the town. Because no two chefs cook the same pair of dishes, it is impossible for such a town to have exactly two residents, and because each dish is cooked by exactly two chefs, it is impossible for such a town to have only one resident.

The claim is true for towns of three residents satisfying the conditions: such towns must have one resident who cooks dishes $d_{1}$ and $d_{2}$, one resident who cooks dishes $d_{2}$ and $d_{3}$, and one resident who cooks dishes $d_{3}$ and $d_{1}$, and those three residents form a cycle. So proceed by (modified) strong induction: assume that for some $n>3$ and for all positive integers $k$ such that $3 \leq k<n$, every town $T$ with $k$ residents and $\left|\operatorname{chef}_{T}(D)\right|=2$ for all $D \in \operatorname{dish}(T)$ can be divided into a finite number of resident cycles such that each resident belongs to exactly one of the cycles. Let $T_{n}$ be a town of $n$ residents, and arbitrarily pick resident $r_{1}$ and dishes $d_{1}$ and $d_{2}$ cooked by $r_{1}$. Then there is exactly one other resident $r_{2}$ who also cooks $d_{2}$ (because $\left|\operatorname{chef}_{T_{n}}\left(d_{2}\right)\right|=2$ ). But $r_{2}$ also cooks another dish, $d_{3}$, which is cooked by another resident, $r_{3}$. Continuing in this fashion, there can be only two outcomes: either the process exhausts all the residents of $T_{n}$, or there exists some resident $r_{m}, m<n$, who cooks the same dishes as $r_{m-1}$ and $r_{\ell}$ for $\ell<m-1$.

In the former case, $r_{n}$ cooks another dish; but every dish besides $d_{1}$ is already cooked by two chefs in $T_{n}$, so $r_{n}$ must also cook $d_{1}$, closing the cycle. Because every resident is in this cycle, the statement to be proven is also true for $T_{n}$.

In the latter case, the same logic shows that $r_{m}$ cooks $d_{1}$, also closing the cycle, but there are other residents of $T_{n}$ who have yet to be accounted for. Let $C_{1}=\left\{r_{1}, \ldots, r_{m}\right\}$, and consider the town $T^{\prime}$ whose residents are $T_{n} \backslash C_{1}$. Each of dishes $d_{1}, \ldots, d_{m}$ is cooked by two people in $C_{1}$, so no chef in $T^{\prime}$ cooks any of these dishes, and no dish in $T^{\prime}$ is cooked by any of the people in $C_{1}$ (because each person in $C_{1}$ already cooks two dishes in the set $\operatorname{dish}\left(C_{1}\right)$ ). Thus $\left|\operatorname{chef}_{T^{\prime}}(D)\right|=2$ for each $D$ in $\operatorname{dish}\left(T^{\prime}\right)$. It follows that $\operatorname{pop}\left(T^{\prime}\right)<\operatorname{pop}(T)$ but $\operatorname{pop}\left(T^{\prime}\right)>0$, so by the inductive hypothesis, the residents of $T^{\prime}$ can be divided into disjoint resident cycles.

Thus the statement is proved by strong induction.