How many bytes contain exactly two 1s?

258 Views Asked by At

I know the answer is $C(8,2)$, but I was confused as to why the answer wouldn't be $P(8,2)$? Doesn't the order of the 0s and 1s matter? For example: 10010000 is different than 10100000, so don't we have to consider every possible permutation of the zeros and the two ones?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes. But, combinations take care of that. There are $8!$ ways to permute the symbols in a byte. If 2 are ones interchanging them ( aka permuting indistinguishable things), doesn't change the combination placement. Same with interchanging the six 0's . So, we have:$$\frac{8!}{2!6!}=\binom{8}{2}$$ ways.