Counting strings of alphabets 0,1,2 and 3

In summary: I just wanted to show you how to do it.But if you want me to solve it: there are 10 possible positions for the 3, and for each of those positions there are 9 possible positions for the 0. For the remaining 8 digits, there are 3 choices (1, 2, or 3) for each digit, so we have 9, 3, 3, 3, 3, 3, 3, 3, 3 possible combinations for those digits. That's 9*3^8. So for a weight of 3 we have 10*9*3^8.
  • #1
issacnewton
1,000
29

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
  • #2
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.
 
  • #3
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.
 
  • #4
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.
 
  • #5
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?
 

1. How many different combinations of strings can be made using the alphabets 0, 1, 2 and 3?

There are a total of 4 alphabets and each alphabet can be either 0, 1, 2 or 3. Therefore, the total number of combinations is 4 x 4 x 4 x 4 = 256.

2. Can the alphabets be repeated in a string?

Yes, the alphabets can be repeated in a string. This means that strings such as 0000, 1122, or 3333 are all valid combinations.

3. Is there a specific order in which the alphabets must be arranged in a string?

Yes, the order of the alphabets matters in a string of alphabets 0, 1, 2 and 3. For example, 0123 is different from 1023 or 3210.

4. Are there any patterns or sequences in the combinations of strings?

Yes, there are patterns and sequences that can be observed in the combinations of strings. For example, starting with a string of all 0s, the next string would have a 1 in the first position, followed by a 2 in the second position, and so on.

5. How can counting strings of alphabets 0, 1, 2 and 3 be applied in real life?

Counting strings of alphabets can be used in various fields such as computer science, genetics, and linguistics. In computer science, it can be used in data encryption and coding. In genetics, it can be used to analyze and understand DNA sequences. In linguistics, it can be used to study and categorize different sound patterns in languages.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
298
  • Calculus and Beyond Homework Help
Replies
3
Views
558
  • Calculus and Beyond Homework Help
Replies
2
Views
840
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
16
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
3K
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
Back
Top