Re: Binary bit



Dear readers,

I run into some trouble of counting how many numbers
there are in a
group of binary pattern of length 8 whose on-bit
numbers (the number of
1's) are 4 ?

For example, 10100011;11000101 etc. They have 4 ones

Thanks a lot


That's really identical to the common probability problem "how many ways can you flip a coin getting exactly 4 heads" or the permutations problem "How many different ways can you arrange the letters AAAABBBB.

Suppose all 8 letters were different (say they were labeled "A sub 1", etc.) Then there would be 8!= 8 factorial ways (8 choices for the first letter, then 7 for the next etc.) But many of those are the same- just different orders for the As. How many? Since there are 4 As, exactly 4!. Likewise, there are 4! ways of interchanging the 4 Bs without changing the As. In order not to count those as different, divide: 8!/(4!4!). Since 8!= 8*7*6*5*4*3*2*1 and 4!= 4*3*2*1, we can cancel:
8!/(4!4!)= 8*7*6*5/4!= 8*7*6*5/4*3*2*1. 8/4= 2 and 6/(3*2)= 1 so this is 7*5/1= 35.

In general, the number of different ways one can arrange n items, i of which are the same and the other n-i also the same, is the binomial coefficient n_C_i defined as n!/(i!(n-i)!). In this case, n= 8 and i= 4.
.



Relevant Pages

  • Re: Binary bit
    ... Bart Goddard wrote: ... I run into some trouble of counting how many numbers there are in a ... group of binary pattern of length 8 whose on-bit numbers (the number of ...
    (sci.math)
  • Re: Binary bit
    ... I run into some trouble of counting how many numbers there are in a ... group of binary pattern of length 8 whose on-bit numbers (the number of ... The man without a .sig ...
    (sci.math)