For every subset $T$ of $U = \{ 1,2,3,\ldots,18 \}$, let $s(T)$ be the sum of the elements of $T$, with $s(\emptyset)$ defined to be $0$. If $T$ is chosen at random among all subsets of $U$, the probability that $s(T)$ is divisible by $3$ is $\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m$.
Solution 1
Rewrite the set after mod3
1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0
All 0s can be omitted
Case 1 No 1 No 2 ![]()
Case 2
![]()
Case 3
![]()
Case 4
![]()
Case 5
![]()
Case 6
![]()
Case 7
![]()
Case 8
![]()
Case 9
![]()
Case 10
![]()
Case 11
![]()
Case 12
![]()
Case 13
![]()
Case 14
![]()
Case 15
![]()
Case 16
![]()
Case 17
![]()
Total ![]()
![]()
Solution 2
Consider the numbers
. Each of those are congruent to
. There is
way to choose zero numbers
ways to choose
and so on. There ends up being
possible subsets congruent to
. There are
possible subsets of these numbers. By symmetry there are
subsets each for
and
.
We get the same numbers for the subsets of
.
For
, all
subsets are
.
So the probability is: ![]()