# Counting Theory and Addition Rule Confuses Me!

1. Jul 26, 2004

### sjaguar13

How many 16-bit strings contain exactly nine 1's? I said the total number is 2 to the 16th power, so to get half with 1's would be 2 to the 8th, or 256.

How many 16-bit strings contain at least fourteen 1's? I have no idea.

When determining a how to get 2 pair in a poker hand, why is getting the denomination of the first pair, then the 2 cards, then the demonitation of the second pair, then the 2 cards wrong? I know you have to get the two denominations first, 13 choose 2 instead of 13 choose 1 and then 12 choose 1, but I don't know why.

2. Jul 26, 2004

### AKG

I have no idea what you did here. The number of 16-bit strings with nine 1's is equal to the number of ways you can choose 9 spots in 16 (to fill them with ones, leaving the rest with zeroes). That number is:

$${{16}\choose {9}} = 11440$$
${{16}\choose {14}} + {{16}\choose {15}} + {{16}\choose {16}} = 137$*.
Notice that:

$${{13}\choose {2}} = \frac{1}{2} \times {{13}\choose {1}} {{12}\choose {1}}$$

That is, the stuff on the left is 1/2 the stuff on the right. Now why is the stuff on the left right? Because it correctly treats choosing 5 and J as denominations the same as choosing J and 5, whereas your approach treats them as two different cases, so you'd have to divide by 2 (which is already done if you do it the way you know you're supposed to).

*EDIT: Missed the part that said, "at least"

Last edited: Jul 27, 2004
3. Jul 27, 2004

### Muzza

I don't think ${{16}\choose {14}}$ is the correct answer to the second problem, seeing as he's asking for the number of 16-bit strings with /at least/ 14 ones. That means you have to count the number of strings with 15 ones and 16 ones as well. So the answer should be:

$${{16}\choose {14}} + {{16}\choose {15}} + {{16}\choose {16}}.$$