Maths Olympiad Prep

Library / /6 of 11

Number theory Difficulty 8.2 Shortlist Prove it Bulgaria

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

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 AA'. 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,,p1i = 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=1kaikt+i=1kai(modp) kskt(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 AA' (without the empty set and AA') partitions into 2p2p\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 2p2p\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 2p22p\frac{2^p - 2}{2p}.

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

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.