Maths Olympiad Prep

Track / Stage 8 / 51 of 180 #2391 of 2604

Problem 2391

IMO Shortlist mid-range; USAMO P2/P5
Number theory Difficulty 8.2 Prove it Team selection test for 47. IMO · Bulgaria

Let p>2p > 2 be a prime number. Find the number of the subsets BB of the set {1,2,…,p−1}\{1, 2, \ldots, p-1\} such that pp divides the sum of the elements of BB.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

Solution:
Consider the set A′=A∪{0}A' = A \cup \{0\} instead of AA. Let B={a1,a2,…,ak}B = \{a_1, a_2, \ldots, a_k\} be a nonempty subset of A′A'. Set
i+B={i+a1(modp),i+a2(modp),…,i+ak(modp)} i + B = \{i + a_1 \pmod{p}, i + a_2 \pmod{p}, \ldots, i + a_k \pmod{p}\}
Note that the sums of the elements of the sets i+Bi + B, i=0,1,…,p−1i = 0, 1, \ldots, p-1, are all distinct. Indeed, if for some ss and tt the sums are equal then
∑i=1k(s+ai)≡∑i=1k(t+ai)(modp)⟺ ks+∑i=1kai≡kt+∑i=1kai(modp)⟺ ks≡kt(modp) \begin{aligned} & \sum_{i=1}^{k} (s + a_i) \equiv \sum_{i=1}^{k} (t + a_i) \pmod{p} \\ \Longleftrightarrow \ & k s + \sum_{i=1}^{k} a_i \equiv k t + \sum_{i=1}^{k} a_i \pmod{p} \\ \Longleftrightarrow \ & k s \equiv k t \pmod{p} \end{aligned}
which is equivalent to s=ts = t.

Therefore the set of the subsets of A′A' (without the empty set and A′A') partitions into 2p−2p\frac{2^p - 2}{p} groups and every group contains pp sets. Moreover, the sums of the elements of the subsets in every group run over all residues modulo pp.

Therefore the number of the subsets having sums divisible by pp equals 2p−2p\frac{2^p - 2}{p}. Since 00 is included in half of them, it follows that the number of the subsets BB of AA (including the empty set and excluding AA) equals 2p−22p\frac{2^p - 2}{2p}.

Replacing the empty set by AA (having sum p(p−1)2\frac{p(p-1)}{2}, which is divisible by pp), we conclude that the answer is 2p−1−1p\frac{2^{p-1} - 1}{p}.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.