Solution:
Let the number of cards be c and let the number of distinct names be n. Each card contains a set of names; denote these sets by S1,S2,…,Sc (some of these sets may share elements). Now let E be a subset of the set of n names, and denote by 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 E. We are given that D(∅)>0; we must show that there exists a subset E such that D(E)<0.
Consider the sum of all D(E) as E ranges through all 2n possible subsets of names. If we can show that this sum is equal to zero, we will be done, since D(∅)>0 is just one term in this sum, forcing at least one other term to be negative. For i=1,2,…,c, let vi=+1 or −1 if the ith card is initially in the left or right stack, respectively. Then
D(∅)=v1+v2+⋯+vc=i=1∑cvi
Now consider what happens when we shuffle the cards corresponding to a subset E of names. The ith card will move back and forth from one stack to the other a total of ∣E∩Si∣ times (∣A∣ means the number of elements in the set A). The only thing that matters is whether this value is even or odd. Thus we have
D(E)=i=1∑c(−1)∣E∩Si∣vi
It remains to sum this expression over all subsets E. Let us examine what happens just for one card; i.e., let us compute
E∑(−1)∣E∩Si∣vi
for a fixed i as E ranges over all 2n 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. Then ∣E∩Si∣ will range from 0 to k inclusive. For 0<r<k, how many subsets E are there such that ∣E∩Si∣=r? There are (rk) subsets of Si with r elements. Fix one of them, call it T. Then E must contain all the elements of T, plus any subset of the names that are not contained in Si. In other words, there are 2n−k subsets containing T, and thus there are (rk)2n−k subsets E altogether satisfying ∣E∩Si∣=r. Therefore
E∑(−1)∣E∩Si∣vi=vir=0∑k(−1)r(rk)2n−k=2n−kvir=0∑k(−1)r(rk)
By the binomial theorem, we have
2n−kvir=0∑k(−1)r(rk)=2n−kvi(1−1)k=0
We will prove the statement by induction on n, the number of distinct names present. Call the left stack L and the right stack R. For the case n=1, let L have x cards and R have y cards with x>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 x in R and y in L).
Next, assume that we have proven the statement for n names, and consider the case with n+1 names. Call the first n names a1,a2,…,an, and let the new (n+1)-st name be a. There are two cases:
Case 1. The number of L cards containing only name a is less than or equal to the number of R cards containing only name a. In this case, we need only look at the remaining cards (the ones that do not contain only a). We can ignore the name a, and use the inductive hypothesis to perform the required shuffles using some subset of the n names a1,a2,…,an, and we will be done: there are now more of these remaining cards in stack R than in stack L, and since there were at least as many "only a" cards in R than in L, the final configuration has more cards in R than in L. (Note that if the original configuration contains as many "remaining" cards in R as in L, we don't have to perform any shuffles at all, given that the "only a" cards in R are more than those in L.)
Case 2: The number of L cards containing only name a is greater than the number of R cards containing only a. In this case, we first perform the shuffle corresponding to the name a. This will switch the "only a" cards, so that there are more of them in R than in L. 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 R than in L, we are done. If not, then we can again employ the inductive hypothesis, ignoring the name a, and just applying the shuffles to some subset of the n names a1,a2,…,an. The end result will be that there will be as many remaining cards in R than in L, and we are done.