Define $S_n$ as the set ${1,2,\cdots,n}$. A non-empty subset $T_n$ of $S_n$ is called $balanced$ if the average of the elements of $T_n$ is equal to the median of $T_n$. Prove that, for all $n$, the number of balanced subsets $T_n$ is odd.
Problem
Source: Canadian Mathematical Olympiad 2017
Tags: combinatorics, Sets, Average, median
01.04.2017 00:27
InCtrl wrote: the wording is not exact, I will update it once the website uploads the problems (the questions are collected alongside the solutions)
01.04.2017 00:46
Consider the subsets as binary strings (with $0$ digits present even if they lead). In fact, we need only count the number of such sets that are symmetric about the midpoint (the bijection to kill the other sets is easily established). This also is not hard; it is of the form $2^{\lceil 0.5n\rceil}-1$, which is clearly odd.
01.04.2017 01:07
As $n-1-A=\{n+1-a|a\in A\}$ is balanced for any balanced $A$, we may pair off non-palindromic balanced subsets of $S_n$. Every palindromic subset of $S_n$ is clearly balanced, so it suffices to show that there are an odd number of palindromic subsets of $S_n$. Note that every palindromic subset is the union of a nonzero number of sets from $\{1,n\},\{2,n-1\},\ldots,\left\{\left\lfloor\frac{n+1}2\right\rfloor,\left\lceil\frac {n+1}2\right\rceil\right\}$, so there are $2^{\left\lfloor\frac{n+1}2\right\rfloor}-1$ palindromic subsets of $S_n$. This is odd as $\left\lfloor\frac{n+1}2\right\rfloor>0$ for all positive integers $n$, as desired.
01.04.2017 03:30
18.04.2021 01:09
Nice symmetry. Notice that any subset which is not symmetric around the "center"(whether it is in $S_n$ in the odd case or not in $S_n$ in the even case) has a counterpart which is the equivalent of "flipping" the set $T_n$. Therefore, the parity of the number of $T_n$ only depends on those which are symmetric around the center, and this can be easily found to be $2^k-1$ for some integer $k,$ where we subtract $1$ because of the empty set. Done.
08.06.2022 23:03
The second official solution is even simpler, which goes as follows: Let $A(T),M(T)$ denote average, median of a set $T$, respectively. Throughout the solution $T$ will denote a non-empty subset of $T_n$. Let, \begin{align*} B &= \{ T : M(T) > A(T) \} \\ C &= \{T : M(T) = A(T) \} \\ D &= \{T : M(T) < A(T) \} \end{align*}It is clear that $$ |B|+|C|+|D| = \# \text{non-empty subsets of } T_n = 2^n - 1 \qquad \qquad (\star)$$Now observe that $$T \to (n+1) - T := \{n+1 - t : t \in T\} $$forms a bijection between sets $B,D$. Hence, $$ |B| = |D| $$Combining this with $(\star)$ gives $$ |C| = 2^n - 1 - 2|B| $$and since $2^n - 1$ is odd, so $|C|$ is odd, as required. $\blacksquare$
08.02.2024 18:07
Since we want to prove that $S_n$ is odd, why not prove that $S_n-S_{n-1}$ is even instead? We take $n=6$ for example, this leaves us with $\{6\}, \{1, 6\}, \{2, 6\}, \{3, 6\}, \{4, 6\}, \{5, 6\}, \{2, 4, 6\}, \{4, 5, 6\}, \{1, 2, 5, 6\}, \{1, 3, 4, 6\}, \{2, 3, 5, 6\}, \{3, 4, 5, 6\}, \{2, 3, 4, 5, 6\}, \{1, 2, 3, 4, 5, 6\}$. By grouping them according to their medians (Let the median be $m$), we have \begin{tabular}{|c|l|} \hline $m$ & Subset\\ \hline $6$ & $\{6\}$\\ \hline $5.5$ & $\{5, 6\}$ \\ \hline $5$ & $\{4, 6\}, \{4, 5, 6\}$ \\ \hline $4.5$ & $\{3, 6\}, \{3, 4, 5, 6\}$ \\ \hline $4$ & $\{2, 6\}, \{2, 4, 6\}, \{2, 3, 5, 6\}, \{2, 3, 4, 5, 6\}$ \\ \hline $3.5$ & $\{1, 6\}, \{1, 2, 5, 6\}, \{1, 3, 4, 6\}, \{1, 2, 3, 4, 5, 6\}$ \\ \hline \end{tabular}We see that each group has an even number of subsets (other than $5.5$ and $6$), so this suggests that some "pairing" could be made. Case 1: For integer medians, let the median of a balanced subset $A$ be $m$, and that $m\notin A$, then $A\cup\{m\}$ is also balanced, hence we can pair them up. Case 2: For non-integer medians, observe that the size of the subset must be even. Let the median of a such balanced subset $S$ be $m=\cfrac{p+q}{2}$ and $p, q\notin A$, then $A\cup\{p, q\}$ is also a balanced subset. So for each non-integer median, choose a pair $(p, q)$, pair the subsets with and without $p, q$. Lastly, consider $\{6\}$ and $\{5, 6\}$, which can be proved that, for some $n$, the balanced subset with median $n$ and $n-0.5$ can only be $\{n\}$ and $\{n-1, n\}$. And it turns out that we need not consider $S_n-S_{n-1}$, since we can pair up all subsets. $S_n$ is always odd since we omit the empty set. $\blacksquare$