Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I know that the answer is C(8,2), but I don't get, why. Can anyone, please, explain it?

share|improve this question

migrated from stackoverflow.com Jan 25 '11 at 12:22

This question came from our site for professional and enthusiast programmers.

1  
$C(m,n)$ is usually notated $\binom{m}{n}$ (binomial coefficient) –  Raphael Jan 25 '11 at 13:34

3 Answers 3

C(8, 2) means "8 choose 2", which in this case should be interpreted as "how many ways can you choose 2 items out of 8 possible". Here the 8 items are the bits, and the 2 comes from the bits you "select to be 1". That is, there are just as many bytes with exactly two 1s as there are ways to select 2 bits from 8 possible.

share|improve this answer
1  
Got it!!! Thank you! The problem is that i read the task as "how many bytes are in two 1's". ps: I am not a native English-speaker. ) –  Nika Jan 22 '11 at 20:35

C(8,2) is kinda self explanatory:
you have 8 bits, and each time you choose 2 of them to be ones.

share|improve this answer
1  
en.wikipedia.org/wiki/Combination seems pretty straightforward to me. –  Paul Nathan Jan 21 '11 at 23:43

$C[8, 2] = 8!/((8-2)!2!) = (8!/6!)/2! = (8*7)/2 = 28$. Think of it this way. The 8 is the choice of the first bit, and the 7 is the choice of the second bit (it's only 7 because there are only 7 bits available after the first bit is decided). The 2 represents the number of permutations of the chosen bits. We divide by 2 because we don't want to count each ordering of the chosen bits separatetly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.