165k views
2 votes
Recall that a 6-bit string is a bit strings of length 6, and a bit string of weight 3, say, is one with exactly three 1's. How many 6-bit strings are there? How many 6-bit strings have weight 0? How many 6-bit strings have weight 1? How many 6-bit strings have weight 3? How many 6-bit strings have weight 5? How many 6-bit strings have weight 6? How many 6-bit strings have weight 7?

User Azee
by
6.5k points

2 Answers

4 votes

Final answer:

There are 64 possible 6-bit strings. 6-bit strings with weights of 0, 1, 3, 5, and 6 have 1, 6, 20, 6, and 1 possible strings respectively. No 6-bit strings exist with a weight of 7.

Step-by-step explanation:

When discussing 6-bit strings, we are considering all possible combinations of 0s and 1s in a sequence that is 6 bits long. To calculate the number of 6-bit strings, we consider that each bit can be either 0 or 1, giving us 2 possibilities for each bit position. Since there are 6 positions, we calculate the total number by raising 2 to the power of 6, which is 64.

To find the number of 6-bit strings with a specific weight, we can use combinatorics. The weight of a bit string is defined as the number of 1s in the string. For example, the number of 6-bit strings with a weight of 0 is just one, because the only possibility is 000000.

For a weight of 1, we have 6 possible strings, because there is only one 1 and it can be in any of the six positions. For a weight of 3, we use the combination formula C(n, k) = n! / (k!(n-k)!), where n is the total number of positions and k is the number of 1s. So, the number of 6-bit strings with weight 3 is 20, calculated as C(6, 3).

Similarly, for weight 5, we again use combinations and find that there are 6 possible strings. For weight 6, there is only one possible string, which is 111111. There are no 6-bit strings with weight 7 because the string is only 6 bits long, making it impossible to have more than 6 bits set to 1.

User Vokilam
by
6.7k points
3 votes

Answer:

1.. Total number of 6 bit strings is 64

2. Number of 6-bit strings with weight of 0 is 1

3. Number of 6-bit strings with weight of 1 is 6

4. Number of 6-bit strings with weight of 3 is 20

5. Number of 6-bit strings with weight of 5 is 6

6. Number of 6-bit strings with weight of 6 is 1

7. Number of 6-bit strings with weight of 7 is 0

Step-by-step explanation:

A bit string is a string that contains 0 and 1 only

1. Total number of 6 bit strings is 2^6 = 64

2. Number of 6 bit strings with weight 0 is 1

Explanation

Weight 0 means a string with no occurrence of 1

Here, we are only interested in occurrence and not order of occurrence

We apply combination formula for this

nCr = n!/(n-r)!r!

n = 6 and r = 0 i.e. no occurrence of 1

6C0 = 6!/(6-0)!0!

6C0 = 6!/6!0!

6C0 = 1

Hence, the number of string with weight 0 (i.e. no occurrence of 1 ) is 1

3. Number of string with weight 1 is 6

Explanation

Weight 0 means a string with exactly 1 occurrence of '1'

Here, we are only interested in occurrence and not order of occurrence

We apply combination formula for this

nCr = n!/(n-r)!r!

n = 6 and r = 1

6C1 = 6!/(6-1)!1!

6C1 = 6!/5!1!

6C1 = 6

Hence, the number of string with weight 6

4. Number of string with weight 3 is 20

Explanation

n = 6 and r = 3

6C3 = 6!/(6-3)!3!

6C3 = 6!/3!3!

6C3 = 20

Hence, the number of string with weight 3 is 20

5. Number of string with weight 5 is 6

Explanation

n = 6 and r = 5

6C5 = 6!/(6-5)!5!

6C5 = 6!/1!5!

6C5 = 6

Hence, the number of string with weight 5 is 6

6. Number of string with weight 6 is 1

Explanation

n = 6 and r = 6

6C6 = 6!/(6-6)!6!

6C6 = 6!/0!6!

6C6 = 1

Hence, the number of string with weight 6 is 1

7. Number of string with weight 7 is 0

Weight of 7 means that a string that has 7 occurrence of 1

The total length of a 6 bit is 6

Since 6 is less than 7, there's no way a bit of weight 7 can occur.

So, the right answer for this is 0.

User Csi
by
6.9k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.