- #1
issacnewton
- 1,041
- 37
Homework Statement
Consider the collection of all strings of length 10 made up from the alphabet 0, 1, 2 and 3. How many of these strings have weight 3? How many have weight 4? How many have even weight ?
Homework Equations
Combinations formulae
The Attempt at a Solution
Let me explain what weight is here. So if the string of length 10 formed is 0011002233, then the weight of the string is just the sum of all the digits. So in this example, the weight would be 12. I need help only in the last part. For the weight to be even, there will be two cases. Case 1) No. of 1's is even and no. of 3's is even. And second case is Case 2) No. of 1's is odd and no. of 3's is odd. Now for the Case 1), no. of 1's can be from the set ##\{0,2,4,6,8,10 \}## and no. of 3's can also from the list ##\{0,2,4,6,8,10 \}##. So for Case 1), we have 36 possibilities. It doesn't matter how many 0's and 2's are there, since they will not alter the evenness of the weight of a string. Now for each of this 36 possibilities, I can use combinations formulae to find the no. of possible strings, but that would be cumbersome. Similarly I can do for Case 2) and even there calculations are cumbersome for each odd no. of 1's and each odd no. of 3's. I would like to know if there is a smarter way to do this problem.
Thanks