## windsylph 2 years ago How many bit strings of length 12 contain a) exactly three 1s? b) at most three 1s? c) at least three 1s? d) an equal number of 0s and 1s?

1. KingGeorge

a. 12-choose-3 Since you're choosing three places for a one to go.

2. KingGeorge

b. $\binom{12}{0} + \binom{12}{1} + \binom{12}{2} +\binom{12}{3}$

3. KingGeorge

c. $2^{12}-\left[\binom{12}{0} + \binom{12}{1} + \binom{12}{2}\right]$

4. KingGeorge

d.$\binom{12}{6}$

5. KingGeorge

If you want an explanation for any one of these, please ask.

6. inkyvoyd

Wrong, all of those. I'm pretty sure that that format means combination, while you're looking for permutations.

7. windsylph

i think that the problem seeks combinations actually, i just don't know how to come up with these numbers.

8. windsylph

or wait.. okay im confused. haha. permutations because order matters in bit strings?

9. inkyvoyd

No, Permutations because order matters. 111000000000 is different from 011100000000 is it not?

10. windsylph

haha okay thanks for clearing that up.

11. inkyvoyd

If you ever get confused about whether to use permutations or combinations, just remember the order matters rule for permutations.

12. KingGeorge

Sorry, had to step away for a little. You definitely want combinations here. Suppose you have this string: 111000000000. If you were using permutations, you would have $$3! \cdot 9!$$ ways to make this string. However, there is only one string that looks like this, not $$3!\cdot9!$$ strings. In this problem, order does not matter because we're considering the order of the ones with relation to the other ones. Since $$1=1$$, order does not matter.

13. windsylph

I see.. wow thanks!