Skip to main content
OlympiadHQ

Browse · MathNet

Print

CMO 2017

Canada 2017 counting and probability

Problem

Let be a positive integer, and define . Consider a non-empty subset of . We say that is balanced if the median of is equal to the average of . For example, for , each of the subsets , , , , and is balanced; however, the subsets and are not balanced. For each , prove that the number of balanced subsets of is odd.

(To define the median of a set of numbers, first put the numbers in increasing order; then the median is the middle number if is odd, and the average of the two middle numbers if is even. For example, the median of is , and the median of is .)
Solution
The problem is to prove that there is an odd number of nonempty subsets of such that the average and median satisfy . Given a subset , consider the subset . It holds that and , which implies that if then . Pairing each set with yields that there are an even number of sets such that and .

Thus it suffices to show that the number of nonempty subsets such that and is odd. Now note that if , then . Hence it suffices to show the number of nonempty subsets with is odd. Given such a set , let be the largest nonempty subset of contained in . Pairing with forms a bijection between these sets and the nonempty subsets of . Thus there are such subsets, which is odd as desired.

---

Alternative solution.

Using the notation from the above solution: Let be the number of subsets with , be the number with , and be the number with . Pairing each set counted by with shows that . Now since , we have that , which is odd.

Techniques

Enumeration with symmetryCounting two waysRecursion, bijection