Skip to main content
OlympiadHQ

Browse · MathNet

Print

XXIV OBM

Brazil counting and probability

Problem

For any non-empty subset of define as the largest element of minus the smallest element of . Find where the sum is taken over all non-empty subsets of .
Solution
Let and be the sum of the minima and maxima of all subsets. Since the diameter of a set is the difference between its maximum and its minimum, the desired sum is . We may include unitary subsets, since their minima and maxima coincide.

The number , , is the minimum of all subsets of the form , where . So is the minimum of subsets. Hence Now we count the number of subsets with diameter . Let be the minimum of a subset. The maximum is . Since , one may choose in ways. Since there are numbers between and , there are subsets with diameters . Since there are non-empty and non-unitary subsets, and .

In order to compute , notice that the association is clearly a bijection that transform minima in maxima . Since there are non-empty subsets, .
Final answer
(n - 3) * 2^n + n + 3

Techniques

Counting two waysRecursion, bijectionSums and products