Maths Olympiad Prep

Library / /122 of 136

Combinatorics Difficulty 8.4 Shortlist Prove it Hong Kong

Let S={1,2,3,,2n}S = \{1, 2, 3, \dots, 2n\}, where nn is a positive integer greater than or equal to 11. For any subset TT of SS, TT is called a good subset if in TT the number of even elements is greater than the number of odd elements.

a. Find the total number of good subsets of SS.

b. Find the sum of all the elements in all the good subsets of SS.

Solution

a.
The answer is 22n112(2nn)2^{2n-1} - \frac{1}{2}\binom{2n}{n}.

A subset TT of SS is called a bad subset if in TT the number of odd elements is greater than the number of even elements. A subset of SS is neither good nor bad if it has exactly kk odd elements and kk even elements for some k=0,1,,nk = 0, 1, \dots, n. Since there are nn odd elements and nn even elements in SS, the number of subsets which are neither good nor bad is
k=0n(nk)2=(2nn) \sum_{k=0}^{n} \binom{n}{k}^2 = \binom{2n}{n}
by Vandermonde's identity.

Now, by symmetry, the number of good subsets is the same as the number of bad subsets. As there are 22n2^{2n} subsets of SS in total, the total number of good subsets is
12[22n(2nn)]=22n112(2nn). \frac{1}{2}\left[2^{2n} - \binom{2n}{n}\right] = 2^{2n-1} - \frac{1}{2}\binom{2n}{n}.

b.
The answer is 22n2(2n2+n)n2(2n1n)2^{2n-2}(2n^2 + n) - n^2\binom{2n-1}{n}.

We first count the number N1N_1 of good subsets containing a particular even number. Suppose such a good subset contains ii more even numbers and jj odd numbers. Then we need iji \ge j. As there are n1n-1 even numbers remaining and nn odd numbers in total, we have
N1=i=0n1j=0i(n1i)(nj)=i=0n1k=nin(n1i)(nk)=i+kn(n1i)(nk) N_1 = \sum_{i=0}^{n-1} \sum_{j=0}^{i} \binom{n-1}{i} \binom{n}{j} = \sum_{i=0}^{n-1} \sum_{k=n-i}^{n} \binom{n-1}{i} \binom{n}{k} = \sum_{i+k \ge n} \binom{n-1}{i} \binom{n}{k}
by using the change of variable k=njk = n-j. Note that this is equal to the sum of coefficients of all xmx^m with mnm \ge n in (1+x)n1(1+x)n=(1+x)2n1(1+x)^{n-1}(1+x)^n = (1+x)^{2n-1}. Thus, we obtain
N1=m=n2n1(2n1m)=12m=02n1(2n1m)=22n2. N_1 = \sum_{m=n}^{2n-1} \binom{2n-1}{m} = \frac{1}{2} \sum_{m=0}^{2n-1} \binom{2n-1}{m} = 2^{2n-2}.

Similarly, we count the number N2N_2 of good subsets containing a particular odd number. Suppose such a good subset contains i2i \ge 2 even numbers and jj more odd numbers. Then we need ij+2i \ge j + 2. This implies
N2=i=2nj=0i2(ni)(n1j)=i=2nk=n+1in1(ni)(n1k)=i+kn+1(ni)(n1k)=m=n+12n1(2n1m)=12(m=02n1(2n1m)(2n1n1)(2n1n))=22n2(2n1n). \begin{align*} N_2 &= \sum_{i=2}^{n} \sum_{j=0}^{i-2} \binom{n}{i} \binom{n-1}{j} \\ &= \sum_{i=2}^{n} \sum_{k=n+1-i}^{n-1} \binom{n}{i} \binom{n-1}{k} \\ &= \sum_{i+k \ge n+1} \binom{n}{i} \binom{n-1}{k} \\ &= \sum_{m=n+1}^{2n-1} \binom{2n-1}{m} \\ &= \frac{1}{2} \left( \sum_{m=0}^{2n-1} \binom{2n-1}{m} - \binom{2n-1}{n-1} - \binom{2n-1}{n} \right) \\ &= 2^{2n-2} - \binom{2n-1}{n}. \end{align*}

Now, the sum of all the elements in all the good subsets of SS is
N1(2+4++2n)+N2(1+3++(2n1))=22n2n(n+1)+[22n2(2n1n)]n2=22n2(2n2+n)n2(2n1n). \begin{align*} N_1(2+4+\cdots+2n) + N_2(1+3+\cdots+(2n-1)) \\ &= 2^{2n-2} \cdot n(n+1) + \left[ 2^{2n-2} - \binom{2n-1}{n} \right] \cdot n^2 \\ &= 2^{2n-2}(2n^2+n) - n^2 \binom{2n-1}{n}. \end{align*}

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.