Maths Olympiad Prep

Library / /67 of 86

Combinatorics Difficulty 7.4 National Olympiad, round 2 Prove it United States

Problem:

Finitely many cards are placed in two stacks, with more cards in the left stack than the right. Each card has one or more distinct names written on it, although different cards may share some names. For each name, we define a "shuffle" by moving every card that has this name written on it to the opposite stack. Prove that it is always possible to end up with more cards in the right stack by picking several distinct names, and doing in turn the shuffle corresponding to each name.

Solution

Solution:

Let the number of cards be cc and let the number of distinct names be nn. Each card contains a set of names; denote these sets by S1,S2,,ScS_{1}, S_{2}, \ldots, S_{c} (some of these sets may share elements). Now let EE be a subset of the set of nn names, and denote by D(E)D(E) the difference of the number of cards in the left stack and the number of cards in the right stack, after the cards are shuffled by the names in EE. We are given that D()>0D(\emptyset)>0; we must show that there exists a subset EE such that D(E)<0D(E)<0.

Consider the sum of all D(E)D(E) as EE ranges through all 2n2^{n} possible subsets of names. If we can show that this sum is equal to zero, we will be done, since D()>0D(\emptyset)>0 is just one term in this sum, forcing at least one other term to be negative. For i=1,2,,ci=1,2, \ldots, c, let vi=+1v_{i}=+1 or 1-1 if the iith card is initially in the left or right stack, respectively. Then
D()=v1+v2++vc=i=1cvi D(\emptyset)=v_{1}+v_{2}+\cdots+v_{c}=\sum_{i=1}^{c} v_{i}
Now consider what happens when we shuffle the cards corresponding to a subset EE of names. The iith card will move back and forth from one stack to the other a total of ESi|E \cap S_{i}| times (A|A| means the number of elements in the set AA). The only thing that matters is whether this value is even or odd. Thus we have
D(E)=i=1c(1)ESivi D(E)=\sum_{i=1}^{c}(-1)^{|E \cap S_{i}|} v_{i}
It remains to sum this expression over all subsets EE. Let us examine what happens just for one card; i.e., let us compute
E(1)ESivi \sum_{E}(-1)^{|E \cap S_{i}|} v_{i}
for a fixed ii as EE ranges over all 2n2^{n} subsets of names. If we can show that this equals zero, then the entire sum will equal zero and we are done. Let Si=k|S_{i}|=k. Then ESi|E \cap S_{i}| will range from 00 to kk inclusive. For 0<r<k0<r<k, how many subsets EE are there such that ESi=r|E \cap S_{i}|=r? There are (kr)\binom{k}{r} subsets of SiS_{i} with rr elements. Fix one of them, call it TT. Then EE must contain all the elements of TT, plus any subset of the names that are not contained in SiS_{i}. In other words, there are 2nk2^{n-k} subsets containing TT, and thus there are (kr)2nk\binom{k}{r} 2^{n-k} subsets EE altogether satisfying ESi=r|E \cap S_{i}|=r. Therefore
E(1)ESivi=vir=0k(1)r(kr)2nk=2nkvir=0k(1)r(kr) \sum_{E}(-1)^{|E \cap S_{i}|} v_{i}=v_{i} \sum_{r=0}^{k}(-1)^{r}\binom{k}{r} 2^{n-k}=2^{n-k} v_{i} \sum_{r=0}^{k}(-1)^{r}\binom{k}{r}
By the binomial theorem, we have
2nkvir=0k(1)r(kr)=2nkvi(11)k=0 2^{n-k} v_{i} \sum_{r=0}^{k}(-1)^{r}\binom{k}{r}=2^{n-k} v_{i}(1-1)^{k}=0

We will prove the statement by induction on nn, the number of distinct names present. Call the left stack LL and the right stack RR. For the case n=1n=1, let LL have xx cards and RR have yy cards with x>yx>y; all cards have the same single name written on them. We perform the shuffle corresponding to the single name present, and we are done (now we have xx in RR and yy in LL).

Next, assume that we have proven the statement for nn names, and consider the case with n+1n+1 names. Call the first nn names a1,a2,,ana_{1}, a_{2}, \ldots, a_{n}, and let the new (n+1)(n+1)-st name be aa. There are two cases:

Case 1. The number of LL cards containing only name aa is less than or equal to the number of RR cards containing only name aa. In this case, we need only look at the remaining cards (the ones that do not contain only aa). We can ignore the name aa, and use the inductive hypothesis to perform the required shuffles using some subset of the nn names a1,a2,,ana_{1}, a_{2}, \ldots, a_{n}, and we will be done: there are now more of these remaining cards in stack RR than in stack LL, and since there were at least as many "only aa" cards in RR than in LL, the final configuration has more cards in RR than in LL. (Note that if the original configuration contains as many "remaining" cards in RR as in LL, we don't have to perform any shuffles at all, given that the "only aa" cards in RR are more than those in LL.)

Case 2: The number of LL cards containing only name aa is greater than the number of RR cards containing only aa. In this case, we first perform the shuffle corresponding to the name aa. This will switch the "only aa" cards, so that there are more of them in RR than in LL. Unfortunately, some of the remaining cards may also have moved around. But now there are two possibilities: if there are at least as many remaining cards in RR than in LL, we are done. If not, then we can again employ the inductive hypothesis, ignoring the name aa, and just applying the shuffles to some subset of the nn names a1,a2,,ana_{1}, a_{2}, \ldots, a_{n}. The end result will be that there will be as many remaining cards in RR than in LL, and we are done.

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 reproduced verbatim; metadata (topic, difficulty) added by this project.