Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|cite|improve this question
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
what about this? – Fermat Jun 1 '14 at 22:07
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

If they mean that the sum of the digits is three, then you look for the number of solutions of


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).

share|cite|improve this answer
@WillOrrick Yes, that's wrong :) I will have to edit. – mathse Jun 1 '14 at 22:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.