Clear Notion Academy

Sets, Relations and Functions (Beyond Advanced) Practice: How many non-empty subsets of 1,2,3, ,9 have a sum of elements that is divisible by 3 ?

Question

How many non-empty subsets of {1,2,3,…,9}\{1,2,3,\dots,9\} have a sum of elements that is divisible by 33?

Answer

Answer: 175

Hint

Only residues modulo 33 matter. Think of the product ∏(1+tri)\prod(1+t^{r_i}) and what happens at the cube roots of unity, or of a small bookkeeping of residue classes.

Solution

The residues mod 33 are: three elements each of residue 0,1,20,1,2. Let NjN_j be the number of subsets (empty set included) with sum ≡j(mod3)\equiv j \pmod 3. With ω=e2πi/3\omega=e^{2\pi i/3}, N0=13∑k=02∏x(1+ωkx)N_0=\frac13\sum_{k=0}^{2}\prod_{x}(1+\omega^{kx}). For k=0k=0 the product is 29=5122^9=512. For k=1k=1: (1+1)3(1+ω)3(1+ω2)3=8⋅(−ω2)3(−ω)3=8⋅(−1)(−1)=8(1+1)^3(1+\omega)^3(1+\omega^2)^3=8\cdot(-\omega^2)^3(-\omega)^3=8\cdot(-1)(-1)=8. For k=2k=2 the product is the conjugate, also 88. So N0=512+8+83=176N_0=\frac{512+8+8}{3}=176, which counts the empty set. Non-empty subsets: 176−1=175176-1=175. Check by class counting: the three residue-00 elements are free (factor 88). If aa residue-11 and bb residue-22 elements are chosen, the sum is ≡a+2b≡a−b(mod3)\equiv a+2b\equiv a-b\pmod 3, so we need a≡b(mod3)a\equiv b\pmod 3 with 0≤a,b≤30\le a,b\le3: (a,b)∈{(0,0),(1,1),(2,2),(3,3),(0,3),(3,0)}(a,b)\in\{(0,0),(1,1),(2,2),(3,3),(0,3),(3,0)\} with weights (3a)(3b)\binom3a\binom3b totalling 1+9+9+1+1+1=221+9+9+1+1+1=22. So 8⋅22=1768\cdot22=176, in agreement.

More questions from Sets, Relations and Functions (Beyond Advanced) Practice

Practise the full set: Sets, Relations and Functions — Beyond Advanced