Subfield: Combinatorics


Question: Snow White and the Seven Dwarves are living in their house in the forest. On each of 16 consecutive days, some of the dwarves worked in the diamond mine while the remaining dwarves collected berries in the forest. No dwarf performed both types of work on the same day. On any two different (not necessarily consecutive) days, at least three dwarves each performed both types of work. Further, on the first day, all seven dwarves worked in the diamond mine.

Prove that, on one of these 16 days, all seven dwarves were collecting berries.

Solution:
We define $V$ as the set of all 128 vectors of length 7 with entries in $\{0,1\}$. Every such vector encodes the work schedule of a single day: if the $i$-th entry is 0 then the $i$-th dwarf works in the mine, and if this entry is 1 then the $i$-th dwarf collects berries. The 16 working days correspond to 16 vectors $d_{1}, \ldots, d_{16}$ in $V$, which we will call dayvectors. The condition imposed on any pair of distinct days means that any two distinct day-vectors $d_{i}$ and $d_{j}$ differ in at least three positions.

We say that a vector $x \in V$ covers some vector $y \in V$, if $x$ and $y$ differ in at most one position; note that every vector in $V$ covers exactly eight vectors. For each of the 16 day-vectors $d_{i}$ we define $B_{i} \subset V$ as the set of the eight vectors that are covered by $d_{i}$. As, for $i \neq j$, the day-vectors $d_{i}$ and $d_{j}$ differ in at least three positions, their corresponding sets $B_{i}$ and $B_{j}$ are disjoint. As the sets $B_{1}, \ldots, B_{16}$ together contain $16 \cdot 8=128=|V|$ distinct elements, they form a partition of $V$; in other words, every vector in $V$ is covered by precisely one day-vector.

The weight of a vector $v \in V$ is defined as the number of 1-entries in $v$. For $k=0,1, \ldots, 7$, the set $V$ contains $\left(\begin{array}{l}7 \\ k\end{array}\right)$ vectors of weight $k$. Let us analyse the 16 dayvectors $d_{1}, \ldots, d_{16}$ by their weights, and let us discuss how the vectors in $V$ are covered by them.

1. As all seven dwarves work in the diamond mine on the first day, the first day-vector is $d_{1}=(0000000)$. This day-vector covers all vectors in $V$ with weight 0 or 1.
2. No day-vector can have weight 2 , as otherwise it would differ from $d_{1}$ in at most two positions. Hence each of the $\left(\begin{array}{l}7 \\ 2\end{array}\right)=21$ vectors of weight 2 must be covered by some day-vector of weight 3 . As every vector of weight 3 covers three vectors of weight 2 , exactly $21 / 3=7$ day-vectors have weight 3 .
3. How are the $\left(\begin{array}{l}7 \\ 3\end{array}\right)=35$ vectors of weight 3 covered by the day-vectors? Seven of them are day-vectors, and the remaining 28 ones must be covered by day-vectors of weight 4 . As every vector of weight 4 covers four vectors of weight 3 , exactly $28 / 4=7$ day-vectors have weight 4.


To summarize, one day-vector has weight 0 , seven have weight 3 , and seven have weight 4 . None of these 15 day-vectors covers any vector of weight 6 or 7 , so that the eight heavyweight vectors in $V$ must be covered by the only remaining day-vector; and this remaining vector must be (1111111). On the day corresponding to (1111111) all seven dwarves are collecting berries, and that is what we wanted to show.
If a dwarf $X$ performs the same type of work on three days $D_{1}, D_{2}, D_{3}$, then we say that this triple of days is monotonous for $X$. We claim that the following configuration cannot occur: There are three dwarves $X_{1}, X_{2}, X_{3}$ and three days $D_{1}, D_{2}$, $D_{3}$, such that the triple $\left(D_{1}, D_{2}, D_{3}\right)$ is monotonous for each of the dwarves $X_{1}, X_{2}, X_{3}$.

(Proof: Suppose that such a configuration occurs. Then among the remaining dwarves there exist three dwarves $Y_{1}, Y_{2}, Y_{3}$ that performed both types of work on day $D_{1}$ and on day $D_{2}$; without loss of generality these three dwarves worked in the mine on day $D_{1}$ and collected berries on day $D_{2}$. On day $D_{3}$, two of $Y_{1}, Y_{2}, Y_{3}$ performed the same type of work, and without loss of generality $Y_{1}$ and $Y_{2}$ worked in the mine. But then on days $D_{1}$ and $D_{3}$, each of the five dwarves $X_{1}, X_{2}, X_{3}, Y_{1}, Y_{2}$ performed only one type of work; this is in contradiction with the problem statement.)

Next we consider some fixed triple $X_{1}, X_{2}, X_{3}$ of dwarves. There are eight possible working schedules for $X_{1}, X_{2}, X_{3}$ (like mine-mine-mine, mine-mine-berries, mine-berriesmine, etc). As the above forbidden configuration does not occur, each of these eight working schedules must occur on exactly two of the sixteen days. In particular this implies that every dwarf worked exactly eight times in the mine and exactly eight times in the forest.

For $0 \leqslant k \leqslant 7$ we denote by $d(k)$ the number of days on which exactly $k$ dwarves were collecting berries. Since on the first day all seven dwarves were in the mine, on each of the remaining days at least three dwarves collected berries. This yields $d(0)=1$ and $d(1)=d(2)=0$. We assume, for the sake of contradiction, that $d(7)=0$ and hence

$$
d(3)+d(4)+d(5)+d(6)=15 \tag{1}
$$

As every dwarf collected berries exactly eight times, we get that, further,

$$
3 d(3)+4 d(4)+5 d(5)+6 d(6)=7 \cdot 8=56 .
\tag{2}
$$

Next, let us count the number $q$ of quadruples $\left(X_{1}, X_{2}, X_{3}, D\right)$ for which $X_{1}, X_{2}, X_{3}$ are three pairwise distinct dwarves that all collected berries on day $D$. As there are $7 \cdot 6 \cdot 5=210$ triples of pairwise distinct dwarves, and as every working schedule for three fixed dwarves occurs on exactly two days, we get $q=420$. As every day on which $k$ dwarves collect berries contributes $k(k-1)(k-2)$ such quadruples, we also have

$$
3 \cdot 2 \cdot 1 \cdot d(3)+4 \cdot 3 \cdot 2 \cdot d(4)+5 \cdot 4 \cdot 3 \cdot d(5)+6 \cdot 5 \cdot 4 \cdot d(6)=q=420
$$



which simplifies to

$$
d(3)+4 d(4)+10 d(5)+20 d(6)=70 \tag{3}
$$

Finally, we count the number $r$ of quadruples $\left(X_{1}, X_{2}, X_{3}, D\right)$ for which $X_{1}, X_{2}, X_{3}$ are three pairwise distinct dwarves that all worked in the mine on day $D$. Similarly as above we see that $r=420$ and that

$$
7 \cdot 6 \cdot 5 \cdot d(0)+4 \cdot 3 \cdot 2 \cdot d(3)+3 \cdot 2 \cdot 1 \cdot d(4)=r=420 
$$

which simplifies to

$$
4 d(3)+d(4)=35 \tag{4}
$$

Multiplying (1) by -40 , multiplying (2) by 10 , multiplying (3) by -1 , multiplying (4) by 4 , and then adding up the four resulting equations yields $5 d(3)=30$ and hence $d(3)=6$. Then (4) yields $d(4)=11$. As $d(3)+d(4)=17$, the total number of days cannot be 16 . We have reached the desired contradiction.