# discrete math and combinatorics question

Q: Consider the collection of all strings of length 10 made up from the alphabet 0, 1, 2, and 3. How many strings have weight 3?

My problem with that question is that I don't know what they mean by weight.. and more importantly what they mean by having weight 3. Please explain how to do this question, thanks!

-
No clue, but they might mean that the sum of the digits is $3$. – mathse Jun 1 '14 at 21:59
In coding theory, weight usually means the number of non-zero digits. Equivalently, it's the Hamming distance between the string and the all-zero string. – Will Orrick Jun 1 '14 at 22:06
I am confused now – Joe Jun 1 '14 at 22:09
But typically mathematicians ask problems where the terms are clearly defined (only economists pose questions where the first task is to infer the meaning of the concepts :-)) – mathse Jun 1 '14 at 22:21

$$x_1+x_2+\cdots+x_{10}=3,$$
where $x_i\in\{0,1,2,3\}$. Then the number of solutions is $\binom{3+10-1}{10-1}=220$ (see here).
If they mean that the number of non-zero digits is $3$ then there are $3^3\cdot\binom{10}{3}=27\cdot 120$ choices (there are $3^3$ choices for the $3$ non-zero digits, which can be either $1,2$ or $3$, and they can be distributed among $10$ positions).