In how many ways can I form a set of 6 elements made up of 0s, 1s, 2s, 3s, 4s and 5s such that the sum of its elements is a multiple of 6?

74 Views Asked by At

I have a set $ S $ which is made up of 6 elements, each one being either 0, 1, 2, 3, 4 or 5 (note that repetition is allowed). I want to evaluate the following problems:

a) In how many ways can such a set be constructed

b) How many of these ways have the property that the sum of all the elements of $ S $ is a multiple of 6 (e.g. {1, 1, 1, 1, 1, 1}; {1, 2, 3, 4, 4, 4})

For a), I tried doing something like $ \frac{6^6}{6!} $: counting the total number and dividing by the number of ways to arrange them; however, that is not an integer. I also tried combinations with replacement: $ \left(\binom{6}{6}\right) = \binom{6+6-1}{6} = \binom{11}{6} = 462$ , however I am not certain if this is correct. I have no clue how to approach b).

1

There are 1 best solutions below

5
On BEST ANSWER

As a set, $\{1,1,1,1,1,1\}=\{1\}$, hence the sum of its elements is $1$, not $6$.

If the actual problem is

In how may ways we may choose $x_1,x_2,x_3,x_4,x_5,x_6$ from $\{0,1,2,3,4,5\}$ in such a way that $x_1+x_2+x_3+x_4+x_5+x_6$ is a multiple of $6$?

Then the answer is just $\frac{6^6}{6}=\color{red}{6^5}$, since we way choose $x_1,x_2,x_3,x_4,x_5$ as we like, then there is a unique option for $x_6$ that ensures the sum being a multiple of $6$.

If the actual problem is

In how many ways we may choose a multi-set of $6$ elements from $\{0,1,2,3,4,5\}$ such that the sum of its elements is a multiple of $6$?

we have to consider the sum of the coefficients of $x^0,x^6,x^{12},\ldots$ in the polynomial given by the coefficient of $y^6$ in the product

$$(1+y+y^2+y^3+\ldots)(1+yx+y^2 x^2+y^3 x^3+\ldots)(1+yx^2+y^2x^4+\ldots)\ldots(1+yx^5+y^2 x^{10}+\ldots)$$ that is $$ \frac{1}{(1-y)(1-yx)(1-yx^2)(1-yx^3)(1-yx^4)(1-yx^5)}. $$ So we have to consider the polynomial $$ 1+x+2 x^2+3 x^3+5 x^4+7 x^5+10 x^6+12 x^7+16 x^8+19 x^9+23 x^{10}+25 x^{11}+29 x^{12}+30 x^{13}+32 x^{14}+32 x^{15}+32 x^{16}+30 x^{17}+29 x^{18}+25 x^{19}+23 x^{20}+19 x^{21}+16 x^{22}+12 x^{23}+10 x^{24}+7 x^{25}+5 x^{26}+3 x^{27}+2 x^{28}+x^{29}+x^{30} $$ and compute $$ 1+10+29+29+10+1 = \color{red}{80}.$$