Counting strings of alphabets 0,1,2 and 3

  • Thread starter Thread starter issacnewton
  • Start date Start date
  • Tags Tags
    Counting Strings
Click For Summary
The discussion revolves around calculating the number of strings of length 10 composed of the digits 0, 1, 2, and 3, focusing on those with specific weights. Weight is defined as the sum of the digits in a string, with examples provided for weights of 3 and 4. The main challenge is determining the number of strings that have an even weight, which involves analyzing cases based on the counts of 1's and 3's in the strings. One participant suggests that the total number of strings with even weight will always be half of the total possible strings, simplifying the calculation. The conversation highlights the complexity of counting combinations while seeking a more efficient approach to solving the problem.
issacnewton
Messages
1,035
Reaction score
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:smile:
 
Physics news on Phys.org
For weight three you have three groupings to consider:
- 0, 3 where only one 3 token can be in the string
- 0, 1, 2 where only one 1 and one 2 can be in the string
- 0, 1 where only three 1 tokens can be in the string

From there you count up the ways you can create a string with the limitations above noting that in the string with three 1 tokens you have to drop out duplicates.

So for the one 3 case you have 10 possible positions for the 3.

Your turn.
 
jedishrfu, 3 is not an even weight, why are you considering this case ? I only want to find no. of possible strings with even weight.
 
For the first digit there are an equal number of possibilities for being odd (1, 3) and even (0, 2). Same for digit 2, so for digits 1 and 2 there are equal numbers of odd (odd+ even, even + odd) and even (odd + odd, even + even) combinations. Extend the argument to the next digit, and the next... The strings with even weight will always be half the total possible strings, i.e. here 410/2.
 
IssacNewton said:
jedishrfu, 3 is not an even weight, why are you considering this case ? I only want to find no. of possible strings with even weight.

Did you want me to solve your problem or show how to solve it?
 
Question: A clock's minute hand has length 4 and its hour hand has length 3. What is the distance between the tips at the moment when it is increasing most rapidly?(Putnam Exam Question) Answer: Making assumption that both the hands moves at constant angular velocities, the answer is ## \sqrt{7} .## But don't you think this assumption is somewhat doubtful and wrong?

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
7
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
Replies
2
Views
1K