MHB How many bytes contain exactly two 1's?

  • Thread starter Thread starter find_the_fun
  • Start date Start date
  • Tags Tags
    bytes
find_the_fun
Messages
147
Reaction score
0
How many bytes contain exactly two 1's?

The answer key give [math]\binom{8}{2}[/math] and I don't get why. Even if two bytes have been taken there are still [math]2^6[/math] ways to arrange the other bytes, which is much larger than 28.
 
Physics news on Phys.org
You could look at it this way:

There are 8 bit positions you could choose for the first 1 and that leaves 7 for the second bit position. But, order does not matter, so you want to divide by 2 so that you do not count each possible permutation twice. For example, suppose you chose the third bit the first time and the fifth bit the second time. This is equivalent to choosing the fifth bit the first time and the third bit the second time. So, we find:

$$N=\frac{8\cdot7}{2}=28$$
 
MarkFL said:
You could look at it this way:

There are 8 bit positions you could choose for the first 1 and that leaves 7 for the second bit position. But, order does not matter, so you want to divide by 2 so that you do not count each possible permutation twice. For example, suppose you chose the third bit the first time and the fifth bit the second time. This is equivalent to choosing the fifth bit the first time and the third bit the second time. So, we find:

$$N=\frac{8\cdot7}{2}=28$$

What I don't see is why the way I was looking at it was wrong.
 
If you have already chosen the two bits that are 1, then the remaining 6 bits must be zeroes, and there is only 1 way this can be.
 
MarkFL said:
If you have already chosen the two bits that are 1, then the remaining 6 bits must be zeroes, and there is only 1 way this can be.

That's what I was waiting for someone to say! I don't know what's wrong with me I need more sleep.
 
Namaste & G'day Postulate: A strongly-knit team wins on average over a less knit one Fundamentals: - Two teams face off with 4 players each - A polo team consists of players that each have assigned to them a measure of their ability (called a "Handicap" - 10 is highest, -2 lowest) I attempted to measure close-knitness of a team in terms of standard deviation (SD) of handicaps of the players. Failure: It turns out that, more often than, a team with a higher SD wins. In my language, that...
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Back
Top