Maths Olympiad Prep

Library / /7 of 30

Combinatorics Difficulty 7.9 National Olympiad, round 2 Prove it Germany

Problem:

A pirate wants to divide a treasure, consisting of 1000 gold coins that each weigh at least 1 g and together weigh exactly 2 kg, into two parts whose masses each deviate from 1 kg by at most 1 g. Prove that this is possible.

Solution

Solution:

1. Solution (Complete induction). Let the masses of the 1000 coins in grams, arranged in ascending order, be denoted by m1m2m1000m_{1} \leq m_{2} \leq \cdots \leq m_{1000}. We first prove, by complete induction on =1,,1000\ell=1, \ldots, 1000, the following statement.

Lemma. For all 110001 \leq \ell \leq 1000 and every real number 0x2+i=1mi0 \leq x \leq 2+\sum_{i=1}^{\ell} m_{i} there exists a (possibly empty) subset I{1,2,,}I \subset\{1,2, \ldots, \ell\} such that iImi[x2,x]\sum_{i \in I} m_{i} \in[x-2, x] holds.

We have x12000/1000=2x_{1} \leq 2000 / 1000=2, so the base case =1\ell=1 is clear: if x<2x<2, we can choose I=I=\emptyset, otherwise I={1}I=\{1\} works.

For the induction step (+1(\ell \rightarrow \ell+1, where 999\ell \leq 999) we see that for xi=1mix \leq \sum_{i=1}^{\ell} m_{i} there is nothing to show. Since we can replace any set II by I{+1}I \cup\{\ell+1\}, the claim also holds for m+1xm+1+i=1mi=i=1+1mim_{\ell+1} \leq x \leq m_{\ell+1}+\sum_{i=1}^{\ell} m_{i}=\sum_{i=1}^{\ell+1} m_{i}. Thus the induction step is complete, except when 2+i=1mi<m+12+\sum_{i=1}^{\ell} m_{i}<m_{\ell+1}. In this case it follows that mi>2+m_{i}>2+\ell for all +1i1000\ell+1 \leq i \leq 1000, which implies the following inequality.

2000=i=11000mi=i=1mi+i=+11000mi>+(1000)(2+)=2000+9992 2000=\sum_{i=1}^{1000} m_{i}=\sum_{i=1}^{\ell} m_{i}+\sum_{i=\ell+1}^{1000} m_{i}>\ell+(1000-\ell)(2+\ell)=2000+999 \ell-\ell^{2}

Hence >999\ell>999, a contradiction, which completes the proof of the lemma.

We now apply the lemma to =1000\ell=1000 and x=1001x=1001. This shows that there exists a subset I{1,2,,1000}I \subset\{1,2, \ldots, 1000\} for which iIxi[999,1001]\sum_{i \in I} x_{i} \in[999,1001] holds. Since i=11000mi=2000\sum_{i=1}^{1000} m_{i}=2000, we also have i{1,,1000}\Ixi[999,1001]\sum_{i \in\{1, \ldots, 1000\} \backslash I} x_{i} \in[999,1001], and the division of the coins corresponding to the partition
{1,,1000}=I({1,,1000}\I) \{1, \ldots, 1000\}=I \cup(\{1, \ldots, 1000\} \backslash I)
satisfies the claim.

2. Solution (Greedy algorithm). We use the same notation as in the first solution. The pirate distributes the coins according to the following procedure: he places all coins, in descending order of their masses (i.e., starting with the heaviest coin of mass m1000m_{1000}), one after another onto two piles H1H_{1} and H2H_{2}, placing each coin on whichever pile is lighter at that moment; in case of a tie he chooses either pile arbitrarily.

We claim that neither pile ever weighs more than 1001 grams.

Suppose that after placing the kk-th coin of mass m1001km_{1001-k}, one of the piles is nevertheless heavier than 1001 grams. Before this step, both piles together weighed i=1002k1000mi\sum_{i=1002-k}^{1000} m_{i} grams, and since the coin was placed on the lighter pile, it follows that

m1001k+12i=1002k1000mi>1001m1001k+12i=11000mi>1001+12i=11001kmi12m1001k+1000>1001+12i=11000kmim1001k>2+i=11000kmi2+1000k=1002k \begin{aligned} m_{1001-k}+\frac{1}{2} \sum_{i=1002-k}^{1000} m_{i} & >1001 \\ m_{1001-k}+\frac{1}{2} \sum_{i=1}^{1000} m_{i} & >1001+\frac{1}{2} \sum_{i=1}^{1001-k} m_{i} \\ \frac{1}{2} m_{1001-k}+1000 & >1001+\frac{1}{2} \sum_{i=1}^{1000-k} m_{i} \\ m_{1001-k} & >2+\sum_{i=1}^{1000-k} m_{i} \geq 2+1000-k=1002-k \end{aligned}

From this it now follows that

2000=i=11000mi=(i=11000kmi)+(i=1001k1000mi)1000k+km1001k>1000k+k(1002k) \begin{aligned} 2000=\sum_{i=1}^{1000} m_{i} & =\left(\sum_{i=1}^{1000-k} m_{i}\right)+\left(\sum_{i=1001-k}^{1000} m_{i}\right) \\ & \geq 1000-k+k \cdot m_{1001-k} \\ & >1000-k+k(1002-k) \end{aligned}

so f(k)=k2+1001k1000<0f(k)=-k^{2}+1001 k-1000<0, which, because f(k)=(k1)(1000k)f(k)=(k-1)(1000-k) and 1k10001 \leq k \leq 1000, is nevertheless a contradiction.

So the claim is true, and even after distributing the lightest coin of mass m1m_{1}, both piles weigh no more than 1001 grams. Since together they weigh 2000 grams, each pile must weigh at least 999 grams, and we have found a distribution as required.

3. Solution (Pigeonhole principle). We again use the same notation as in the first solution. Since m10002>1m_{1000} \geq 2>1, we have m1++m999<1999m_{1}+\cdots+m_{999}<1999, and the 1000 sums
0,m1,m1+m2,,m1+m2++m999 0, m_{1}, m_{1}+m_{2}, \ldots, m_{1}+m_{2}+\cdots+m_{999}
each lie in exactly one of the 1000 pigeonholes
{[0,1)[1000,1001),}{[1,2)[1001,1002),},{[998,999)[1998,1999),}{[999,1000)} \begin{gathered} \{[0,1) \cup[1000,1001),\} \\ \{[1,2) \cup[1001,1002),\} \\ \ldots, \\ \{[998,999) \cup[1998,1999),\} \\ \{[999,1000)\} \end{gathered}
If one of the sums lies in the last pigeonhole [999,1000)[999,1000), we are done, otherwise two sums lie in the same pigeonhole [k,k+1)[1000+k,1001+k)[k, k+1) \cup[1000+k, 1001+k) (for some fixed 0k9980 \leq k \leq 998). Since by assumption mi1m_{i} \geq 1, one of the sums lies in the interval [k,k+1)[k, k+1) and the other in [1000+k,1001+k)[1000+k, 1001+k), so the difference mi+1+mi+2++mjm_{i+1}+m_{i+2}+\cdots+m_{j} of the two sums lies in the interval (999,1001)(999,1001) and thus yields a distribution as desired.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement translated into English from de; metadata (topic, difficulty) added by this project.