# How many eight-bit strings contain exactly three 0's

• December 2nd 2010, 07:38 PM
Truthbetold
How many eight-bit strings contain exactly three 0's
How many eight-bit strings contain exactly three 0's?

Up till now, I've been getting problems right and I don't know why. I've just understood the method somehow. The method of writing:

_ _ _ _ _ _ _ _

And then writing how many possible number choices on the line. For this problem, I think any 3 could have a 0. So, I let the first three have two choices, and the other five with 1 choice.

So, 2 x 2 x 2 x 1 x 1 x 1 x 1 x 1 = 8.

That doesn't look right.

Is there a proper method for probability?

Thanks!
• December 2nd 2010, 08:00 PM
I assume that what you have mentioned as "bit" is binary numbers(am I correct?)

lets take one situation where there is three zero's

0,0,0,a,b,c,d,e

a,b,c,d and e can either be 1 or 0. So all possible combinations for arranging those would be $2^5$.

just like the above situation there can be $\frac{8!}{3!}$ situations

so all possible combinations = $\frac{8!}{3!}.2^5$

from this you can get the probability of getting a string containing exactly three 0's
• December 2nd 2010, 09:58 PM
Truthbetold
How can a,b,c,d,e be 0 or 1?

There can only be 3 zeros, which you put before a,b,c,d,e

_1_1_1_1_1_

There are six positions where the three zeros could go.
How I translate that into an equation...idk. Guessing: 2^6
• December 2nd 2010, 11:12 PM
aman_cc
you are right
hint - how many ways can you permute 11111000?
• December 3rd 2010, 06:27 AM
sorry, my mistake :(

you are correct

when there are three zeros there cannot be more zeros included.

as "aman_cc" has mentioned the answer is the number of permutations in the group 11111000
which is $\frac{8!}{3!.5!}$

so the final answer would be $\frac{8!}{3!.5!.2^8}$

am I correct now?
• December 3rd 2010, 06:37 AM
Plato
Quote:

as "aman_cc" has mentioned the answer is the number of permutations in the group 11111000 which is $\frac{8!}{3!.5!}$
so the final answer would be $\frac{8!}{3!.5!.2^8}$

The final answer is $\dfrac{8!}{3!\cdot 5!}$.
• December 3rd 2010, 07:11 AM
Soroban
Hello, Truthbetold!

Quote:

How many eight-bit strings contain exactly three 0's?

We have eight spaces to fill with three 0's and five 1's:. _ _ _ _ _ _ _ _

Select 3 of the 8 spaces: . $\displaystyle _8C_3 \:=\:{8\choose3} \:=\:\frac{8!}{3!\,5!} \:=\:56$ choices.

Place 0's in those three spaces.
. . Place 1's in the remaining spaces.

Therefore, there are $56$ eight-bit strings with exactly three 0's.

• December 4th 2010, 08:06 AM
HallsofIvy
Quote:

sorry, my mistake :(

you are correct

when there are three zeros there cannot be more zeros included.

as "aman_cc" has mentioned the answer is the number of permutations in the group 11111000
which is $\frac{8!}{3!.5!}$

so the final answer would be $\frac{8!}{3!.5!.2^8}$

am I correct now?

No, this is the number of 8 bit strings that have exactly 3 0s divided by the number of all 8 bit strings. It would be the probability that, if all 8 bit strings were equally likely to be chosen, of choosing a string that has exactly 3 0s.